1
1
Fork 0
website/themes/meins/layouts/_default/baseof.html

54 Zeilen
2.2 KiB
HTML

2022-06-26 19:55:39 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
{{- $sourcemap := "" -}}
{{- if not hugo.IsProduction -}}
{{- $sourcemap = "inline" -}}
{{- end -}}
{{- $cssoptions := (dict "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction))
-}}
{{- $jsoptions := (dict "minify" (not hugo.IsProduction) "format" "esm" "sourceMap" $sourcemap ) -}}
{{- $scss := resources.Get "css/style.scss" | toCSS $cssoptions | fingerprint "sha512" -}}
{{- $module := resources.Get "js/index.ts" | js.Build $jsoptions | fingerprint "sha512" -}}
<link rel="stylesheet" href="{{ $scss.RelPermalink }}" integrity="{{ $scss.Data.Integrity}}">
<script name="/main" type="module" src="{{ $module.RelPermalink }}" integrity="{{ $module.Data.Integrity }}"></script>
<script type="module">
import { init } from "{{ $module.RelPermalink }}";
init();
</script>
<title>{{.Title}}</title>
<meta name="referrer" content="no-referrer">
<meta name="color-scheme" content="light dark black">
{{- range (slice "description" ) -}}
{{- $header := . -}}
{{- if in $.Params $header -}}
<meta name="{{ $header }}" content="{{ .Param $header }}">
{{- end -}}
{{- end -}}
</head>
<body>
<div role="none" class="colorscheme">
<input class="theme" id="auto" selected type="radio" name="colorscheme">
<label for="auto">{{ partial "icon" "auto" }}</label>
{{ range (slice "light" "dark" "black") }}
<input class="theme" id="{{ . }}" type="radio" name="colorscheme">
<label for="{{ . }}">{{ partial "icon" . }}</label>
{{ end }}
</div>
<header></header>
{{ if .Site.Menus.main }}
<ul role="navigation" aria-label="Main" class="menu">
{{ range .Site.Menus.main }}
<li>
<a href="{{.URL}}">{{ .Name}}</a>
</li>
{{ end }}
</ul>
{{ end }}
<main>{{ block "main" . }}
{{ .Content }}
{{ end }}</main>
<footer>{{ block "footer" . }}{{ end }}</footer>
</body>
</html>