Open VictorZakharov opened 3 years ago
For now I just changed classic.html
template and added {{ partial "body/tags" . }}
at the end of h6
.
Path to the file:
Whole h6
now looks like this:
<h6 class="subtitle caption">
<time title="{{ i18n "tooltip-written" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">📅 {{ .Date.Format (i18n "summary-dateformat") }} </time>
{{ if ne (.Date.Format (i18n "summary-dateformat")) (.Lastmod.Format (i18n "summary-dateformat")) }}
<time title="{{ i18n "tooltip-modified" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · 📝 {{ .Lastmod.Format (i18n "summary-dateformat") }} </time>
{{ end }}
<span title="{{ i18n "tooltip-reading-time" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> · ☕ {{ .ReadingTime }} {{ i18n "reading-time" }} </span>
{{ with $.Param "author" }}
· <span title="{{ i18n "single-writtenBy" }}" dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">{{ if $.Param "authorEmoji" }}{{ $.Param "authorEmoji" }}{{ else }}✍️{{ end }} {{ . }}</span>
{{ end }}
{{ partial "body/tags" . }} <!-- add this line here -->
</h6>
Then added to custom CSS (repo-root/assets/scss/custom.scss).
.summary-classic .single__tags {
float: right;
font-weight: normal;
}
It now looks like this:
Might not fit all tags on mobile/tablet, they will get pushed to the second line - not ideal, but good enough as a temp fix.
Change is now live.
Currently I only see tags when article has loaded. Would be great to see it on the index page also. Some people might not be interested in certain tags, so it makes it more user friendly.
My article template looks like this:
And here is how the index post should look like (I edited tags in Paint, they weren't there before):
Index post original: