UX: Prevent new badge from being orphaned on mobile

This commit is contained in:
Kris 2020-02-10 13:48:47 -05:00
parent 8009d7bda2
commit c60182cdb2
1 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,13 @@
{{else}}
<div>
{{/unless~}}
{{!--
The `~` syntax strip spaces between the elements, making it produce
`<a class=topic-post-badges>Some text</a><span class=topic-post-badges>`,
with no space between them.
This causes the topic-post-badge to be considered the same word as "text"
at the end of the link, preventing it from line wrapping onto its own line.
--}}
<div class='main-link'>
{{~raw-plugin-outlet name="topic-list-before-status"}}
{{~raw "topic-status" topic=topic~}}
@ -15,7 +22,7 @@
{{~topic-featured-link topic~}}
{{~/if~}}
{{~#if topic.unseen~}}
&nbsp;<span class="badge-notification new-topic"></span>
<span class="topic-post-badges">&nbsp;<span class="badge-notification new-topic"></span></span>
{{~/if~}}
{{~#if expandPinned~}}
{{~raw "list/topic-excerpt" topic=topic~}}
@ -41,4 +48,4 @@
<div class="clearfix"></div>
</div>
</div>
</td>
</td>