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.
103 lines
4.1 KiB
HTML
103 lines
4.1 KiB
HTML
{{ $page := . }}
|
|
|
|
{{ $authors := partial "paige/authors.html" $page | and ($page.Parent.Param "paige.list_page.hide_authors" | not) }}
|
|
{{ $categories := $page.GetTerms "categories" }}
|
|
{{ $date := $page.PublishDate | and ($page.Parent.Param "paige.list_page.hide_date" | not) }}
|
|
{{ $dateformat := $page.Parent.Param "paige.date_format" | default ":date_long" }}
|
|
{{ $description := $page.Description | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.list_page.hide_description" | not) }}
|
|
{{ $draft := $page.Draft }}
|
|
{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }}
|
|
{{ $flags := slice }}
|
|
{{ $future := and $page.PublishDate (gt $page.PublishDate now) }}
|
|
{{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }}
|
|
{{ $readingtime := $page.ReadingTime | and ($page.Parent.Param "paige.list_page.hide_reading_time" | not) }}
|
|
{{ $series := $page.GetTerms "series" | and ($page.Parent.Param "paige.list_page.hide_series" | not) }}
|
|
{{ $summary := $page.Summary | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.list_page.hide_summary" | not) }}
|
|
{{ $tags := $page.GetTerms "tags" }}
|
|
{{ $textkeywords := eq ($page.Parent.Param "paige.keyword_style" | default "text") "text" }}
|
|
{{ $title := $page.Title | markdownify | plainify | htmlUnescape | and ($page.Parent.Param "paige.list_page.hide_title" | not) }}
|
|
{{ $titlelink := $page.RelPermalink }}
|
|
|
|
{{ if $draft }}
|
|
{{ $flags = $flags | append "paige-draft" "paige-unpublished" }}
|
|
{{ end }}
|
|
|
|
{{ if $expired }}
|
|
{{ $flags = $flags | append "paige-expired" "paige-unpublished" }}
|
|
{{ end }}
|
|
|
|
{{ if $future }}
|
|
{{ $flags = $flags | append "paige-future" "paige-unpublished" }}
|
|
{{ end }}
|
|
|
|
{{ if $modified }}
|
|
{{ $flags = $flags | append "paige-modified" }}
|
|
{{ end }}
|
|
|
|
{{ if not (or $draft $expired $future) }}
|
|
{{ $flags = $flags | append "paige-published" }}
|
|
{{ end }}
|
|
|
|
{{ $class := delimit (slice "paige-page" "w-100" | append $flags | uniq | sort) " " }}
|
|
{{ $keywords := sort (append $categories $tags) "Title" | and ($page.Parent.Param "paige.list_page.hide_keywords" | not) }}
|
|
|
|
<div class="{{ $class }}">
|
|
{{ with $title }}
|
|
<p class="paige-row-narrow paige-title text-center"><a href="{{ $titlelink }}">{{ . }}</a></p>
|
|
{{ end }}
|
|
|
|
{{ with $description }}
|
|
<p class="paige-description paige-row-narrow text-center">{{ . }}</p>
|
|
{{ end }}
|
|
|
|
{{ with $summary }}
|
|
<p class="fst-italic paige-row-narrow paige-summary text-center">{{ . }}</p>
|
|
{{ end }}
|
|
|
|
{{ with $keywords }}
|
|
<p class="paige-keywords paige-row-narrow text-center text-secondary">
|
|
{{ range $i, $term := . -}}
|
|
{{- if $textkeywords -}}
|
|
{{- if gt $i 0 }} · {{ end -}}
|
|
|
|
<a class="link-secondary" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
|
|
{{- else -}}
|
|
{{- if gt $i 0 }} {{ end -}}
|
|
|
|
<a class="badge paige-keyword text-bg-secondary text-decoration-none" href="{{ .RelPermalink | safeURL }}">{{ .Title }}</a>
|
|
{{- end -}}
|
|
{{- end }}
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ with $series }}
|
|
<p class="paige-row-narrow paige-series text-center text-secondary">
|
|
{{ range $i, $series := . -}}
|
|
{{- if gt $i 0 }} · {{ end -}}
|
|
|
|
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
{{- end }}
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ with $authors }}
|
|
<p class="paige-authors text-center paige-row-narrow text-secondary">
|
|
{{ range $i, $author := . -}}
|
|
{{- if gt $i 0 }} · {{ end -}}
|
|
|
|
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
{{- end }}
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ with $date }}
|
|
<p class="paige-date text-center paige-row-narrow text-secondary">
|
|
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ with $readingtime }}
|
|
<p class="paige-reading-time paige-row-narrow text-center text-secondary">{{ . }} {{ i18n "paige_minutes" . }}</p>
|
|
{{ end }}
|
|
</div>
|