initial styling of the print stylesheet. Needs working.
[theme-danix.xyz.git] / layouts / partials / head.html
CommitLineData
213775dd 1<head>
2 <meta charset="utf-8">
3 <meta name="viewport" content="width=device-width, initial-scale=1">
cb4379e1 4 <meta name="color-scheme" content="light dark">
213775dd 5 <link rel="profile" href="https://gmpg.org/xfn/11">
a3fbbedb 6
0605a97a 7 {{ $style_options := (dict "targetPath" "css/style.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
494780c7 8 {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $style_options | fingerprint }}
a3fbbedb 9
f945c30b 10 {{ $noscript_options := (dict "targetPath" "css/noscript.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
494780c7 11 {{ $noscript := resources.Get "sass/noscript.scss" | resources.ToCSS $noscript_options | fingerprint }}
f945c30b 12
0605a97a 13 <link rel="stylesheet" href="{{ $style.RelPermalink }}">
82a7af14 14 <link rel="stylesheet" href="{{ "css/syntax.css" |relURL }}">
8158405e 15 <noscript><link rel="stylesheet" href="{{ $noscript.RelPermalink }}" ></noscript>
494780c7 16
17 {{ if eq "curriculum" .Type }}
18 {{ $print_style_options := (dict "targetPath" "css/print.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
19 {{ $print_style := resources.Get "sass/print.scss" | resources.ToCSS $print_style_options | fingerprint }}
20 <link media="print" rel="stylesheet" href="{{ $print_style.RelPermalink }}">
21 {{ end }}
22
213775dd 23 {{ partial "funcs/favicon.html" . }}
24 <link rel="canonical" href="{{ .Permalink }}">
25
26 {{ with .OutputFormats.Get "rss" -}}
27 {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
28 {{ end -}}
29
26ee5f4d 30 {{ $title := print .Site.Title " &hybull; " .Title | safeHTML }}
213775dd 31 {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
32 <title>{{ $title }}</title>
33
34 {{ template "_internal/opengraph.html" . }}
35 {{ template "_internal/schema.html" . }}
36 {{ template "_internal/twitter_cards.html" . }}
37
38 {{- partial "head-addition.html" . -}}
39
40</head>