kobel/layouts/_default/list.html
2023-12-27 00:23:25 +01:00

28 lines
No EOL
770 B
HTML

{{ define "main" }}
{{ if .Title }}
<!-- TODO -->
<div class="content">
<article>
<div class="title">
<h1>{{ .Title }}</h1>
<div class="divider"></div>
</div>
{{.Content}}
</article>
<div class="list">
{{ range .Pages }}
<a href="{{.Permalink}}"><p>{{ .Title }}</p></a>
{{ end }}
</div>
</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 }}