mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-05 06:13:14 +00:00
See https://discord.com/channels/722225264733716590/738924091511144489/1406144559188283494 See https://gohugo.io/templates/new-templatesystem-overview/
28 lines
926 B
HTML
28 lines
926 B
HTML
{{- define "main" -}}
|
|
|
|
{{ partial "page_header.html" . }}
|
|
|
|
<div class="universal-wrapper">
|
|
{{ with .Content }}
|
|
<div class="article-style">{{ . }}</div>
|
|
{{ end }}
|
|
|
|
|
|
{{ if templates.Exists (printf "_partials/views/%s-start.html" (lower $.Params.view | default "compact")) }}
|
|
{{ partial "functions/render_view" (dict "page" $ "item" . "view" (printf "%s-start" $.Params.view) "index" 0) }}
|
|
{{ end }}
|
|
|
|
{{ $paginator := .Paginate .Pages }}
|
|
{{ range $index, $post := $paginator.Pages }}
|
|
{{ partial "functions/render_view" (dict "page" $ "item" . "view" ($.Params.view | default "compact") "index" $index) }}
|
|
{{end}}
|
|
|
|
{{ if templates.Exists (printf "_partials/views/%s-end.html" (lower $.Params.view | default "compact")) }}
|
|
{{ partial "functions/render_view" (dict "page" $ "item" . "view" (printf "%s-end" $.Params.view) "index" 0) }}
|
|
{{ end }}
|
|
|
|
{{ partial "pagination" . }}
|
|
</div>
|
|
|
|
{{- end -}}
|