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 .Kind "taxonomy" }}
{{- if eq .Title "Tags" }} {{- if eq .Title "Tags" }}
<div class="tagsArchive">
{{- range $key, $value := .Site.Taxonomies }} {{- range $key, $value := .Site.Taxonomies }}
{{- $slicedTags := ($value.ByCount) }} {{- $slicedTags := ($value.ByCount) }}
{{- range $slicedTags }} {{- range $slicedTags }}
{{- if eq $key "tags"}} {{- 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 }} {{- end }}
{{- end }} {{- end }}
</div>
{{- else }} {{- else }}
{{- range .Pages }} {{- range .Pages }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a><br> <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a><br>

View file

@ -253,4 +253,20 @@ form button {
border: none; border: none;
background-color: var(--off-bg); background-color: var(--off-bg);
color: var(--link); 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;
} }