]> juplo.de Git - website/commitdiff
WAR: thymeleaf-theme: Added template `archives.html` (based on PaperMod)
authorKai Moritz <kai@juplo.de>
Fri, 19 Dec 2025 00:38:51 +0000 (01:38 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 19 Dec 2025 00:38:51 +0000 (01:38 +0100)
layouts/baseof.html
layouts/blog/section.html

index aa820cc5e960fc5685c6d6c752c9e1aa131d50b0..58611b42e0aad32d18e70689649e570be90dc88c 100644 (file)
@@ -9,7 +9,11 @@
     {{- partial "breadcrumb.html" . }}
     <main class="content cf">
         <article id="content" class="main">
-          <header><h1>{{ .Title }}</h1></header>
+          <header>
+            {{- block "title" . }}
+            <h1>{{ .Title }}</h1>
+            {{ end }}
+          </header>
           {{- block "main" . }}{{ end }}
         </article>
         <div class="marginal">
index 229ebc2972dc3eeb76d567b8607987cb7db50f11..46d76f6469c8999f1feccfd24b16f59d65a66575 100644 (file)
@@ -1,6 +1,4 @@
-{{- define "main" }}
-
-<header class="page-header">
+{{- define "title" }}
   <h1>
     {{ .Title }}
     {{- if (.Param "ShowRssButtonInSectionTermList") }}
@@ -25,8 +23,9 @@
     {{ .Description }}
   </div>
   {{- end }}
-</header>
+{{- end }}
 
+{{- define "main" }}
 {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
 
 {{- if site.Params.ShowAllPagesInArchive }}
@@ -41,7 +40,6 @@
     <a class="archive-header-link" href="#{{ $year }}">
       {{- $year -}}
     </a>
-    <sup class="archive-count">&nbsp;{{ len .Pages }}</sup>
   </h2>
   {{- range .Pages.GroupByDate "January" }}
   <div class="archive-month">
@@ -50,7 +48,7 @@
       {{- if eq .Kind "page" }}
       <div class="archive-entry">
         <h3 class="archive-entry-title entry-hint-parent">
-          {{- .Title | markdownify }}
+          <a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}">{{- .Title | markdownify }}</a>
           {{- if .Draft }}
           <span class="entry-hint" title="Draft">
             <svg xmlns="http://www.w3.org/2000/svg" height="15" viewBox="0 -960 960 960" fill="currentColor">
@@ -63,7 +61,6 @@
         <div class="archive-meta">
           {{- partial "post_meta.html" . -}}
         </div>
-        <a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
       </div>
       {{- end }}
       {{- end }}