2018-11-03 14:23:41 +00:00
|
|
|
{{ define "main" }}
|
2018-11-14 18:34:07 +00:00
|
|
|
<main class="main">
|
2019-01-14 15:14:41 +00:00
|
|
|
{{- if .Content }}
|
|
|
|
<div class="page block">
|
|
|
|
{{ with .Content }}<div class="page__content page__content--notitle">{{ . }}</div>{{ end }}
|
|
|
|
</div>
|
|
|
|
{{- end }}
|
2019-03-21 15:21:36 +00:00
|
|
|
{{- $mainSections := .Site.Params.mainSections }}
|
2019-01-14 15:14:41 +00:00
|
|
|
{{- $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }}
|
2019-04-27 14:55:46 +00: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 18:34:07 +00:00
|
|
|
</div>
|
2019-01-14 15:14:41 +00:00
|
|
|
{{- end }}
|
2019-01-14 14:26:42 +00:00
|
|
|
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
|
2018-11-14 18:34:07 +00: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 14:23:41 +00:00
|
|
|
{{ partial "pagination.html" . }}
|
|
|
|
{{ end }}
|