Omphaloskepsis-2/layouts/blog/section.html
2024-07-23 10:08:36 +02:00

60 lines
1.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ define "title" }}
{{ .Page.Title | plainify }} | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--section layouts-blog-section{{ end }}
{{ define "main-type" }}{{ .Params.mainType }}{{ end }}
{{ define "footer-scripts" }}
<script src="/js/lazy-images.js"></script>
{{ end }}
{{ define "main-header" }}
<header class="site-content__header">
<h2 class="page-title">{{ .Title | safeHTML }}
{{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }}
{{ range .AlternativeOutputFormats -}}
<a href="{{ .RelPermalink }}" aria-label="{{ $.Title }} RSS feed">
<img class="feed-icon" alt="RSS feed" src="{{ $.Site.Params.feedIcon }}">
</a>
{{ end }}
{{ 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 }}
{{ end }}
</h2>
{{ .Content }}
<nav class="page-header__minor-links">
<ul class="minor-links__categories">
<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 }}
</ul>
{{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }}
{{ partial "years-list.html" . }}
{{ end }}
{{ else }}
{{ partial "years-list.html" . }}
{{ end }}
</nav>
</header>
{{ end }}
{{ define "main-body" }}
{{ if eq .Type "blog" }}
{{ with .GetPage "blog/posts" }}
{{ partial "items-grid.html" . }}
{{ end }}
{{ else }}
{{ partial "items-grid.html" . }}
{{ end }}
{{ end }}