Files
veridian/app/app.vue
T
zoeissleeping fc5aedcedd reafctor: Rely only on the database for themes
This commit makes it so that a user's theme will only be pulled from the
database rather than from a weird mix of cookies and the database. This
fixes some issues with themes rendering weirdly.
2026-02-24 16:35:40 +00:00

49 lines
1.2 KiB
Vue

<script setup lang="ts">
import '~/assets/css/reset.css';
import '~/assets/css/base.css';
const { accent, neutral, hinting } = await useUserSettings();
// by default, disable hinting
if (Number.isNaN(Number(hinting.value))) hinting.value = '0';
watchEffect(() => {
useHead({
htmlAttrs: {
style: `
--neutral-100: var(--palette-${neutral.value}-100);
--neutral-200: var(--palette-${neutral.value}-200);
--neutral-300: var(--palette-${neutral.value}-300);
--color-accent: var(--accent-${accent.value}, var(--accent-violet));
--color-accent-hover: var(--accent-${accent.value}-hover, var(--accent-violet-hover));
--accent-hinting: ${hinting.value}%;
--base-hinting: calc(100% - var(--accent-hinting));`,
},
});
});
if (import.meta.client) {
// force shiki into browser rendering only
window.sessionStorage.setItem('mdc-shiki-highlighter', 'browser');
}
</script>
<template>
<NuxtLoadingIndicator />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
<NuxtRouteAnnouncer />
</template>
<style>
body {
height: 100%;
}
#__nuxt {
padding: 0.5rem;
height: 100%;
display: flex;
}
</style>