Main Site Work

+ Updatet Router
+ "Hauptseite" mit Großem Bild
This commit is contained in:
2025-11-22 17:04:45 +01:00
parent 30eeaabc5a
commit a118026b04
13 changed files with 97 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useTheme } from 'vuetify';
import routesLayout from './plugins/routesLayout';
import { Visibility, routes } from './plugins/routesLayout';
import { useRoute } from 'vue-router';
const theme = useTheme();
@@ -9,36 +9,38 @@ const route = useRoute();
const showDrawer = ref(true);
function changeTheme() {
theme.toggle();
localStorage.setItem("theme", theme.name.value);
theme.toggle();
localStorage.setItem('theme', theme.name.value);
}
function toggleDrawer() {
showDrawer.value = !showDrawer.value;
localStorage.setItem("drawer", showDrawer.value ? "Y" : "N")
showDrawer.value = !showDrawer.value;
localStorage.setItem('drawer', showDrawer.value ? 'Y' : 'N');
}
onMounted(() => {
theme.change(localStorage.getItem("theme") || "light");
showDrawer.value = localStorage.getItem("drawer")?.startsWith("Y") || false;
theme.change(localStorage.getItem('theme') || 'light');
showDrawer.value = localStorage.getItem('drawer')?.startsWith('Y') || false;
});
</script>
<template>
<v-app>
<v-app-bar image="./appBarIcon.png">
<v-app-bar image="/static/images/appBarIcon.png">
<template v-slot:image>
<v-img
:gradient="theme.name.value === 'dark' ? 'to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)' : 'to top, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)'"
:gradient="
theme.name.value === 'dark'
? 'rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)'
: 'rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)'
"
/>
</template>
<template v-slot:prepend>
<v-app-bar-nav-icon @click="toggleDrawer()"></v-app-bar-nav-icon>
</template>
<v-app-bar-title class="title">
Judoteam - Stadtlohn
</v-app-bar-title>
<v-app-bar-title class="title"> Judoteam - Stadtlohn </v-app-bar-title>
<v-tooltip>
<template #activator="{ props }">
@@ -54,7 +56,7 @@ onMounted(() => {
<v-icon>mdi-brightness-6</v-icon>
</v-btn>
</template>
{{ theme.name.value === 'dark' ? 'Dunklen Modus aktivieren' : 'Hellen Modus aktivieren' }}
{{ theme.name.value === 'dark' ? 'Hellen Modus aktivieren' : 'Dunklen Modus aktivieren' }}
</v-tooltip>
</v-app-bar>
@@ -65,7 +67,7 @@ onMounted(() => {
>
<v-list>
<v-list-item
v-for="item in routesLayout"
v-for="item in routes.filter((x) => x.visible === Visibility.Public)"
:key="item.path"
:to="item.path"
:active="route.path === item.path"
@@ -84,4 +86,4 @@ onMounted(() => {
</v-app>
</template>
<style scoped></style>
<style scoped></style>