style tags archive list

This commit is contained in:
John Bowdre 2024-01-18 20:43:00 -06:00
parent 3bd01ece8b
commit d6b47055a0
2 changed files with 19 additions and 1 deletions

View file

@ -13,14 +13,16 @@
{{- if eq .Kind "taxonomy" }}
{{- if eq .Title "Tags" }}
<div class="tagsArchive">
{{- range $key, $value := .Site.Taxonomies }}
{{- $slicedTags := ($value.ByCount) }}
{{- range $slicedTags }}
{{- if eq $key "tags"}}
[<a href='/{{ $key }}/{{ (replace .Name "#" "%23") | urlize }}/' title="{{ .Name }}">{{ .Name }}</a><sup>{{ .Count }}</sup>]
<div><a href='/{{ $key }}/{{ (replace .Name "#" "%23") | urlize }}/' title="{{ .Name }}">{{ .Name }}</a><sup>{{ .Count }}</sup></div>
{{- end }}
{{- end }}
{{- end }}
</div>
{{- else }}
{{- range .Pages }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a><br>

View file

@ -253,4 +253,20 @@ form button {
border: none;
background-color: var(--off-bg);
color: var(--link);
}
/* tags list styling */
.tagsArchive {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
grid-gap: 0.5rem;
/* justify-content: center; */
margin: 0.5rem 0;
}
.tagsArchive sup {
font-size: 0.75rem;
margin-left: 0.2rem;
margin-right: 0.5rem;
}