mirror of
https://github.com/foo-dogsquared/hugo-theme-contentful.git
synced 2025-01-31 16:57:56 +00:00
052e7703ab
Along with some improved formatting of some modules. The changelog should be enough to make what changes have occured.
26 lines
928 B
HTML
26 lines
928 B
HTML
{{ define "main" }}
|
|
<hr>
|
|
{{ .Content }}
|
|
|
|
{{- /* 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 (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}
|
|
<article class="post">
|
|
<h1><a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
|
|
<div class="post__meta">
|
|
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
|
|
{{- if ne .Date .Lastmod }}
|
|
(Modified on <time datetime="{{ .Lastmod.Format "2006-01-02" }}">{{ .Lastmod.Format "2006-01-02" }}</time>)
|
|
{{- end }}
|
|
</div>
|
|
</article>
|
|
{{ end }}
|
|
|
|
{{ partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }}
|
|
{{ end }}
|