forked from withastro/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HeadCommon.astro
49 lines (45 loc) · 1.69 KB
/
HeadCommon.astro
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
---
import '@fontsource/ibm-plex-mono/400.css';
import '@fontsource/ibm-plex-mono/400-italic.css';
---
<!-- Global Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="theme-color" content="hsl(256, 44%, 15%)" media="(prefers-color-scheme: dark)" />
<meta name="theme-color" content="hsl(273, 37%, 93%)" media="(prefers-color-scheme: light)" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="alternate icon" type="image/x-icon" href="/favicon.ico" />
<link rel="sitemap" href="/sitemap-index.xml" />
<!-- Global CSS -->
<link rel="stylesheet" href="/theme.css" />
<link rel="stylesheet" href="/index.css" />
<!-- Scrollable a11y code helper -->
<script type="module" src="/make-scrollable-code-focusable.js"></script>
<!-- This is intentionally inlined to avoid FOUC -->
<script>
const root = document.documentElement;
const theme = localStorage.getItem('theme');
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
root.classList.add('theme-dark');
} else {
root.classList.remove('theme-dark');
}
</script>
<!-- Double-click to highlight code blocks (inline only). -->
<script>
document.addEventListener('dblclick', (el) => {
if (el.target.nodeName !== 'CODE') {
return;
}
if (el.target.parentElement.nodeName === 'PRE') {
return;
}
let range = new Range();
range.setStart(el.target, 0);
range.setEnd(el.target, 1);
document.getSelection().removeAllRanges();
document.getSelection().addRange(range);
});
</script>
<!-- Fathom - beautiful, simple website analytics -->
<script src="https://certain-quality.astro.build/script.js" data-site="EZBHTSIG" defer></script>