From cef8027767efa00739488b59170acda1c71f2fa3 Mon Sep 17 00:00:00 2001 From: Deimos Date: Fri, 6 Sep 2019 18:48:11 -0600 Subject: [PATCH] Improve wrapping of comment post/edit times Previously the posted/edited times of comments wrapped very poorly on small screens. This improves it somewhat, making it so they won't wrap "internally" but the edited time will go underneath the posted time. More improvements are still needed, especially with the Link/Parent nav links, but this is definitely better. --- tildes/scss/modules/_comment.scss | 7 +++++++ tildes/tildes/templates/macros/comments.jinja2 | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tildes/scss/modules/_comment.scss b/tildes/scss/modules/_comment.scss index 0e83dea..503f34e 100644 --- a/tildes/scss/modules/_comment.scss +++ b/tildes/scss/modules/_comment.scss @@ -32,15 +32,22 @@ margin-left: 0.2rem; } +.comment-time-info { + display: flex; + flex-wrap: wrap; +} + .comment-posted-time { margin-left: 0.4rem; font-size: 0.6rem; + white-space: nowrap; } .comment-edited-time { font-size: 0.6rem; font-style: italic; margin-left: 0.4rem; + white-space: nowrap; } .comment-excerpt { diff --git a/tildes/tildes/templates/macros/comments.jinja2 b/tildes/tildes/templates/macros/comments.jinja2 index f7f4559..d8d66bb 100644 --- a/tildes/tildes/templates/macros/comments.jinja2 +++ b/tildes/tildes/templates/macros/comments.jinja2 @@ -61,13 +61,15 @@ {% endif %} - {{ adaptive_date_responsive(comment.created_time, class_="comment-posted-time") }} +
+ {{ adaptive_date_responsive(comment.created_time, class_="comment-posted-time") }} - {% if comment.last_edited_time %} - - (edited {{ adaptive_date_responsive(comment.last_edited_time) }}) - - {% endif %} + {% if comment.last_edited_time %} + + (edited {{ adaptive_date_responsive(comment.last_edited_time) }}) + + {% endif %} +
{% else %} {% if comment.is_deleted %}
Comment deleted by author