2018-11-03 10:23:41 -04:00
|
|
|
{{ define "main" }}
|
2018-11-14 13:34:07 -05:00
|
|
|
<main class="main">
|
2019-08-20 09:23:14 -04:00
|
|
|
{{- with .Content }}
|
2019-01-14 10:14:41 -05:00
|
|
|
<div class="page block">
|
2019-08-20 09:23:14 -04:00
|
|
|
<div class="page__content page__content--notitle">{{ . }}</div>
|
2019-01-14 10:14:41 -05:00
|
|
|
</div>
|
|
|
|
{{- end }}
|
2019-03-21 11:21:36 -04:00
|
|
|
{{- $mainSections := .Site.Params.mainSections }}
|
2019-08-17 09:50:33 -04:00
|
|
|
{{- $paginator := .Paginate (where .Site.RegularPages "Type" "in" $mainSections) }}
|
2019-04-27 10:55:46 -04:00
|
|
|
{{- if gt $paginator.TotalNumberOfElements 0 }}
|
|
|
|
<div class="cards">
|
|
|
|
{{- range $paginator.Pages }}
|
|
|
|
<div class="card{{ if and (ge ($.Param "columns") 1) (le ($.Param "columns") 3) }} card--{{ $.Param "columns" }}col{{ else }} card--2col{{ end }}">
|
|
|
|
{{ .Render "summary" }}
|
|
|
|
</div>
|
|
|
|
{{- end }}
|
2018-11-14 13:34:07 -05:00
|
|
|
</div>
|
2019-01-14 10:14:41 -05:00
|
|
|
{{- end }}
|
2019-01-14 09:26:42 -05:00
|
|
|
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
|
2018-11-14 13:34:07 -05:00
|
|
|
<div class="empty block center">
|
|
|
|
<div class="empty__icon">¯\_(ツ)_/¯</div>
|
|
|
|
<h3 class="empty__title">{{ T "empty_title" }}</h3>
|
|
|
|
<p class="empty__text">{{ T "empty_text_start" | safeHTML }} ({{ delimit (apply $mainSections "printf" "<code>content/%s</code>" ".") ", " | safeHTML }}), {{ T "empty_text_end" }}.</p>
|
|
|
|
<p class="empty__tip">{{ T "empty_tip" | safeHTML }}</p>
|
|
|
|
</div>
|
|
|
|
{{- end }}
|
|
|
|
</main>
|
2018-11-03 10:23:41 -04:00
|
|
|
{{ partial "pagination.html" . }}
|
|
|
|
{{ end }}
|