WIP: completely custom theme #41

Draft
june wants to merge 6 commits from feature/custom-theme into main
Showing only changes of commit 6675cefc52 - Show all commits

View file

@ -1,16 +1,16 @@
{{ define "main" }} {{ define "main" }}
<main class="container" aria-role="main"> <main class="container" aria-role="main">
<div class="homepage-content"> <section class="homepage-content">
{{ .Content }} {{ .Content }}
</div> </section>
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }} {{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
{{- $upcoming := where $events ".Params.date" "ge" now }} {{- $upcoming := where $events ".Params.date" "ge" now }}
{{ if $upcoming }} {{ if $upcoming }}
<div class="announcements"> <section class="announcements">
<h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2> <h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
{{- range $upcoming.ByDate }} {{- range $upcoming.ByDate }}
<div class="announcement"> <article class="announcement">
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }} {{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
{{- if in .RawContent "<!--more-->" }} {{- if in .RawContent "<!--more-->" }}
@ -18,15 +18,15 @@
{{- else }} {{- else }}
<p>{{ .Summary | safeHTML }}</p> <p>{{ .Summary | safeHTML }}</p>
{{- end }} {{- end }}
</div> </article>
{{- end }} {{- end }}
</div> </section>
{{- end }} {{- end }}
{{- $home := .Site.GetPage "/home" }} {{- $home := .Site.GetPage "/home" }}
{{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }} {{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }}
{{- range sort $sections "File.Path" "asc" }} {{- range sort $sections "File.Path" "asc" }}
<div class="section"> <section class="section">
{{- $hdg_id := .Title | lower | safeURL }} {{- $hdg_id := .Title | lower | safeURL }}
<h2 id="{{ $hdg_id }}" class="on-hover-trg">{{ .Title }} <a href="#{{ $hdg_id }}" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2> <h2 id="{{ $hdg_id }}" class="on-hover-trg">{{ .Title }} <a href="#{{ $hdg_id }}" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
{{ .Content -}} {{ .Content -}}
@ -62,7 +62,7 @@
{{- end }} {{- end }}
</div> </div>
{{- end }} {{- end }}
</div> </section>
{{ end }} {{ end }}
</main> </main>