]> 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, 22 Nov 2025 11:20:03 +0000 (12:20 +0100)
hugo/themes/thymeleaf/layouts/_partials/header.html
hugo/themes/thymeleaf/layouts/baseof.html

index 7980a00e1e2613fa8adc68e98a99460bd6131422..46ee169ad02c79219b8829292fb43fa9f5d77942 100644 (file)
@@ -1,2 +1,29 @@
-<h1>{{ site.Title }}</h1>
+<h1 class="short_title">{{ site.Title }}</h1>
+<h2>URI</h2>
+<ul>
+  <li><strong>site:</strong> <code class="site_uri">/hibernate-maven-plugin/index.html</code></li>
+  <li><strong>canonical:</strong> <code class="canonical_uri">/hibernate-maven-plugin/index.html</code></li>
+  <li><strong>relative:</strong> <code class="relative_uri">index.html</code></li>
+</ul>
+<h2>Path</h2>
+<p>
+  <ol>
+    <li><a href="index.html">Hibernate Maven Plugin</a></li>
+    {{- $url := replace .Parent.Permalink (printf "%s" site.Home.Permalink) "" }}
+    {{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
+
+    <li><a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Blog" }}</a></li>
+    {{- $scratch := newScratch }}
+    {{- range $index, $element := split $lang_url "/" }}
+
+    {{- $scratch.Add "path" (printf "%s/" $element )}}
+    {{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
+
+    {{- if (and ($bc_pg) (gt (len . ) 0))}}
+    <li><a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a></li>
+    {{- end }}
+
+    {{- end -}}
+  </ol>
+</p>
 {{ 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>