diff --git a/tildes/scss/modules/_topic.scss b/tildes/scss/modules/_topic.scss index 929e433..3c1647d 100644 --- a/tildes/scss/modules/_topic.scss +++ b/tildes/scss/modules/_topic.scss @@ -193,11 +193,10 @@ .topic-info { display: grid; - grid-auto-columns: 1fr; - grid-auto-flow: column; + grid-template-columns: 1fr 1.2fr 1fr; grid-column-gap: 0.4rem; - max-width: 30rem; + max-width: 32rem; margin-top: 0.2rem; white-space: nowrap; diff --git a/tildes/tildes/models/topic/topic.py b/tildes/tildes/models/topic/topic.py index fb926be..5c84426 100644 --- a/tildes/tildes/models/topic/topic.py +++ b/tildes/tildes/models/topic/topic.py @@ -379,16 +379,15 @@ class Topic(DatabaseModel): # pylint: disable=too-many-branches metadata_strings = [] - if self.is_text_type: - word_count = self.get_content_metadata("word_count") - if word_count is not None: - if word_count == 1: - metadata_strings.append("1 word") - else: - metadata_strings.append(f"{word_count} words") - elif self.is_link_type: - metadata_strings.append(f"{self.link_domain}") - + # display word count (if we have it) with either type of topic + word_count = self.get_content_metadata("word_count") + if word_count is not None: + if word_count == 1: + metadata_strings.append("1 word") + else: + metadata_strings.append(f"{word_count} words") + + if self.is_link_type: # display the published date if it's more than 3 days before the topic published_timestamp = self.get_content_metadata("published") if published_timestamp: diff --git a/tildes/tildes/templates/macros/topics.jinja2 b/tildes/tildes/templates/macros/topics.jinja2 index aeca60a..20e3f72 100644 --- a/tildes/tildes/templates/macros/topics.jinja2 +++ b/tildes/tildes/templates/macros/topics.jinja2 @@ -28,7 +28,9 @@ >{{ topic.title }} {% endif %} - ({{ topic.content_metadata_for_display }}) + {% if topic.content_metadata_for_display %} + ({{ topic.content_metadata_for_display }}) + {% endif %} @@ -74,7 +76,11 @@ -
{{ username_linked(topic.user.username) }}
+ {% if topic.is_text_type %} +
{{ username_linked(topic.user.username) }}
+ {% elif topic.is_link_type %} +
{{ topic.link_domain }}
+ {% endif %}
{{ adaptive_date_responsive(topic.created_time) }}