mishig HF staff commited on
Commit
f08464b
1 Parent(s): b9b7060

accept `/?__theme=dark`

Browse files
Files changed (1) hide show
  1. src/routes/+layout.svelte +6 -0
src/routes/+layout.svelte CHANGED
@@ -1,5 +1,11 @@
1
  <script>
2
  import "../app.css";
 
 
 
 
 
 
3
  </script>
4
 
5
  <slot></slot>
 
1
  <script>
2
  import "../app.css";
3
+ import { browser } from '$app/environment';
4
+ import { page } from '$app/stores';
5
+
6
+ $: if (browser && $page.url.searchParams.get('__theme') === 'dark') {
7
+ document.documentElement.classList.add('dark');
8
+ }
9
  </script>
10
 
11
  <slot></slot>