feat: Implement core application layout, global styling, dark mode, and essential UI components.

This commit is contained in:
supalerk-ar66 2026-01-26 12:59:19 +07:00
parent 84e4d478c7
commit a2ce1d79a2
7 changed files with 87 additions and 67 deletions

View file

@ -0,0 +1,10 @@
export default defineNuxtPlugin(() => {
// Client-side only theme initialization to prevent flash of wrong theme
if (process.client) {
const saved = localStorage.getItem('theme')
const isDark = saved === 'dark' || (!saved && window.matchMedia('(prefers-color-scheme: dark)').matches)
// Apply class immediately for Tailwind
document.documentElement.classList.toggle('dark', isDark)
}
})