diff --git a/brutaldon/static/css/brutaldon-dark.css b/brutaldon/static/css/brutaldon-dark.css index dc721b7..a1aee64 100644 --- a/brutaldon/static/css/brutaldon-dark.css +++ b/brutaldon/static/css/brutaldon-dark.css @@ -240,6 +240,12 @@ a.navbar-item span:nth-child(2):before content: " "; } +div.poll { + margin-bottom: 1ex; + margin-top: 1em; + max-width: 90%; +} + /* Fix some rules that don't need to be there */ .content figure:not(:last-child) { diff --git a/brutaldon/static/css/brutaldon.css b/brutaldon/static/css/brutaldon.css index f4ac002..75ccb35 100644 --- a/brutaldon/static/css/brutaldon.css +++ b/brutaldon/static/css/brutaldon.css @@ -2,7 +2,6 @@ body > section > div.container { max-width: 100%; } - .reblog-icon { position: relative; top: -24px; @@ -219,6 +218,14 @@ a.navbar-item span:nth-child(2):before content: " "; } + +div.poll { + margin-bottom: 1ex; + margin-top: 1em; + max-width: 90%; +} + + /* Fix some rules that don't need to be there */ .content figure:not(:last-child) { diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html index dbcc6bb..2995f5f 100644 --- a/brutaldon/templates/main/toot_partial.html +++ b/brutaldon/templates/main/toot_partial.html @@ -6,56 +6,68 @@ {% if active %} -
- {% else %} -
- {% endif %} +
+{% else %} +
+{% endif %} -
- +
+ + {% if reblog %} +

+ + + +

+ {% endif %} +
+
+
+

+ {{ toot.account.display_name }} + + @{{ toot.account.acct }} + + {{ toot.created_at |humane_time }} + {% if reblog %} -

- - - -

+
+ Boosted by @{{ reblog_by }} {% endif %} -
-
-
-

- {{ toot.account.display_name }} - @{{ toot.account.acct }} - - {{ toot.created_at |humane_time }} - - {% if reblog %} -
- Boosted by @{{ reblog_by }} - {% endif %} -

- {% if toot.spoiler_text %} -
- {{ toot.spoiler_text }} -
- {{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }} -
-
- {% else %} +

+ {% if toot.spoiler_text %} +
+ {{ toot.spoiler_text }}
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
- {% endif %} +
+ {% else %} +
+ {{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }} +
+ {% endif %} - {% if toot.card %} -
-
- {% if toot.card.image %} + {% if toot.poll %} +
+ {% if toot.poll.voted or toot.poll.expired %} + {% include "polls/completed_partial.html" with toot=toot %} + {% else %} + + {% endif %} +
+ {% endif %} + + + {% if toot.card %} +
+
+ {% if toot.card.image %} - {% endif %} -
-

- - - {{ toot.card.title }} - - + {% endif %} +

+

+ + + {{ toot.card.title }} + +

{{ toot.card.description }}

-
- {% endif %} +
+ {% endif %} - {% if toot.media_attachments %} -
-
- {% for media in toot.media_attachments %} + {% if toot.media_attachments %} +
+
+ {% for media in toot.media_attachments %} {% if media.type == "image" %} -
- - {% if toot.sensitive %} - {% if media.description  %}
-                                      {{ media.description }}
-                                      {% elif media.text_url %}
-                                      {{ media.text_url }}
-                                      {% else %}
-                                      {{ media.url  }}
-                                      {% endif %} - -
- {% else %} -
-
+ {% else %} +
+ +
{% endif %} - {% endfor %} -
- {% endif %} -
- - + {% endfor %}
- {% if not confirm_page %} -
+ + {% endif %} -
-
-
+ +
+
diff --git a/brutaldon/templates/polls/completed_partial.html b/brutaldon/templates/polls/completed_partial.html new file mode 100644 index 0000000..af109f6 --- /dev/null +++ b/brutaldon/templates/polls/completed_partial.html @@ -0,0 +1,19 @@ +{% load sanitizer %} +{% load taglinks %} +{% load static %} +
+ {% for option in toot.poll.options %} +
+ {{ option.title }} + ({{ option.votes_count}} vote{{ option.votes_count|pluralize }}) + +
+
+ +
+ {% endfor %} +