Break section template into first and descendent sections
First section templates render the most recent $n yearly subsections as a list of articles. Descendent sections render just the content of those subsections.
This commit is contained in:
parent
50dc3c45c1
commit
59ff58e159
6 changed files with 81 additions and 26 deletions
|
@ -1,17 +1,7 @@
|
|||
{{ define "main" }}
|
||||
<main class="main--list">
|
||||
<header class="page-header">
|
||||
{{ partial "page_header.html" (dict "page" .) }}
|
||||
</header>
|
||||
|
||||
{{- with .Content }}
|
||||
<div class="main__content">{{ . }}</div>
|
||||
{{ end -}}
|
||||
|
||||
{{ range .Pages.ByDate.Reverse -}}
|
||||
{{ if or (not .Draft) hugo.IsDevelopment }}
|
||||
{{ .Render "page_summary" }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ if eq . .FirstSection }}
|
||||
{{ partial "page/first_section.list.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "page/descendent_section.list.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue