fix white flashbang
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 8s
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 8s
This commit is contained in:
+20
@@ -6,6 +6,26 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content="Sarlink Portal" />
|
||||
<title>SAR Link Portal</title>
|
||||
<script>
|
||||
// Set theme BEFORE first paint to avoid a flash of white.
|
||||
// The white flash is the browser's default canvas, shown before CSS
|
||||
// paints (paint is delayed by the render-blocking font stylesheet).
|
||||
// `color-scheme` controls that pre-paint canvas, so setting it here —
|
||||
// synchronously, before the font <link> below can block — fixes it.
|
||||
// Mirrors next-themes ("theme" key; falls back to system preference).
|
||||
(function () {
|
||||
try {
|
||||
var stored = localStorage.getItem("theme");
|
||||
var isDark =
|
||||
stored === "dark" ||
|
||||
((!stored || stored === "system") &&
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches);
|
||||
var root = document.documentElement;
|
||||
root.classList.toggle("dark", isDark);
|
||||
root.style.colorScheme = isDark ? "dark" : "light";
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
|
||||
Reference in New Issue
Block a user