generated from Seekra/repository-template
add isDark state in App.vue
This commit is contained in:
@@ -17,9 +17,13 @@ limitations under the License.
|
|||||||
<script setup>
|
<script setup>
|
||||||
import Navbar from './features/nav/components/Navbar.vue';
|
import Navbar from './features/nav/components/Navbar.vue';
|
||||||
import Footer from './features/footer/components/Footer.vue';
|
import Footer from './features/footer/components/Footer.vue';
|
||||||
|
import { ref, provide } from 'vue';
|
||||||
|
const isDark = ref(false);
|
||||||
|
provide('isDark', isDark);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div :class="{ dark: isDark }">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
@@ -27,6 +31,7 @@ import Footer from './features/footer/components/Footer.vue';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Footer />
|
<Footer />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user