You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.5 KiB
149 lines
4.5 KiB
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
<meta charset="UTF-8" />
|
|
<meta name="author"
|
|
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}" />
|
|
<meta name="description"
|
|
content="{{ if .Site.Params.description }}{{ .Site.Params.description }}{{ else if .Page.Params.description }}{{ .Page.Params.description }}{{ else }}{{ .Description | default ( .Summary | plainify | truncate 100 ) }}{{ end }}" />
|
|
<meta name="keywords"
|
|
content="{{ .Site.Params.keywords }}{{ if .Params.tags }}{{ range .Params.tags }}, {{ . }}{{ end }}{{ end }}" />
|
|
<meta name="robots" content="noodp" />
|
|
<meta name="theme-color" content="{{ if .Params.background }}{{ .Params.background }}{{ else }}#1F78D1{{ end }}" />
|
|
<link rel="canonical" href="{{ .Permalink }}" />
|
|
|
|
{{ block "title" . }}
|
|
<title>
|
|
{{ if .IsHome }} {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }} {{ else }} {{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }} {{ end }}
|
|
</title>
|
|
{{ end }}
|
|
|
|
<!-- CSS -->
|
|
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
|
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS $options }}
|
|
|
|
{{ if hugo.IsProduction }}
|
|
{{ $style = $style | resources.PostCSS | resources.Fingerprint "sha256" }}
|
|
{{ end }}
|
|
|
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
|
|
|
{{ range $val := $.Site.Params.customCSS }} {{ if gt (len $val) 0 }}
|
|
<link rel="stylesheet" type="text/css" href="{{ $val }}" integrity="{{ $style.Data.Integrity }}" />
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
<script>
|
|
function fadeInPage() {
|
|
if (!window.AnimationEvent) { return; }
|
|
var fader = document.getElementById('fader');
|
|
fader.classList.add('fade-out');
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
if (!window.AnimationEvent) { return }
|
|
|
|
var anchors = document.getElementsByTagName('a');
|
|
|
|
for (var idx = 0; idx < anchors.length; idx += 1) {
|
|
if (anchors[idx].hostname !== window.location.hostname) {
|
|
continue;
|
|
}
|
|
|
|
anchors[idx].addEventListener('click', function (event) {
|
|
var fader = document.getElementById('fader'),
|
|
anchor = event.currentTarget;
|
|
|
|
var listener = function () {
|
|
window.location = anchor.href;
|
|
fader.removeEventListener('animationend', listener);
|
|
};
|
|
fader.addEventListener('animationend', listener);
|
|
|
|
event.preventDefault();
|
|
fader.classList.add('fade-in');
|
|
});
|
|
}
|
|
});
|
|
|
|
window.addEventListener('pageshow', function (event) {
|
|
if (!event.persisted) {
|
|
return;
|
|
}
|
|
var fader = document.getElementById('fader');
|
|
fader.classList.remove('fade-in');
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
#fader {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 999999;
|
|
pointer-events: none;
|
|
background: white;
|
|
animation-duration: 300ms;
|
|
animation-timing-function: ease-in-out;
|
|
}
|
|
|
|
#fader:before {
|
|
content: 'fade'
|
|
}
|
|
|
|
@keyframes fade-out {
|
|
from {
|
|
opacity: 1
|
|
}
|
|
|
|
to {
|
|
opacity: 0
|
|
}
|
|
}
|
|
|
|
@keyframes fade-in {
|
|
from {
|
|
opacity: 0
|
|
}
|
|
|
|
to {
|
|
opacity: 1
|
|
}
|
|
}
|
|
|
|
#fader.fade-out {
|
|
opacity: 0;
|
|
animation-name: fade-out;
|
|
}
|
|
|
|
#fader.fade-in {
|
|
opacity: 1;
|
|
animation-name: fade-in;
|
|
}
|
|
</style>
|
|
|
|
<!-- Icons -->
|
|
{{- partial "favicons.html" . }} {{- template "_internal/schema.html" . }} {{- template "_internal/opengraph.html" . }} {{- template "_internal/twitter_cards.html" . }} {{ range .Params.categories }}
|
|
<meta property="article:section" content="{{ . }}" />
|
|
{{ end }}
|
|
{{ if isset .Params "date" }}
|
|
<meta property="article:published_time" content="{{ time .Date }}" />
|
|
{{ end }}
|
|
|
|
<!-- RSS -->
|
|
{{ with .OutputFormats.Get "rss" -}}
|
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s"/>` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
|
{{ end -}}
|
|
|
|
<!-- JSON Feed -->
|
|
{{ if .OutputFormats.Get "json" }}
|
|
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" type="application/json" title="{{ .Site.Title }}" /> {{ end }}
|
|
|
|
<!-- Plausible -->
|
|
<script defer data-domain="ura.design" src="https://stats.ura.design/js/plausible.js"></script>
|
|
|
|
<!-- Custom head tags -->
|
|
{{- if templates.Exists "partials/extra-head.html" -}}
|
|
{{ partial "extra-head.html" . }}
|
|
{{- end }}
|