mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-27 09:02:19 +00:00
64 lines
1.8 KiB
HTML
64 lines
1.8 KiB
HTML
{{ if .Params.description }}<p>{{ .Params.description }}</p><hr>{{ end }}
|
|
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
|
|
<p>
|
|
<h3>on this page</h3>
|
|
{{ .TableOfContents }}
|
|
<hr>
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ if isset .Params "categories" }}
|
|
{{$related := where .Site.RegularPages ".Params.categories" "eq" .Params.categories }}
|
|
{{- $relatedLimit := default 8 .Site.Params.numberOfRelatedPosts }}
|
|
{{ if eq .Params.categories "slashes" }}
|
|
<h3>more /slashes</h3>
|
|
{{ $sortedPosts := sort $related "Title" }}
|
|
<ul>
|
|
{{- range $sortedPosts }}
|
|
<li>
|
|
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ else }}
|
|
<h3>more {{ lower .Params.categories }}</h3>
|
|
<ul>
|
|
{{- range first $relatedLimit $related }}
|
|
<li>
|
|
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ if gt (len $related) $relatedLimit }}
|
|
<li>
|
|
<a href="/categories/{{ lower .Params.categories }}/"><i>See all {{ .Params.categories }}</i></a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
<hr>
|
|
{{ end }}
|
|
|
|
{{- $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 }}
|
|
<h3>features</h3>
|
|
<ul>
|
|
{{- range . }}
|
|
<li>
|
|
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title | markdownify }}</a>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|
|
{{- end }}
|
|
{{ with .Site.Params.omgUser }}
|
|
<hr>
|
|
<h3>status.lol</h3>
|
|
<script src="https://status.lol/{{ . }}.js?time&link&fluent&pretty" defer></script>
|
|
{{ end }}
|
|
{{ with .Site.Params.musicThreadId }}
|
|
<hr>
|
|
<h3>current theme song</h3>
|
|
<script src="https://res.runtimeterror.dev/js/theme-song.js?id={{ . }}" defer></script>
|
|
{{ end }}
|
|
|