-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.astro
More file actions
23 lines (21 loc) · 622 Bytes
/
index.astro
File metadata and controls
23 lines (21 loc) · 622 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
import { Sun, Moon } from '@images/components'
import styles from './index.module.css'
---
<div class={styles.themeSwitch} title="Toggle Theme" id="theme-toggle">
<label for="toggle" class={styles.checkbox}>
<span class={styles.label}>Toggle Theme</span>
<input
type="checkbox"
name="toggle"
id="toggle"
aria-describedby="theme-toggle"
/>
<div aria-live="assertive">
<Sun id="sun" />
<Moon id="moon" hidden="true" />
</div>
</label>
</div>
<!-- ./theme.cjs is symlinked to public/theme.js before build -->
<script is:inline src="/theme.js" defer></script>