Browse Source

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.
merge-requests/85/head
Deimos 5 years ago
parent
commit
cef8027767
  1. 7
      tildes/scss/modules/_comment.scss
  2. 14
      tildes/tildes/templates/macros/comments.jinja2

7
tildes/scss/modules/_comment.scss

@ -32,15 +32,22 @@
margin-left: 0.2rem; margin-left: 0.2rem;
} }
.comment-time-info {
display: flex;
flex-wrap: wrap;
}
.comment-posted-time { .comment-posted-time {
margin-left: 0.4rem; margin-left: 0.4rem;
font-size: 0.6rem; font-size: 0.6rem;
white-space: nowrap;
} }
.comment-edited-time { .comment-edited-time {
font-size: 0.6rem; font-size: 0.6rem;
font-style: italic; font-style: italic;
margin-left: 0.4rem; margin-left: 0.4rem;
white-space: nowrap;
} }
.comment-excerpt { .comment-excerpt {

14
tildes/tildes/templates/macros/comments.jinja2

@ -61,13 +61,15 @@
</span> </span>
{% endif %} {% endif %}
{{ adaptive_date_responsive(comment.created_time, class_="comment-posted-time") }}
<div class="comment-time-info">
{{ adaptive_date_responsive(comment.created_time, class_="comment-posted-time") }}
{% if comment.last_edited_time %}
<span class="comment-edited-time">
(edited {{ adaptive_date_responsive(comment.last_edited_time) }})
</span>
{% endif %}
{% if comment.last_edited_time %}
<span class="comment-edited-time">
(edited {{ adaptive_date_responsive(comment.last_edited_time) }})
</span>
{% endif %}
</div>
{% else %} {% else %}
{% if comment.is_deleted %} {% if comment.is_deleted %}
<div class="is-comment-deleted">Comment deleted by author</div> <div class="is-comment-deleted">Comment deleted by author</div>

Loading…
Cancel
Save