Omphaloskepsis-2/layouts/blog/section.html

84 lines
2.1 KiB
HTML
Raw Permalink Normal View History

2022-11-10 22:48:02 -07:00
{{ define "title" }}
2025-03-02 22:41:10 +01:00
{{ .Page.Title | plainify }} |
{{ .Site.Title }}
2022-11-10 22:48:02 -07:00
{{ end }}
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-type" }}{{ .Params.mainType }}{{ end }}
{{ define "footer-scripts" }}
2024-07-23 10:08:36 +02:00
<script src="/js/lazy-images.js"></script>
2022-11-10 22:48:02 -07:00
{{ end }}
{{ 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>
2022-11-10 22:48:02 -07: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>
{{ 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" }}
{{ if eq .Type "blog" }}
2025-03-02 22:41:10 +01:00
{{ with .GetPage "blog/posts" }}
2022-11-10 22:48:02 -07:00
{{ partial "items-grid.html" . }}
2025-03-02 22:41:10 +01:00
{{ end }}
{{ else }}
{{ partial "items-grid.html" . }}
2022-11-10 22:48:02 -07:00
{{ end }}
{{ end }}