1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-18 06:42:10 +00:00
seirdy.one/themes/etch-custom/layouts/partials/head.html
rohan kumar 19520825bb
Icons 2: electric boogaloo
- More sizes
- webmanifest file for even more versions
- symlink icons instead of copying them; fewer binaries in the repo.
2020-12-14 22:11:33 -08:00

43 lines
2.6 KiB
HTML

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}">
{{ end }}
{{- $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" integrity="%s">` $icon_192.RelPermalink $icon_192.Data.Integrity | safeHTML }}
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="icon" sizes="32x32" href="%s" type="image/png" integrity="%s">` $favicon.RelPermalink $favicon.Data.Integrity | safeHTML -}}
<!--apple-touch-icon and mask-icon used to be appple-specific, but now
they're pseudo-standards relied upon by other vendors too. See
https://html.spec.whatwg.org/multipage/semantics.html#attr-link-sizes-->
{{ printf `<link rel="apple-touch-icon" href="%s" integrity="%s">` $icon_192.RelPermalink $icon_192.Data.Integrity | safeHTML }}
{{ $mask_icon := resources.Get "/mask.svg" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="mask-icon" href="%s" integrity="%s" color="black">` $mask_icon.RelPermalink $mask_icon.Data.Integrity | safeHTML }}
<link rel="manifest" href="{{ .Site.BaseURL }}manifest.webmanifest">
<link rel="alternate" type="application/rss+xml" href="{{ .Site.BaseURL }}posts/index.xml" title="{{ $.Site.Title }}"/>
{{ if eq .Site.BaseURL "https://envs.net/~seirdy/" -}}
<meta name="robots" content="noindex">
{{ else -}}
<link rel="canonical" href="https://seirdy.one{{ .RelPermalink }}"/>
{{ end -}}
{{ $resources := slice -}}
{{ $resources = $resources | append (resources.Get "/css/main.css") -}}
{{ $resources = $resources | append (resources.Get "/css/narrow.css") -}}
{{ $dark := .Site.Params.dark | default "auto" -}}
{{ if not (eq $dark "off") -}}
{{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
{{ end -}}
{{ $css := $resources | resources.Concat "css/style.css" | minify | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="stylesheet" href="%s" integrity="%s">` $css.RelPermalink $css.Data.Integrity | safeHTML }}
{{ if .Params.highlight -}}
{{ $css_syntax := resources.Get "/css/syntax.css" | minify | resources.Fingerprint "sha384" }}
{{- printf `<link rel="stylesheet" href="%s" integrity="%s">` $css_syntax.RelPermalink $css_syntax.Data.Integrity | safeHTML }}
{{ end -}}
{{ if eq .RelPermalink "/" -}}
<title>{{ .Title }}</title>
{{ else -}}
<title>{{ .Title }} - Seirdy</title>
{{ end -}}
</head>