hermit-V2/layouts/_default/baseof.html

50 lines
2.4 KiB
HTML
Raw Normal View History

2018-10-23 01:15:50 -04:00
<!DOCTYPE html>
<html lang="{{.Site.LanguageCode}}">
<head>
2023-10-28 12:55:23 -04:00
{{- partial "analytics.html" . }}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{{- with .Site.Params.themeColor }}
<meta name="theme-color" content="{{.}}">
<meta name="msapplication-TileColor" content="{{.}}">
{{- end -}}
{{- partial "structured-data.html" . -}}
{{- partial "favicons.html" -}}
<title>{{.Title}}</title>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Title | safeHTML }}
{{ end -}}
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous">
{{- range .Params.custom_css -}}<link rel="stylesheet" href="{{ . | absURL }}">{{- end -}}
{{- block "head" . -}}{{- end }}
{{- if templates.Exists "partials/extra-head.html" -}}{{ partial "extra-head.html" . }}{{- end }}
2018-10-23 01:15:50 -04:00
</head>
<body id="page">
{{ block "header" . -}}{{ end -}}
{{ block "main" . -}}{{ end -}}
{{ block "footer" . -}}{{ end }}
2023-08-06 09:16:12 -04:00
{{ partial "scroll-to-top.html" . }}
{{ $main := resources.Get "js/main.js" -}}
{{ if .Site.Params.code_copy_button | default true -}}
{{ $codeCopy := resources.Get "js/code-copy.js" -}}
{{ $script := slice $main $codeCopy | resources.Concat "js/bundle.js" | minify | fingerprint -}}
2023-08-19 03:24:17 -04:00
<script async src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
{{ else -}}
{{ $script := $main | minify | fingerprint -}}
2023-08-19 03:24:17 -04:00
<script async src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
2023-11-06 03:18:30 -05:00
{{- end -}}
{{- if and (not (eq .Site.Params.shareSocial nil)) (.Site.Params.shareSocial) -}}
2023-11-06 03:26:39 -05:00
{{ $linkshare := resources.Get "js/link-share.js" | fingerprint -}}
2023-11-06 03:18:30 -05:00
<script async src="{{ $linkshare.Permalink }}" {{ printf "integrity=%q" $linkshare.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
{{- end -}}
{{ range .Params.custom_js -}}<script type="text/javascript" src="{{ . | absURL }}"></script>{{- end }}
2023-08-19 03:24:17 -04:00
{{ partial "mathjax.html" . }}
2023-11-06 03:18:30 -05:00
{{- if templates.Exists "partials/extra-foot.html" -}}{{ partial "extra-foot.html" . }}{{- end }}
2018-10-23 01:15:50 -04:00
</body>
</html>