generated from garronej/keycloakify-demo-app
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
93 lines (77 loc) · 3.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- TODO: Set dynamically https://stackoverflow.com/questions/32330305/update-theme-color-meta-without-page-refresh -->
<meta name="theme-color" content="#2C323F">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- spell-checker: disable -->
<title>SSP Cloud - Espace communautaire pour la statistique publique.</title>
<!-- spell-checker: enable -->
<!-- start favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="/favicon_package/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon_package/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon_package/favicon-16x16.png">
<link rel="manifest" href="/favicon_package/site.webmanifest">
<link rel="mask-icon" href="/favicon_package/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<!-- end favicon -->
<link rel="preload" href="/fonts/WorkSans/worksans-bold-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-medium-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-regular-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="/fonts/WorkSans/worksans-semibold-webfont.woff2" as="font" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/fonts/WorkSans/font.css">
<!--
<link rel="preload" href="%PUBLIC_URL%/fonts/Marianne/Marianne-Bold_Italic.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="%PUBLIC_URL%/fonts/Marianne/Marianne-Bold.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="%PUBLIC_URL%/fonts/Marianne/Marianne-Light_Italic.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="%PUBLIC_URL%/fonts/Marianne/Marianne-Light.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="%PUBLIC_URL%/fonts/Marianne/Marianne-Regular_Italic.woff2" as="font" crossorigin="anonymous">
<link rel="preload" href="%PUBLIC_URL%/fonts/Marianne/Marianne-Regular.woff2" as="font" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/fonts/Marianne/font.css">
-->
<script>
/*
This is a way to get the correct background color as soon as possible,
even before the JavaScript bundle is evaluated.
It is to prevent a white flash when the user has dark mode enabled.
It is very implementation dependent and can easily break...
if it does no big deal.
*/
(function () {
var isDarkModeEnabled = /true/.test((function () {
var key = "powerhooks_useGlobalState_isDarkModeEnabled";
var value = null;
try {
value = (new URLSearchParams(location.search)).get(key);
} catch (_) { }
if (value !== null) {
return value;
}
try {
value = localStorage.getItem(key);
} catch (_) { }
if (value !== null) {
return value;
}
try {
value = window.matchMedia("(prefers-color-scheme: dark)")
.matches ? "true" : "false";
} catch (_) { }
if (value !== null) {
return value;
}
return "false";
})());
document.documentElement.style.backgroundColor =
//getColor("light"|"dark").useCases.surfaces.background in src/theme/colors.ts
isDarkModeEnabled ? "#2C323F" : "#F1F0EB";
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>