mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-15 04:46:58 +01:00
47 lines
1,018 B
HTML
47 lines
1,018 B
HTML
{{ define "main" }}
|
|
<div id="layout">
|
|
<article>
|
|
|
|
{{ partial "brand.html" . }}
|
|
{{ partial "content.header.html" . }}
|
|
|
|
<!-- https://discourse.gohugo.io/t/how-to-build-one-collection-for-all-nested-sections/27950/5 -->
|
|
{{ with .Content }}
|
|
<section>
|
|
{{ . }}
|
|
</section>
|
|
{{ end }}
|
|
|
|
<section class="list-page">
|
|
<!-- preambles -->
|
|
|
|
<ul>
|
|
{{ range .Pages.ByTitle }}
|
|
{{ if .IsPage }}
|
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}{{- if .Draft -}} :: Draft {{- end -}}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
|
|
<!-- sub categories & pages -->
|
|
|
|
{{ $indexScratch := .Scratch }}
|
|
{{ range .Sections }}
|
|
{{ $indexScratch.Add "sections" (slice . ) }}
|
|
{{ end }}
|
|
|
|
{{- range ($indexScratch.Get "sections").ByTitle -}}
|
|
<p><a href="{{ .RelPermalink }}">{{ .Title }}{{- if .Draft -}} :: Draft {{- end -}}</a></p>
|
|
<ul>
|
|
{{- range .Pages.ByTitle -}}
|
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}{{- if .Draft -}} :: Draft {{- end -}}</a></li>
|
|
{{- end -}}
|
|
</ul>
|
|
{{- end -}}
|
|
</section>
|
|
|
|
{{ partial "footer.html" . }}
|
|
|
|
</article>
|
|
</div>
|
|
{{ end }}
|