Skip to content

Commit aedb853

Browse files
author
15363205631
committed
1
1 parent 3fa6f4d commit aedb853

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

src/hooks.server.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/lib/ZHeader/HeaderCfg.js

Whitespace-only changes.

src/lib/ZThemeBtn/ZThemeBtn.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
let { initTheme } = $props();
77
8-
let BtnList = $state([false, true, false]);
8+
let BtnList = $state([false, false, false]);
99
let currentBtn = $state();
1010
1111
function setTheme(theme) {
@@ -29,11 +29,11 @@
2929
3030
// init theme button
3131
if (initTheme === 'Light') {
32-
BtnList[0] = true;
32+
setCurrentBtn(0);
3333
} else if (initTheme === 'Dark') {
34-
BtnList[1] = true;
34+
setCurrentBtn(1);
3535
} else {
36-
BtnList[2] = true;
36+
setCurrentBtn(2);
3737
}
3838
$inspect(initTheme)
3939
</script>

src/routes/docs/[doc]/+page.svelte

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
let c = $state('sun');
1212
13-
if(data.c === 'moon'){
13+
if (data.c === 'Dark') {
1414
c = 'moon';
1515
}
1616
@@ -19,11 +19,20 @@
1919
};
2020
2121
let md = $state('# hello world');
22-
const plugins = [gfmPlugin(),headingIdPlugin];
22+
const plugins = [gfmPlugin(), headingIdPlugin];
2323
</script>
2424

25-
<H1 h = {data.h1}></H1>
26-
<H1 h = {data.c}></H1>
27-
<ZIcon option = {c}></ZIcon>
28-
25+
<div>
26+
<H1 h={data.h1}></H1>
27+
<H1 h={data.c}></H1>
28+
<ZIcon option={c}></ZIcon>
29+
</div>
2930
<Markdown md={data.mdContent} {plugins} />
31+
32+
<style>
33+
div :global{
34+
svg *{
35+
fill:var(--all-svg-color);
36+
}
37+
}
38+
</style>

0 commit comments

Comments
 (0)