-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathBaseHead.astro
More file actions
35 lines (34 loc) · 985 Bytes
/
BaseHead.astro
File metadata and controls
35 lines (34 loc) · 985 Bytes
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
---
import '../styles/global.css';
---
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<link rel="icon" type="image/x-icon" href="/favicon-96.png" />
{
// @ts-ignore
import.meta.env.PROD && (
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DJRQC2FR73"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-DJRQC2FR73');
</script>
)}
<script is:inline>
if (
localStorage.theme === 'dark' ||
(!('theme' in localStorage) &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
</script>