hugo-theme-more-contentful/layouts/_default/list.html
Gabriel Arazas 023c34c22a Update the site layout
Made the resulting HTML cleaner and added a color to the border for more
personality.
2020-12-23 18:20:16 +08:00

22 lines
666 B
HTML

{{ define "main" }}
<section>
{{ .Content }}
</section>
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
Otherwise, we take the pages of a section. */ -}}
{{- $pages := .Pages }}
{{- if .IsHome }}
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{- end }}
{{- range (.Paginate $pages).Pages }}
<article class="post">
<h1><a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
{{ partial "partials/components/post-meta.html" . }}
</article>
{{- end }}
{{- partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }}
{{- end }}