]> juplo.de Git - website/commitdiff
WIP:refactor: display terms as term/number-buttons
authorKai Moritz <kai@juplo.de>
Tue, 25 Nov 2025 17:27:44 +0000 (18:27 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 25 Nov 2025 17:30:13 +0000 (18:30 +0100)
hugo/themes/thymeleaf/layouts/categories/terms.html [deleted file]
hugo/themes/thymeleaf/layouts/tags/terms.html [deleted file]
hugo/themes/thymeleaf/layouts/taxonomy.html

diff --git a/hugo/themes/thymeleaf/layouts/categories/terms.html b/hugo/themes/thymeleaf/layouts/categories/terms.html
deleted file mode 100644 (file)
index 35df26d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{{- define "custom_css" }}
-<style>
-.terms-tags li {
-    display: inline-block;
-    margin: 10px;
-    font-weight: 500;
-}
-
-.terms-tags a {
-    display: block;
-    padding: 3px 10px;
-    background: var(--tertiary);
-    border-radius: 6px;
-    transition: transform 0.1s;
-}
-
-.terms-tags a:active {
-    background: var(--tertiary);
-    transform: scale(0.96);
-}
-</style>
-{{- end }}
-{{- define "main" }}
-
-{{- if .Title }}
-<header class="page-header">
-    <h1>{{ .Title }}</h1>
-    {{- if .Description }}
-    <div class="post-description">
-        {{ .Description }}
-    </div>
-    {{- end }}
-</header>
-{{- end }}
-
-<ul class="terms-tags">
-    {{- $type := .Type }}
-    {{- range $key, $value := .Data.Terms.Alphabetical }}
-    {{- $name := .Name }}
-    {{- $count := .Count }}
-    {{- with site.GetPage (printf "/%s/%s" $type $name) }}
-    <li>
-        <a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
-    </li>
-    {{- end }}
-    {{- end }}
-</ul>
-
-{{- end }}{{/* end main */ -}}
diff --git a/hugo/themes/thymeleaf/layouts/tags/terms.html b/hugo/themes/thymeleaf/layouts/tags/terms.html
deleted file mode 100644 (file)
index 35df26d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{{- define "custom_css" }}
-<style>
-.terms-tags li {
-    display: inline-block;
-    margin: 10px;
-    font-weight: 500;
-}
-
-.terms-tags a {
-    display: block;
-    padding: 3px 10px;
-    background: var(--tertiary);
-    border-radius: 6px;
-    transition: transform 0.1s;
-}
-
-.terms-tags a:active {
-    background: var(--tertiary);
-    transform: scale(0.96);
-}
-</style>
-{{- end }}
-{{- define "main" }}
-
-{{- if .Title }}
-<header class="page-header">
-    <h1>{{ .Title }}</h1>
-    {{- if .Description }}
-    <div class="post-description">
-        {{ .Description }}
-    </div>
-    {{- end }}
-</header>
-{{- end }}
-
-<ul class="terms-tags">
-    {{- $type := .Type }}
-    {{- range $key, $value := .Data.Terms.Alphabetical }}
-    {{- $name := .Name }}
-    {{- $count := .Count }}
-    {{- with site.GetPage (printf "/%s/%s" $type $name) }}
-    <li>
-        <a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
-    </li>
-    {{- end }}
-    {{- end }}
-</ul>
-
-{{- end }}{{/* end main */ -}}
index c2e787519e61886e914c468f206485f570ce3b37..35df26d582ef8939946c76ffe056f994fbbba700 100644 (file)
@@ -1,7 +1,49 @@
-{{ define "main" }}
-  <h1>{{ .Title }}</h1>
-  {{ .Content }}
-  {{ range .Pages }}
-    <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
-  {{ end }}
-{{ end }}
+{{- define "custom_css" }}
+<style>
+.terms-tags li {
+    display: inline-block;
+    margin: 10px;
+    font-weight: 500;
+}
+
+.terms-tags a {
+    display: block;
+    padding: 3px 10px;
+    background: var(--tertiary);
+    border-radius: 6px;
+    transition: transform 0.1s;
+}
+
+.terms-tags a:active {
+    background: var(--tertiary);
+    transform: scale(0.96);
+}
+</style>
+{{- end }}
+{{- define "main" }}
+
+{{- if .Title }}
+<header class="page-header">
+    <h1>{{ .Title }}</h1>
+    {{- if .Description }}
+    <div class="post-description">
+        {{ .Description }}
+    </div>
+    {{- end }}
+</header>
+{{- end }}
+
+<ul class="terms-tags">
+    {{- $type := .Type }}
+    {{- range $key, $value := .Data.Terms.Alphabetical }}
+    {{- $name := .Name }}
+    {{- $count := .Count }}
+    {{- with site.GetPage (printf "/%s/%s" $type $name) }}
+    <li>
+        <a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
+    </li>
+    {{- end }}
+    {{- end }}
+</ul>
+
+{{- end }}{{/* end main */ -}}