flatten easySite directory: remove extra easySite/easySite nesting
- Moved contents of main_dc/yalarba/easySite/easySite/ up to easySite/ - Updated docker-compose.yml build context path - Deleted empty nested easySite/ directory
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// plugins/theme.client.ts
|
||||
export default defineNuxtPlugin(() => {
|
||||
const initializeTheme = () => {
|
||||
const savedTheme = localStorage.getItem('theme')
|
||||
const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
|
||||
const theme = savedTheme || (systemPrefersDark ? 'dark' : 'light')
|
||||
document.documentElement.setAttribute('data-theme', theme)
|
||||
}
|
||||
|
||||
// Инициализируем при загрузке
|
||||
initializeTheme()
|
||||
|
||||
// Слушаем изменения системной темы
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
|
||||
if (!localStorage.getItem('theme')) {
|
||||
document.documentElement.setAttribute('data-theme', e.matches ? 'dark' : 'light')
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user