Syllabus/themes/sandpoints/layouts/partials/head.html

47 lines
2.2 KiB
HTML

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
{{ if .Description }}
<meta name="description" content="{{ .Description }}" />
{{ end }}
{{ if .Keywords }}
<meta name="keywords" content="{{ delimit .Keywords "," }}" />
{{ end }}
{{ if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" />
{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
{{ hugo.Generator }}
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#996561">
{{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }}
{{ $sitemin := resources.Get "css/site.min.css" }}
<link rel="stylesheet" href="{{ $sitemin.RelPermalink }}" />
{{ $player := resources.Get "css/player.min.css" }}
<link rel="stylesheet" href="{{ $player.RelPermalink }}" />
{{ else if (or (eq hugo.Environment "offline") (.Site.IsServer)) }}
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
{{ $style := resources.Get "css/player.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
{{ end }}
<script type="text/javascript">var relPathDepth = {{ .RelPermalink | strings.Count "/" }};</script>
{{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}}
{{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }}
<script defer src='{{ $sjs.RelPermalink }}' type="application/javascript"></script>
<title>{{ block "title" . }}{{- .Title }} - {{ .Site.Title -}}{{ end }}</title>
</head>