You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
3.4 KiB
HTML
66 lines
3.4 KiB
HTML
{{ if .Pages }}
|
|
{{ if .Params.paige.show_full_pages }}
|
|
{{ $p := .Paginate .Pages }}
|
|
<section>
|
|
{{ range $p.Pages }}
|
|
{{ .Scratch.Set "paige_show_full_pages" true }}
|
|
{{ partial "paige/article.html" . }}
|
|
{{ end }}
|
|
</section>
|
|
{{ if or $p.HasPrev $p.HasNext }}
|
|
<section>
|
|
<div class="d-flex justify-content-center">
|
|
{{ partial "paige/pagination.html" . }}
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
|
<section>
|
|
{{ range $p.PageGroups }}
|
|
<h2 class="{{ $.Param `paige.pages.header_class` | default `h5 text-center` }}">{{ .Key }}</h2>
|
|
{{ range .Pages }}
|
|
{{ $class := "text-center" }}
|
|
|
|
{{ $authors := cond ($.Param "paige.pages.show_authors" | not | not) (partial "paige/func-authors.html" .) "" }}
|
|
{{ $authorsclass := $.Param "paige.pages.authors_class" | default (print $class " text-secondary") }}
|
|
{{ $date := cond ($.Param "paige.pages.show_date" | not | not) .PublishDate "" }}
|
|
{{ $dateclass := $.Param "paige.pages.date_class" | default (print $class " text-secondary") }}
|
|
{{ $description := cond ($.Param "paige.pages.hide_description" | not) (.Description | markdownify) "" }}
|
|
{{ $descriptionclass := $.Param "paige.pages.description_class" | default $class }}
|
|
{{ $gap := "mb-0" }}
|
|
{{ $summary := cond ($.Param "paige.pages.show_summary" | not | not) (.Summary | strings.TrimPrefix "<p>" | strings.TrimSuffix "</p>") "" }}
|
|
{{ $summaryclass := $.Param "paige.pages.summary_class" | default $class }}
|
|
{{ $title := .Title | markdownify }}
|
|
{{ $titleclass := $.Param "paige.pages.title_class" | default $class }}
|
|
|
|
<p class="{{ if or $description $authors $date $summary }} {{ $gap }} {{ end }} {{ $titleclass }}">
|
|
<a href="{{ .RelPermalink }}">{{ $title | markdownify }}</a>
|
|
</p>
|
|
{{ with $description }}
|
|
<p class="{{ if or $authors $date $summary }} {{ $gap }} {{ end }} {{ $descriptionclass }}">{{ . }}</p>
|
|
{{ end }}
|
|
{{ with $authors }}
|
|
<p class="{{ if or $date $summary }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p>
|
|
{{ end }}
|
|
{{ with $date }}
|
|
<p class="{{ if $summary }} {{ $gap }} {{ end }} {{ $dateclass }}">
|
|
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format (site.Params.paige.date_format | default ":date_long") . }}</time>
|
|
</p>
|
|
{{ end }}
|
|
{{ if $summary }}
|
|
<p class="{{ $summaryclass }}">{{ $summary }}</p>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</section>
|
|
{{ if or $p.HasPrev $p.HasNext }}
|
|
<section>
|
|
<div class="d-flex justify-content-center">
|
|
{{ partial "paige/pagination.html" . }}
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|