]> juplo.de Git - website/commitdiff
WIP:?Taxonomien Categories und Tags ... oder was frontend
authorKai Moritz <kai@juplo.de>
Fri, 6 Feb 2026 17:30:18 +0000 (18:30 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 6 Feb 2026 17:30:18 +0000 (18:30 +0100)
layouts/tags/term.html

index b50e04ad16898193724057a17b23cff3d5560bc9..7f6f1a8e5f613aa60bdc0b852cf627dcb7a08f3f 100644 (file)
@@ -1,3 +1,83 @@
+{{ define "breadcrumb" }}
+<div id="breadcrumb">
+  <strong class="b title">You are here:</strong>
+  <ol class="b">
+    {{- range (slice "/" "/blog" "/categories") -}}
+    {{- with $.Site.GetPage . -}}
+    <li class="b"><a class="b" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
+    {{- end -}}
+    {{- end -}}
+    <li class="b"><strong class="b">{{ .LinkTitle }}</strong></li>
+  </ol>
+  <a class="hide" href="#nav" title="Show navigation menu">Jump to navigation</a>
+  <hr class="b" />
+</div>
+{{ end }}
+
+{{ define "menu" }}
+{{- $page := $ }}
+<nav id="nav">
+  <hr class="n"/>
+  <a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a>
+  <h1 class="nav">Navigation</h1>
+  <h2 class="nav menu">Section-Menu</h2>
+  <ul id="menu" class="cf">
+    {{- range $page.Site.MainSections }}
+    {{- $section := site.GetPage "section" . }}
+    <li class="m {{ . }}">
+      <a href="{{ $section.RelPermalink }}" class="{{ cond (eq $page.Section .) "m selected" "m" }}">{{ $section.LinkTitle }}</a>
+    </li>
+    {{- end }}
+  </ul>
+  <h2 class="nav submenu">
+    <a class="s selected" href="{{ site.Home.RelPermalink }}">Home</a>
+  </h2>
+  <ul id="submenu" class="s active">
+    {{- range $page.Site.MainSections }}
+    {{- with site.GetPage "section" . }}
+    {{- if eq .Path "/blog" }}
+    <li class="s sub">
+      <a  href="{{ .RelPermalink }}" class="s selected">{{ .LinkTitle }}</a>
+      <ul class="s active">
+        {{- range .Pages -}}
+        <li class="s off">
+          <a href="{{ .RelPermalink }}" class="s">{{ .LinkTitle }}</a>
+        </li>
+        <li class="s sub">
+          {{- with $.Site.GetPage "/categories" -}}
+          <a href="{{ .RelPermalink }}" class="s selected">{{ .LinkTitle }}</a>
+          <ul class="s active">
+            {{- range .Pages -}}
+            <li class="s">
+              <a  href="{{ .RelPermalink }}" class="s {{ if eq . $ }} selected{{ end }}">{{ .LinkTitle }}</a>
+            </li>
+            {{- end -}}
+          </ul>
+          {{- end -}}
+        </li>
+        <li class="s off">
+          {{- with $.Site.GetPage "/tags" -}}
+          <a href="{{ .RelPermalink }}" class="s">{{ .LinkTitle }}</a>
+          {{- end -}}
+        </li>
+        {{ end }}
+      </ul>
+    </li>
+    {{- else }}
+    <li class="s{{ if or .Pages .Sections}} sub{{ end }} off">
+      <a  href="{{ .RelPermalink }}" class="s">{{ .LinkTitle }}</a>
+      <ul class="s active">
+      {{- partial "menu/tree.html" (dict "pages" .Pages "page" $page) }}
+      </ul>
+    </li>
+    {{- end }}{{/* if */}}
+    {{- end }}{{/* with */}}
+    {{- end }}{{/* range */}}
+  </ul>
+  <hr class="n"/>
+</nav>
+{{ end }}
+
 {{- define "title" }}
   <h1>
     {{- with .OutputFormats.Get "rss" }}
@@ -8,7 +88,7 @@
         <path d="M4 4a16 16 0 0 1 16 16" />
         <circle cx="5" cy="19" r="1" />
       </svg>
-      Archive of all Blog-Articles
+      {{ ($.Site.GetPage $.Section).LinkTitle }}: {{ $.Title }}
     </a>
   </h1>
   {{- end }}