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" }}
<main class="container" aria-role="main">
<div class="homepage-content">
<section class="homepage-content">
{{ .Content }}
</div>
</section>
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
{{- $upcoming := where $events ".Params.date" "ge" now }}
{{ 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>
{{- range $upcoming.ByDate }}
<div class="announcement">
<article class="announcement">
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
{{- if in .RawContent "<!--more-->" }}
@ -18,15 +18,15 @@
{{- else }}
<p>{{ .Summary | safeHTML }}</p>
{{- end }}
</div>
</article>
{{- end }}
</div>
</section>
{{- end }}
{{- $home := .Site.GetPage "/home" }}
{{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }}
{{- range sort $sections "File.Path" "asc" }}
<div class="section">
<section class="section">
{{- $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>
{{ .Content -}}
@ -62,7 +62,7 @@
{{- end }}
</div>
{{- end }}
</div>
</section>
{{ end }}
</main>