hugo-bearblog/layouts/_default/baseof.html

76 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{- partial "favicon.html" . -}}
<title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title>
{{- partial "seo_tags.html" . -}}
<meta name="referrer" content="no-referrer-when-downgrade" />
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<!-- External Script, Stylesheet linking -->
{{- /* CSS stylesheet */}}
{{- $stylesheet := (resources.Get "css/style.css") | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $stylesheet := $stylesheet | fingerprint }}
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
{{ else }}
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{ end }}
{{- /* Javascript */}}
{{- $darkmode_script := (resources.Get "js/darkmode.js") | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $darkmode_script := $darkmode_script | fingerprint }}
<script async crossorigin="anonymous" src="{{ $darkmode_script.RelPermalink }}" integrity="{{ $darkmode_script.Data.Integrity }}"></script>
{{ else }}
<script async crossorigin="anonymous" src="{{ $darkmode_script.RelPermalink }}"></script>
{{ end }}
<!-- A partial to be overwritten by the user.
Simply place a custom_head.html into
your local /layouts/partials-directory -->
{{- partial "custom_head.html" . -}}
</head>
<body>
<header>
{{- partial "header.html" . -}}
</header>
<main>
{{- block "main" . }}{{- end }}
</main>
<footer>
{{- partial "footer.html" . -}}
<!-- A partial to be overwritten by the user.
Simply place a custom_footer.html into
your local /layouts/partials-directory -->
{{- partial "custom_footer.html" -}}
</footer>
{{- /* Bottom Javascript */}}
{{- $darkmode_load_script := (resources.Get "js/darkmode_load.js") | resources.Minify}}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $darkmode_load_script := $darkmode_load_script | fingerprint }}
<script defer crossorigin="anonymous" src="{{ $darkmode_load_script.RelPermalink }}" integrity="{{ $darkmode_load_script.Data.Integrity }}"></script>
{{ else }}
<script defer crossorigin="anonymous" src="{{ $darkmode_load_script.RelPermalink }}"></script>
{{ end }}
<!-- A partial to be overwritten by the user.
Simply place a custom_body.html into
your local /layouts/partials-directory -->
{{- partial "custom_body.html" . -}}
</body>
</html>