mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-22 19:02:18 +00:00
92 lines
No EOL
3.4 KiB
HTML
92 lines
No EOL
3.4 KiB
HTML
{{ $pages := .Pages }}
|
|
{{ if .IsHome }}
|
|
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
{{ end }}
|
|
<header class="content__header">
|
|
{{ if .IsHome }}
|
|
<h1>{{ site.Params.indexTitle | markdownify }}</h1>
|
|
{{ else }}
|
|
{{ if eq .Title "/slashes" }}
|
|
<h1>{{ .Title | markdownify }}</h1>
|
|
<i>My collection of <a target="_blank" title="what's a slashpage?" href="https://slashpages.net">slash pages</a>.</i><hr>
|
|
{{ else }}
|
|
<h1>{{ .Title | markdownify }}{{ if eq .Kind "term" }} <a target="_blank" href="{{ .Permalink }}feed.xml" aria-label="{{ .Title }} RSS" title="{{ .Title }} RSS"><i class="fa-solid fa-square-rss"></i></a> </h1>
|
|
{{ with .Description }}<i>{{ . }}</i><hr>{{ else }}<br>{{ end }}
|
|
{{ end }}
|
|
{{ end }}{{ end }}
|
|
{{ .Content }}
|
|
</header>
|
|
|
|
{{- if eq .Kind "taxonomy" }}
|
|
{{- if eq .Title "Tags" }}
|
|
{{/* list of all tags */}}
|
|
<div class="tagsArchive">
|
|
{{- range $key, $value := .Site.Taxonomies }}
|
|
{{- $slicedTags := ($value.ByCount) }}
|
|
{{- range $slicedTags }}
|
|
{{- if eq $key "tags"}}
|
|
<div><a href='/{{ $key }}/{{ (replace .Name "#" "%23") | urlize }}/' title="{{ .Name }}">{{ .Name }}</a><sup>{{ .Count }}</sup></div>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
</div>
|
|
{{- else }}
|
|
{{/* list of all categories */}}
|
|
{{- range .Pages.ByDate.Reverse }}
|
|
{{- $postDate := .Date.Format "2006-01-02" }}
|
|
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
|
<article class="post">
|
|
<header class="post__header">
|
|
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
|
<p class="post__meta">
|
|
<span class="date">["{{ with $updateDate }}{{ . }}{{ else }}{{ .Date }}{{ end }}"]</span>
|
|
</p>
|
|
</header>
|
|
<section class="post__summary">
|
|
{{ .Description }}
|
|
</section>
|
|
<hr>
|
|
</article>
|
|
{{ end }}
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- if eq .Title "/slashes" }}
|
|
{{/* slash page archive */}}
|
|
{{- $sortedSlashes := sort $pages "Title" }}
|
|
{{- range $sortedSlashes }}
|
|
{{- $postDate := .Date.Format "2006-01-02" }}
|
|
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
|
<article class="post">
|
|
<header class="post__header">
|
|
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
|
<p class="post__meta">
|
|
<span class="date">["{{ with $updateDate }}{{ . }}{{ else }}{{ $postDate }}{{ end }}"]</span>
|
|
</p>
|
|
</header>
|
|
<section class="post__summary">
|
|
{{ .Description }}
|
|
</section>
|
|
<hr>
|
|
</article>
|
|
{{- end }}
|
|
{{- else }}
|
|
{{/* regular posts archive */}}
|
|
{{- range (.Paginate $pages).Pages }}
|
|
{{- $postDate := .Date.Format "2006-01-02" }}
|
|
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
|
<article class="post">
|
|
<header class="post__header">
|
|
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
|
<p class="post__meta">
|
|
<span class="date">["{{- $postDate }}"{{- if ne $postDate $updateDate }}, "{{ $updateDate }}"{{ end }}]</span>
|
|
</p>
|
|
</header>
|
|
<section class="post__summary">
|
|
{{if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}
|
|
</section>
|
|
<hr>
|
|
</article>
|
|
{{- end }}
|
|
{{- template "_internal/pagination.html" . }}
|
|
{{- end }}
|
|
{{- end }} |