added dark theme option. It ìs selected automagically based on system choiche of...
[theme-danix.xyz.git] / layouts / partials / head.html
1 <head>
2 <meta charset="utf-8">
3 <meta name="viewport" content="width=device-width, initial-scale=1">
4 <meta name="color-scheme" content="light dark">
5 <link rel="profile" href="https://gmpg.org/xfn/11">
6
7
8 {{ $style_options := (dict "targetPath" "css/style.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
9 {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $style_options }}
10
11 {{ $noscript_options := (dict "targetPath" "css/noscript.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
12 {{ $noscript := resources.Get "sass/noscript.scss" | resources.ToCSS $noscript_options }}
13
14 <link rel="stylesheet" href="{{ $style.RelPermalink }}">
15 <link rel="stylesheet" href="{{ "css/syntax.css" |relURL }}">
16 <noscript><link rel="stylesheet" href="{{ $noscript.RelPermalink }}" ></noscript>
17 {{ partial "funcs/favicon.html" . }}
18 <link rel="canonical" href="{{ .Permalink }}">
19
20 {{ with .OutputFormats.Get "rss" -}}
21 {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
22 {{ end -}}
23
24 {{ $title := print .Site.Title " &hybull; " .Title | safeHTML }}
25 {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
26 <title>{{ $title }}</title>
27
28 {{ template "_internal/opengraph.html" . }}
29 {{ template "_internal/schema.html" . }}
30 {{ template "_internal/twitter_cards.html" . }}
31
32 {{- partial "head-addition.html" . -}}
33
34 </head>