UX: fix and improve topic title badge spacing (#25441)

This commit is contained in:
Kris 2024-01-26 12:11:03 -05:00 committed by GitHub
parent f2e1363f67
commit 4266b0cf7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 20 deletions

View File

@ -14,9 +14,9 @@
{{raw "topic-status" topic=this.topic}}
{{topic-link this.topic}}
{{~#if this.topic.featured_link}}
{{topic-featured-link this.topic}}
{{/if}}
<TopicPostBadges
&nbsp;{{topic-featured-link this.topic}}
{{/if}}{{! intentionally inline
to avoid whitespace}}<TopicPostBadges
@unreadPosts={{this.topic.unread_posts}}
@unseen={{this.topic.unseen}}
@url={{this.topic.lastUnreadUrl}}

View File

@ -1,14 +1,12 @@
{{#if this.displayUnreadPosts}}
&nbsp;<a
{{~#if this.displayUnreadPosts}}&nbsp;<a
href={{this.url}}
title={{i18n "topic.unread_posts" count=this.displayUnreadPosts}}
class="badge badge-notification unread-posts"
>{{this.displayUnreadPosts}}</a>
{{/if}}
{{#if this.unseen}}
&nbsp;<a
{{/if~}}
{{~#if this.unseen}}&nbsp;<a
href={{this.url}}
title={{i18n "topic.new"}}
class="badge badge-notification new-topic"
>{{this.newDotText}}</a>
{{/if}}
{{/if~}}

View File

@ -22,7 +22,7 @@
{{~raw "topic-status" topic=topic}}
{{~topic-link topic class="raw-link raw-topic-link"}}
{{~#if topic.featured_link}}
{{~topic-featured-link topic}}
&nbsp;{{~topic-featured-link topic}}
{{~/if}}
{{~raw-plugin-outlet name="topic-list-after-title"}}
{{~raw "list/unread-indicator" includeUnreadIndicator=includeUnreadIndicator

View File

@ -72,6 +72,8 @@
.badge-notification {
@extend %badge;
position: relative;
top: -2px;
padding: 0.21em 0.42em;
min-width: 0.5em;
color: var(--secondary);
@ -97,6 +99,7 @@
&.new-topic {
background-color: transparent;
padding-left: 0.15em;
}
&.new-topic::before {

View File

@ -68,16 +68,6 @@
}
}
.badge-notification {
position: relative;
top: -2px;
&.new-topic {
top: -1px;
padding-left: 2px;
}
}
$td-posters-height: 29px; // min-height of td with avatar glow
$td-posters-more-lh: $td-posters-height - 4;