-
Notifications
You must be signed in to change notification settings - Fork 295
Expand file tree
/
Copy pathApp.vue
More file actions
49 lines (42 loc) · 1.05 KB
/
App.vue
File metadata and controls
49 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<script setup>
import { RouterView } from 'vue-router'
import { useThemeStore } from './stores/theme'
import Sidebar from './components/Sidebar.vue'
import Header from './components/Header.vue'
const themeStore = useThemeStore()
</script>
<template>
<div class="min-h-screen bg-gray-50 dark:bg-gray-900">
<!-- Mobile overlay -->
<div
v-if="themeStore.sidebarOpen"
@click="themeStore.closeSidebar"
class="fixed inset-0 bg-black/50 z-40 lg:hidden"
/>
<!-- Sidebar -->
<Sidebar />
<!-- Main content area -->
<div class="lg:ml-64">
<!-- Fixed Header -->
<Header />
<!-- Scrollable content -->
<main class="p-4 lg:p-6 mt-16">
<RouterView v-slot="{ Component }">
<Transition name="fade" mode="out-in">
<component :is="Component" />
</Transition>
</RouterView>
</main>
</div>
</div>
</template>
<style>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
</style>