hugo-owu-se/layouts/partials/custom_head.html

26 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2024-03-16 03:43:42 +00:00
<link rel="icon" type="image/png" sizes="180x180" href="/images/icon/favicon-180x180.png">
2024-03-14 13:54:24 +00:00
<link rel="icon" type="image/png" sizes="32x32" href="/images/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/icon/favicon-16x16.png">
2024-03-10 15:27:36 +00:00
{{ if (.Eq (site.GetPage "/")) }}
2024-03-12 09:12:11 +00:00
{{- $randomize := (resources.Get "js/randomize.js" ) }}
{{- $image_array := (resources.Get "js/image-array.js" ) }}
{{- $text_array := (resources.Get "js/text-array.js" )}}
{{- $randomize_combined := slice $image_array $text_array $randomize | resources.Concat "js/random.js" | resources.Minify }}
2024-03-10 15:27:36 +00:00
{{- if not site.Params.assets.disableFingerprinting }}
2024-03-12 09:12:11 +00:00
{{- $randomize_combined := $randomize_combined | fingerprint }}
2024-03-14 06:02:17 +00:00
<script defer crossorigin="anonymous" src="{{ $randomize_combined.RelPermalink }}" integrity="{{ $randomize_combined.Data.Integrity }}"></script>
2024-03-10 15:27:36 +00:00
{{ else }}
2024-03-14 06:02:17 +00:00
<script defer crossorigin="anonymous" src="{{ $randomize_combined.RelPermalink }}"></script>
2024-03-10 15:27:36 +00:00
{{ end }}
{{ end }}
{{- /* specials CSS stylesheet */}}
{{- $special_stylesheet := (resources.Get "css/specials.css") | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $special_stylesheet := $special_stylesheet | fingerprint }}
<link crossorigin="anonymous" href="{{ $special_stylesheet.RelPermalink }}" integrity="{{ $special_stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
{{ else }}
<link crossorigin="anonymous" href="{{ $special_stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{ end }}