Browse Source

Improve wrapping of bottom row of topic data

On small screens, when the bottom row with a topic's comments, source,
and age starts wrapping, there was some weird behavior. This improves it
so that:

* The number(s) for comments won't wrap separately
* If the row gets taller due to wrapping, text will align to the bottom
merge-requests/85/head
Deimos 5 years ago
parent
commit
5794b3f0f9
  1. 5
      tildes/scss/modules/_topic.scss
  2. 2
      tildes/tildes/templates/macros/topics.jinja2

5
tildes/scss/modules/_topic.scss

@ -233,16 +233,17 @@
grid-column-gap: 0.4rem; grid-column-gap: 0.4rem;
align-items: end;
max-width: 32rem; max-width: 32rem;
white-space: nowrap; white-space: nowrap;
} }
.topic-info-comments { .topic-info-comments {
white-space: normal; white-space: normal;
}
.topic-info-comments-new {
span {
white-space: nowrap; white-space: nowrap;
}
} }
.topic-info-source { .topic-info-source {

2
tildes/tildes/templates/macros/topics.jinja2

@ -80,7 +80,7 @@
{% if request.user.open_new_tab_internal %}target="_blank"{% endif %} {% if request.user.open_new_tab_internal %}target="_blank"{% endif %}
> >
{{ pluralize(topic.num_comments, "comment") }}
<span>{{ pluralize(topic.num_comments, "comment") }}</span>
{% if topic.comments_since_last_visit %} {% if topic.comments_since_last_visit %}
<span class="topic-info-comments-new" title="Last visit {{ topic.last_visit_time|ago }}"> <span class="topic-info-comments-new" title="Last visit {{ topic.last_visit_time|ago }}">

Loading…
Cancel
Save