Revert "hugo-bearblog : add smarter way to handle flickering on page load"

This reverts commit 00113c9222.
This commit is contained in:
minoplhy 2024-03-14 02:39:42 +07:00
parent 00113c9222
commit 63e45137af

View File

@ -17,7 +17,7 @@
<!-- External Script, Stylesheet linking --> <!-- External Script, Stylesheet linking -->
{{- /* CSS stylesheet */}} {{- /* CSS stylesheet */}}
{{- $stylesheet := (resources.Get "css/style.css") | resources.Minify }} {{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "css/style.css" | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }} {{- if not site.Params.assets.disableFingerprinting }}
{{- $stylesheet := $stylesheet | fingerprint }} {{- $stylesheet := $stylesheet | fingerprint }}
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style"> <link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
@ -41,16 +41,6 @@
</head> </head>
<body> <body>
{{- /* Bottom Javascript */}}
{{- $darkmode_load_script := (resources.Get "js/darkmode_load.js") | resources.Minify}}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $darkmode_load_script := $darkmode_load_script | fingerprint }}
<script defer crossorigin="anonymous" src="{{ $darkmode_load_script.RelPermalink }}" integrity="{{ $darkmode_load_script.Data.Integrity }}"></script>
{{ else }}
<script defer crossorigin="anonymous" src="{{ $darkmode_load_script.RelPermalink }}"></script>
{{ end }}
<header> <header>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
</header> </header>
@ -66,6 +56,15 @@
{{- partial "custom_footer.html" -}} {{- partial "custom_footer.html" -}}
</footer> </footer>
{{- /* Bottom Javascript */}}
{{- $darkmode_load_script := (resources.Get "js/darkmode_load.js") | resources.Minify}}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $darkmode_load_script := $darkmode_load_script | fingerprint }}
<script defer crossorigin="anonymous" src="{{ $darkmode_load_script.RelPermalink }}" integrity="{{ $darkmode_load_script.Data.Integrity }}"></script>
{{ else }}
<script defer crossorigin="anonymous" src="{{ $darkmode_load_script.RelPermalink }}"></script>
{{ end }}
<!-- A partial to be overwritten by the user. <!-- A partial to be overwritten by the user.
Simply place a custom_body.html into Simply place a custom_body.html into
your local /layouts/partials-directory --> your local /layouts/partials-directory -->