Files
rezepte/hugo/layouts/_default/baseof.html

74 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
<head>
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="canonical" href="{{ .Site.BaseURL }}">
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
{{ with .Site.Params.favicon }}
<link rel="icon" href="{{ . }}">
{{ end -}}
<!-- Stylesheets -->
{{ $style := resources.Get "css/main.css" | resources.Minify | resources.Fingerprint }}
<link rel='stylesheet' type='text/css' href="{{ $style.Permalink }}">
{{ $style := resources.Get "css/fonts.css" | resources.Minify | resources.Fingerprint }}
<link rel='stylesheet' type='text/css' href="{{ $style.Permalink }}">
{{ $style := resources.Get "css/dark.css" | resources.Minify | resources.Fingerprint }}
<link id="darkModeStyle" rel="stylesheet" type="text/css" href="{{ $style.Permalink }}"
{{ if eq .Site.Params.mode "auto" }} media="(prefers-color-scheme: dark)" {{ end }}
{{ if eq .Site.Params.mode "toggle" }} disabled {{ end }} >
<!-- Scripts -->
{{ $style := resources.Get "js/themetoggle.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $style.Permalink }}"></script>
<!-- Meta data -->
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
{{ if isset .Params "tags" }}
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
{{ end -}}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<meta charset="utf-8">
</head>
<body>
{{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
<main>
<header><h1 id="tag_{{ .Title }}">{{ block "title" . }}{{ end }}</h1></header>
<article>
{{ block "main" . }}
{{ .Content }}
{{ end }}
{{ if .Param "nextprev" }}{{ partial "nextprev.html" . -}}{{ end -}}
{{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end -}}
</article>
{{ if .Params.tags }}
<p style="margin-block-start: 3em;">Tags:
{{ $tags := .Params.tags }}
{{ range $index, $tag := $tags }}
<a href="{{ "tags/" | relLangURL }}{{ $tag | urlize }}">{{ $tag }}</a>{{ if lt (add $index 1) (len $tags) }}, {{ end }}
{{ end }}
</p>
{{ end }}
</main>
{{ block "footer" . }}
<footer>
<a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a>
*
<a href="/index.xml">rss feed</a>
*
<a id="dark-mode-toggle" onclick="toggleTheme()">toggle dark mode</a>
</footer>
{{ end }}
</body>
</html>