refactor: repartition server-side and client-side code

This commit is contained in:
LIlGG
2025-10-11 18:26:07 +08:00
parent 7acc4949fb
commit e9b573a276
309 changed files with 631 additions and 962 deletions

View File

@@ -0,0 +1,15 @@
import { atom } from 'nanostores';
export const kSidebar = 'upage_sidebar';
export const DEFAULT_SIDEBAR_STATE = false;
export const sidebarStore = atom<boolean>(DEFAULT_SIDEBAR_STATE);
export function toggleSidebar() {
const currentSidebar = sidebarStore.get();
const newSidebar = !currentSidebar;
// Update the theme store
sidebarStore.set(newSidebar);
}