Add tags to forum posts template

This commit is contained in:
Svilen Markov 2024-06-02 18:44:17 +01:00
parent db7df33b27
commit c276f66017
2 changed files with 14 additions and 0 deletions

View File

@ -775,6 +775,10 @@ kbd:active {
margin-top: 0.1rem; margin-top: 0.1rem;
} }
.forum-post-tags-container {
transform: translateY(-0.15rem);
}
.bookmarks-group { .bookmarks-group {
--bookmarks-group-color: var(--color-primary); --bookmarks-group-color: var(--color-primary);
} }
@ -1367,6 +1371,7 @@ kbd:active {
.min-width-0 { min-width: 0; } .min-width-0 { min-width: 0; }
.max-width-100 { max-width: 100%; } .max-width-100 { max-width: 100%; }
.block { display: block; } .block { display: block; }
.inline-block { display: inline-block; }
.overflow-hidden { overflow: hidden; } .overflow-hidden { overflow: hidden; }
.relative { position: relative; } .relative { position: relative; }
.flex { display: flex; } .flex { display: flex; }

View File

@ -20,6 +20,15 @@
{{ end }} {{ end }}
<div class="grow min-width-0"> <div class="grow min-width-0">
<a href="{{ .DiscussionUrl }}" class="size-h3 color-primary-if-not-visited" target="_blank" rel="noreferrer">{{ .Title }}</a> <a href="{{ .DiscussionUrl }}" class="size-h3 color-primary-if-not-visited" target="_blank" rel="noreferrer">{{ .Title }}</a>
{{ if gt (len .Tags) 0 }}
<div class="inline-block forum-post-tags-container">
<ul class="attachments">
{{ range .Tags }}
<li>{{ . }}</li>
{{ end }}
</ul>
</div>
{{ end }}
<ul class="list-horizontal-text"> <ul class="list-horizontal-text">
<li {{ dynamicRelativeTimeAttrs .TimePosted }}></li> <li {{ dynamicRelativeTimeAttrs .TimePosted }}></li>
<li>{{ .Score | formatNumber }} points</li> <li>{{ .Score | formatNumber }} points</li>