runtimeterror/layouts/partials/aside.html

65 lines
1.8 KiB
HTML
Raw Permalink Normal View History

{{ if .Params.description }}<p>{{ .Params.description }}</p><hr>{{ end }}
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
<p>
2024-07-24 02:00:16 +00:00
<h3>on this page</h3>
{{ .TableOfContents }}
2023-09-18 00:20:17 +00:00
<hr>
</p>
2023-08-22 00:54:33 +00:00
{{ end }}
2024-01-18 22:06:53 +00:00
{{ if isset .Params "categories" }}
{{$related := where .Site.RegularPages ".Params.categories" "eq" .Params.categories }}
2023-09-12 22:02:42 +00:00
{{- $relatedLimit := default 8 .Site.Params.numberOfRelatedPosts }}
{{ if eq .Params.categories "slashes" }}
2024-07-24 02:00:16 +00:00
<h3>more /slashes</h3>
2024-05-29 20:21:45 +00:00
{{ $sortedPosts := sort $related "Title" }}
<ul>
{{- range $sortedPosts }}
<li>
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
{{ else }}
2024-06-29 02:17:25 +00:00
<h3>more {{ lower .Params.categories }}</h3>
2023-09-12 22:02:42 +00:00
<ul>
{{- range first $relatedLimit $related }}
<li>
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
{{ if gt (len $related) $relatedLimit }}
2024-05-29 20:21:45 +00:00
<li>
<a href="/categories/{{ lower .Params.categories }}/"><i>See all {{ .Params.categories }}</i></a>
</li>
{{ end }}
2023-09-12 22:02:42 +00:00
</ul>
2024-05-29 20:21:45 +00:00
{{ end }}
2023-09-12 22:02:42 +00:00
<hr>
{{ end }}
2023-08-22 00:54:33 +00:00
{{- $posts := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{- $featured := default 8 .Site.Params.numberOfFeaturedPosts }}
{{- $featuredPosts := first $featured (where $posts "Params.featured" true)}}
{{- with $featuredPosts }}
2024-06-29 02:17:25 +00:00
<h3>features</h3>
2023-08-22 00:54:33 +00:00
<ul>
{{- range . }}
<li>
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
</li>
{{- end }}
</ul>
{{- end }}
{{ with .Site.Params.omgUser }}
2023-12-11 16:12:57 +00:00
<hr>
2023-12-12 14:31:41 +00:00
<h3>status.lol</h3>
2024-08-04 18:20:08 +00:00
<script src="https://status.lol/{{ . }}.js?time&link&fluent&pretty" defer></script>
{{ end }}
{{ with .Site.Params.musicThreadId }}
2024-06-29 02:14:51 +00:00
<hr>
<h3>current theme song</h3>
2024-08-04 18:19:40 +00:00
<script src="https://res.runtimeterror.dev/js/theme-song.js?id={{ . }}" defer></script>
{{ end }}
2024-06-18 16:15:59 +00:00