Commit 2a3ffd8
committed
fix: theme toggle now detects system theme and works on first click
Fixes #42
- Add initialization effect to detect existing theme from index.html or fall back to system theme
- Change classList.toggle to explicit remove/add to prevent class conflicts
- Remove both 'dark' and 'light' classes before adding current theme
- Ensures public notes pages respect system theme on load
- Fixes double-click requirement for theme switching1 parent 2a64ba5 commit 2a3ffd8
1 file changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
617 | 632 | | |
618 | 633 | | |
619 | | - | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
620 | 638 | | |
621 | 639 | | |
622 | 640 | | |
| |||
0 commit comments