kobel/layouts/_default/list.html

26 lines
718 B
HTML
Raw Normal View History

2023-12-23 23:01:53 +00:00
{{ define "main" }}
2023-12-26 23:23:25 +00:00
{{ if .Title }}
2023-12-23 23:01:53 +00:00
<!-- TODO -->
<div class="content">
2023-12-26 23:23:25 +00:00
<article>
<div class="title">
<h1>{{ .Title }}</h1>
<div class="divider"></div>
</div>
2023-12-23 23:01:53 +00:00
{{.Content}}
2023-12-26 23:23:25 +00:00
</article>
<div class="list">
{{ range .Pages }}
<a href="{{.Permalink}}"><p>{{ .Title }}</p></a>
{{ end }}
</div>
2023-12-23 23:01:53 +00:00
</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 }}