BrainBlast/src/components/BrainBlastBar.vue

37 lines
861 B
Vue
Raw Normal View History

2024-02-23 17:34:31 +01:00
<template>
<v-app-bar :elevation="12">
2024-02-24 18:07:42 +01:00
<v-app-bar-nav-icon v-on:click="menu = !menu"></v-app-bar-nav-icon>
<v-menu v-model="menu" class="menu-below-bar">
2024-02-23 17:34:31 +01:00
<v-list>
<v-list-item>Item 1</v-list-item>
<v-list-item>Item 2</v-list-item>
</v-list>
</v-menu>
<v-app-bar-title>Brain Blast</v-app-bar-title>
<template v-slot:append>
<v-btn @click="toggleTheme" icon="mdi-theme-light-dark"></v-btn>
</template>
</v-app-bar>
</template>
<script setup>
2024-02-24 18:07:42 +01:00
import { ref } from 'vue'
2024-02-23 17:34:31 +01:00
import { useTheme } from 'vuetify'
const theme = useTheme()
2024-02-24 18:07:42 +01:00
let menu = ref(false)
2024-02-23 17:34:31 +01:00
function toggleTheme () {
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
}
2024-02-24 18:07:42 +01:00
2024-02-23 17:34:31 +01:00
</script>
<style scoped>
.menu-below-bar {
margin-top: 48px; /* La hauteur de la barre d'application */
}
</style>