diff --git a/app/composables/ui_color.ts b/app/composables/ui_color.ts new file mode 100644 index 0000000..42b938d --- /dev/null +++ b/app/composables/ui_color.ts @@ -0,0 +1,16 @@ +import type {CookieRef} from "#app"; + +export function ui_color_cookie(): CookieRef { + + const c = useCookie("ui_color",{ + default: () => "green", + + }); + watch(c, (newVal, oldVal) => { + document.body.classList.remove(oldVal); + document.body.classList.add(newVal); + }) + + return c; + +} \ No newline at end of file