92 lines
4.2 KiB
HTML
92 lines
4.2 KiB
HTML
{{ define "main" }}
|
|
{{ $paginator := .Paginate .Data.Pages }}
|
|
|
|
<main class="posts">
|
|
<h1>{{ .Title }}</h1>
|
|
{{ if .Params.subtitle }}
|
|
<strong>{{ .Params.subtitle | markdownify }}</strong>
|
|
{{ end }}
|
|
|
|
{{ if .Content }}
|
|
<div class="content">{{ .Content }}</div>
|
|
{{ end }}
|
|
|
|
{{ range $paginator.Pages.GroupByDate "2006" }}
|
|
<div class="posts-group">
|
|
<div class="post-year">{{ .Key }}</div>
|
|
|
|
<ul class="posts-list">
|
|
{{ range .Pages }}
|
|
|
|
<!-- TBD: If marked Hidden or Release date is in the future, skip. -->
|
|
|
|
<li class="post-item">
|
|
<a href="{{.Permalink}}" class="post-item-inner">
|
|
<span class="post-title">
|
|
{{ if .Params.draft }}
|
|
{{ print "(DRAFT) "}}
|
|
{{ end }}
|
|
|
|
{{ if .Params.pinned }}
|
|
<img style="display: inline-block; vertical-align: middle; margin-right: 4px;"
|
|
src="/feathericons/16px-a9a9b3/paperclip.svg" alt="Pinned:"
|
|
>
|
|
{{ end }}
|
|
|
|
{{ if .Params.video }}
|
|
Video:
|
|
{{ else if .Params.audio }}
|
|
Audio:
|
|
{{ else if .Params.tags }}
|
|
{{ $prefix := (index .Params.tags 0 | title) }}
|
|
{{ if eq $prefix "Ebook" }}
|
|
eBook:
|
|
{{ else }}
|
|
{{ $prefix }}:
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ .Title }}{{ if and (.Params.subtitle) (and (.Params.author) (.Params.date)) }}
|
|
{{ "--" | markdownify }} {{ .Params.subtitle}}
|
|
{{ end }}
|
|
|
|
{{ if .Params.feathericon }}
|
|
<img style="display: inline-block; vertical-align: middle; margin-right: 4px;"
|
|
src="/feathericons/16px-a9a9b3/{{ print .Params.feathericon }}.svg" alt=""
|
|
>
|
|
{{ else if .Params.video }}
|
|
<img style="display: inline-block; vertical-align: middle; margin-right: 4px;"
|
|
src="/feathericons/16px-a9a9b3/film.svg" alt="(VIDEO)"
|
|
>
|
|
{{ else if .Params.audio }}
|
|
<img style="display: inline-block; vertical-align: middle; margin-right: 4px;"
|
|
src="/feathericons/16px-a9a9b3/music.svg" alt="(AUDIO)"
|
|
>
|
|
{{ end }}
|
|
</span>
|
|
<span class="post-day">
|
|
<!-- TBD: Show the Release attribute if later than Date. -->
|
|
{{ if .Site.Params.dateformShort }}
|
|
{{ time.Format .Site.Params.dateformShort .Date }}
|
|
{{ else }}
|
|
{{ time.Format "Jan 2" .Date }}
|
|
{{ end }}
|
|
</span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
{{ partial "pagination-list.html" . }}
|
|
</main>
|
|
{{ end }}
|
|
ist.html" . }}
|
|
</main>
|
|
{{ end }}
|
|
|
|
|
|
{{ partial "pagination-list.html" . }}
|
|
</main>
|
|
{{ end }}
|