mirror of
https://github.com/imfing/hextra.git
synced 2025-07-02 14:39:43 -04:00
feat(tags): improve usability of tags (#698)
* feat(tags): improve usability of tags * Tags can be shown also at docs * Documented tag-related config flags * Added example tags to the site * Made rendered tags active * Move tags listing to ToC * Hide tags section on no tags
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
{{/* TODO: toc bottom part should be able to hide */}}
|
||||
{{- $toc := .Params.toc | default true -}}
|
||||
{{- $onThisPage := (T "onThisPage") | default "On this page"}}
|
||||
{{- $tags := (T "tags") | default "Tags"}}
|
||||
{{- $editThisPage := (T "editThisPage") | default "Edit this page"}}
|
||||
{{- $backToTop := (T "backToTop") | default "Scroll to top" -}}
|
||||
|
||||
@ -18,6 +19,14 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- $borderClass := "hx:mt-8 hx:border-t hx:bg-white hx:pt-8 hx:shadow-[0_-12px_16px_white] hx:dark:bg-dark hx:dark:shadow-[0_-12px_16px_#111]" -}}
|
||||
|
||||
{{- if and site.Params.toc.displayTags .Params.tags -}}
|
||||
<div class="{{ $borderClass }} hx:sticky hx:bottom-0 hx:flex hx:flex-col hx:items-start hx:gap-2 hx:border-gray-200 hx:dark:border-neutral-800 hx:contrast-more:border-t hx:contrast-more:border-neutral-400 hx:contrast-more:shadow-none hx:contrast-more:dark:border-neutral-400">
|
||||
<p class="hx:mb-1 hx:font-semibold hx:tracking-tight">{{ $tags }}</p>
|
||||
{{ partial "tags.html" . }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- if not .Fragments.Headings -}}
|
||||
{{- $borderClass = "" -}}
|
||||
{{- end -}}
|
||||
|
Reference in New Issue
Block a user