]> juplo.de Git - website/commitdiff
WIP:thymeleaf
authorKai Moritz <kai@juplo.de>
Sat, 22 Nov 2025 11:20:03 +0000 (12:20 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 29 Nov 2025 08:54:33 +0000 (09:54 +0100)
hugo/themes/thymeleaf/layouts/_partials/header.html
hugo/themes/thymeleaf/layouts/baseof.html

index 98aa0e3d284b9c0cea198e2ee34dc0edb9eb0a25..9d95bf041623f9ece206bba799387da4cb3d7064 100644 (file)
@@ -1,4 +1,11 @@
-<h1>{{ site.Title }}</h1>
+<h1 class="short_title">{{ site.Title }}</h1>
+<h2>URI</h2>
+<ul>
+  <li><strong>site:</strong> <code class="site_uri">{{ .RelPermalink }}</code></li>
+  <li><strong>canonical:</strong> <code class="canonical_uri">{{ .Permalink }}</code></li>
+  <li><strong>relative:</strong> <code class="relative_uri">{{ .RelPermalink }}</code></li>
+  <li><strong>logical path:</strong> <code class="logical_path">{{ .Path }}</code></li>
+</ul>
 <h2>Hugo</h2>
 <ul>
   <li><strong>.Path:</strong> <code class="logical_path">{{ .Path }}</code></li>
@@ -7,4 +14,18 @@
   <li><strong>.CurrentSection:</strong> <code class="">{{ .CurrentSection }}</code></li>
   <li><strong>.Data.Term:</strong> <code class="">{{ .Data.Term }}</code></li>
 </ul>
+<h2>Path</h2>
+<p>
+  <ol>
+    {{ range .Ancestors.Reverse }}
+    <li>
+      <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
+    </li>
+    {{ end }}
+    <li class="active">
+      <a aria-current="page" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
+    </li>
+  </ol>
+</p>
+<h2>Menu</h2>
 {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
index 39dcbec61fc7176b6b73a802b29dcc4508775836..5ed599025184d47705a61416cf2c9b1b575fc147 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
+<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}" th:replace="~{/templates/layout.html :: layout(uri='' + ~{:: code[class='site_uri']/text()}, title=~{:: title}, maincontent=~{:: .maincontent}, json='MERGE:' + ~{:: pre[class='json']/text()})}">
 <head>
   {{ partial "head.html" . }}
 </head>