From 94a781c82c02e475365526ea30e3727e4effb777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Pe=C5=A1ek?= Date: Sat, 1 Apr 2023 14:31:39 +0200 Subject: [PATCH] fix(polls): minor improvements --- static/style.css | 1 + templates/utils.html | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/style.css b/static/style.css index 851d88b..b8633d2 100644 --- a/static/style.css +++ b/static/style.css @@ -988,6 +988,7 @@ a.search_subreddit:hover { .most_voted { opacity: 0.45; + width: 100%; } /* Used only for text post preview */ diff --git a/templates/utils.html b/templates/utils.html index d5f3f69..8e77d26 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -311,8 +311,8 @@ {% when Some with (poll) %} {% let widest = poll.most_votes() %}
- {{ poll.total_vote_count }} votes - {{ poll.voting_end_timestamp.0 }} + {{ poll.total_vote_count }} votes, + {{ poll.voting_end_timestamp.0 }} {% for option in poll.poll_options %}
{# Posts without vote_count (all open polls) will show up without votes. @@ -320,13 +320,13 @@ {% match option.vote_count %} {% when Some with (vote_count) %} {% if vote_count.eq(widest) || widest == 0 %} -
+
{% else %}
{% endif %} {{ vote_count }} {% when None %} -
+
{% endmatch %} {{ option.text }}