From f73cadee905bd277b735a60d20645e4b01a08a09 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Thu, 23 Aug 2018 11:19:32 -0400 Subject: [PATCH] Add JS enhancement to thread page: expand/collapse all CWs --- brutaldon/templates/main/thread.html | 64 +++++++++++++++++++++------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/brutaldon/templates/main/thread.html b/brutaldon/templates/main/thread.html index 44ff4cc..a31e338 100644 --- a/brutaldon/templates/main/thread.html +++ b/brutaldon/templates/main/thread.html @@ -2,30 +2,64 @@ {% load humanize %} {% block title %} -Brutaldon ({{ own_acct.username }}) - thread + Brutaldon ({{ own_acct.username }}) - thread {% endblock %} {% comment %} mastodon.status_context() - # Returns the following dictionary: - { - 'ancestors': # A list of toot dicts - 'descendants': # A list of toot dicts - } - {% endcomment %} +# Returns the following dictionary: +{ +'ancestors': # A list of toot dicts +'descendants': # A list of toot dicts +} +{% endcomment %} - {% block content %} -

Thread

+{% block content %} +

+ Thread +

{% for ancestor in context.ancestors %} - {% include "main/toot_partial.html" with toot=ancestor %} - + {% include "main/toot_partial.html" with toot=ancestor %} + {% endfor %} - {% include "main/toot_partial.html" with toot=toot active=True %} + {% include "main/toot_partial.html" with toot=toot active=True %} {% for descendant in context.descendants %} - {% include "main/toot_partial.html" with toot=descendant %} - + {% include "main/toot_partial.html" with toot=descendant %} + {% endfor %} - {% endblock %} +{% endblock %} + +{% block page_scripts_inline %} + +{% endblock %}