gcg-website/layouts/partials/head.html
Denys Konovalov 323559c90f
All checks were successful
website-main / prod-build (push) Successful in 10s
website-main / test-build (push) Successful in 7s
add lcp preload
2024-01-20 20:38:43 +01:00

67 lines
2.4 KiB
HTML

<head>
<meta charset="utf-8">
<title>{{ .Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ hugo.Generator }}
{{ range .Site.Params.plugins.css }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{ end }}
{{ $style := resources.Get "css/style.css" | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}" media="screen">
<link rel="shortcut icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
<link rel="icon" href="{{ `media/favicon.png` | absURL }}" type="image/x-icon">
{{ range .Site.Params.plugins.head_js }}
<script src="{{ . | absURL }}" type="text/javascript"></script>
{{ end }}
<!-- jquery passive listener fixes -->
<script>
jQuery.event.special.touchstart = {
setup: function( _, ns, handle ) {
this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") });
}
};
jQuery.event.special.touchmove = {
setup: function( _, ns, handle ) {
this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") });
}
};
jQuery.event.special.wheel = {
setup: function( _, ns, handle ){
this.addEventListener("wheel", handle, { passive: true });
}
};
jQuery.event.special.mousewheel = {
setup: function( _, ns, handle ){
this.addEventListener("mousewheel", handle, { passive: true });
}
};
</script>
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
{{ partial "opengraph" . }}
{{ partial "twitter" . }}
{{ if eq .Page.RelPermalink "/" }}
<link rel="preload" fetchpriority="high" as="image" href="/media/home/banner.webp" type="image/webp">
{{ else }}
<link rel="preload" fetchpriority="high" as="image" href="/media/titelbild.webp" type="image/webp">
{{ end }}
</head>
<div id="pagefind-search" class="modal fade" data-pagefind-ignore>
<div class="modal-dialog modal-xl modal-dialog-scrollable modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div id="search"></div>
</div>
</div>
</div>
</div>