Files
HugoBlox-kit/wowchemy/layouts/_default/list.html
T
George Cushen db4dcf6541 feat: support view for course archive & custom section archives
The fullback list view for archive pages did not previously support the `view` option, instead presenting lists in one specific format.

If a user creates a custom section name (e.g. `content/prj/`) that doesn't correspond with a built-in page type, they now have the option not to use the default list view by defining `view` in the associated `_index.md` file.

See https://github.com/wowchemy/wowchemy-hugo-modules/discussions/2323
2021-06-06 14:07:13 +01:00

27 lines
575 B
HTML

{{- define "main" -}}
{{ partial "page_header.html" . }}
<div class="universal-wrapper">
{{ with .Content }}
<div class="article-style">{{ . }}</div>
{{ end }}
{{ $paginator := .Paginate .Pages }}
{{ range $paginator.Pages }}
{{ if eq $.Params.view 1 }}
{{ partial "li_list" . }}
{{ else if eq $.Params.view 3 }}
{{ partial "li_card" . }}
{{ else if eq $.Params.view 4 }}
{{ partial "li_citation" . }}
{{ else }}
{{ partial "li_compact" . }}
{{ end }}
{{ end }}
{{ partial "pagination" . }}
</div>
{{- end -}}