Omphaloskepsis-2/layouts/blog/section.html

74 lines
1.9 KiB
HTML
Raw Normal View History

2023-08-07 18:23:46 -04:00
{{ define "main-class" }}--section layouts-blog-section{{ end }}
2022-11-10 22:48:02 -07:00
{{ define "main-header" }}
<header class="site-content__header">
2025-03-02 22:41:10 +01:00
<h2 class="page-title">
{{ .Title | safeHTML }}
{{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }}
2022-11-10 22:48:02 -07:00
{{ range .AlternativeOutputFormats -}}
2025-03-02 22:41:10 +01:00
<a
href="{{ .RelPermalink }}"
aria-label="{{ $.Title }} RSS feed"
>
<img
class="feed-icon"
alt="RSS feed"
src="{{ $.Site.Params.feedIcon }}"
/>
2022-11-10 22:48:02 -07:00
</a>
{{ end }}
2025-03-02 22:41:10 +01:00
{{ end }}
{{ else }}
{{ range .AlternativeOutputFormats -}}
<a
href="{{ .RelPermalink }}"
aria-label="{{ $.Title }} RSS feed"
>
<img
class="feed-icon"
alt="RSS feed"
src="{{ $.Site.Params.feedIcon }}"
/>
</a>
{{ end }}
2023-06-30 21:16:59 -06:00
{{ end }}
</h2>
2025-03-02 22:41:10 +01:00
2025-06-06 17:01:20 +02:00
{{ .Content }}
2025-03-02 22:41:10 +01:00
2022-11-10 22:48:02 -07:00
<nav class="page-header__minor-links">
<ul class="minor-links__categories">
2025-03-02 22:41:10 +01:00
<li>
<a href="/series"><h3>Series</h3></a>
<p>({{ len .Site.Taxonomies.series }})</p>
</li>
{{ range .Site.Taxonomies.categories }}
<li>
<a href="{{ .Page.RelPermalink }}"><h3>{{ .Page.Title | safeHTML }}</h3></a>
<p>({{ len . }})</p>
</li>
{{ end }}
2022-11-10 22:48:02 -07:00
</ul>
2025-06-06 17:01:20 +02:00
2022-11-10 22:48:02 -07:00
{{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }}
{{ partial "years-list.html" . }}
{{ end }}
{{ else }}
2025-03-02 22:41:10 +01:00
{{ partial "years-list.html" . }}
2022-11-10 22:48:02 -07:00
{{ end }}
</nav>
</header>
{{ end }}
{{ define "main-body" }}
2025-06-06 17:01:20 +02:00
{{- if eq .Type "blog" -}}
{{- with .GetPage "blog/posts" -}}
{{- partial "items-grid.html" . -}}
{{- end -}}
{{- else -}}
{{- partial "items-grid.html" . -}}
{{- end -}}
2022-11-10 22:48:02 -07:00
{{ end }}