WIP: start page with header

This commit is contained in:
Hoernschen 2023-12-24 00:01:53 +01:00
parent 9d834470a6
commit 06b0b4d643
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
18 changed files with 1683 additions and 9 deletions

View file

@ -0,0 +1,23 @@
{{ define "main" }}
{{ if .Content }}
<!-- TODO -->
<div class="content">
{{ with .Title }}
<div class="title">
<h1 class="content-title">{{ . }}</h1>
<div class="divider"></div>
</div>
{{ end }}
{{.Content}}
</div>
{{ else }}
<div class="header-blocker"></div>
{{ end }}
{{- range $index, $page := .Pages }}
{{ $odd := mod $index 2 }}
{{ $id := .Params.id | default $page.File.ContentBaseName }}
{{ if eq .Params.type "hero" }}
{{- partial "hero.html" (dict "id" $id "hero" .Params "content" .Content "odd" $odd) -}}
{{ end}}
{{ end }}
{{ end }}