Update forum post templates

* Use approx number for points & comments
* Hide comments when limited on horizontal space
* Abbreviate "points" to "pts" when limited on horizontal space
* Don't let domain wrap
This commit is contained in:
Svilen Markov
2025-01-14 10:41:46 +00:00
parent b4ac96ccaf
commit 1c03f0a07a
8 changed files with 30 additions and 21 deletions
+3 -3
View File
@@ -33,10 +33,10 @@
</ul>
</div>
{{ end }}
<ul class="list-horizontal-text">
<ul class="list-horizontal-text flex-nowrap text-compact">
<li {{ dynamicRelativeTimeAttrs .TimePosted }}></li>
<li>{{ .Score | formatNumber }} points</li>
<li>{{ .CommentCount | formatNumber }} comments</li>
<li class="shrink-0">{{ .Score | formatApproxNumber }} <span class="forum-post-points-word">points</span></li>
<li class="forum-post-comment-count shrink-0">{{ .CommentCount | formatApproxNumber }} comments</li>
{{ if ne "" .TargetUrl }}
<li class="min-width-0"><a class="visited-indicator text-truncate block" href="{{ .TargetUrl }}" target="_blank" rel="noreferrer">{{ .TargetUrlDomain }}</a></li>
{{ end }}