wrbapp/frontend/components/layout/Navbar.vue

49 lines
2.2 KiB
Vue
Raw Normal View History

2022-09-15 19:15:07 +02:00
<template>
2022-12-04 11:57:53 +01:00
<div v-if="route.meta.key !== 'disable'" class="w-full bg-neutral-200 dark:bg-neutral-800 flex justify-center items-center shadow" :class="platform === 'ios' ? 'navbar' : 'py-3'">
2022-11-29 18:14:11 +01:00
<div class="flex text-sm justify-evenly items-center gap-1 w-full max-w-lg dark:text-gray-300 text-gray-900 overflow-x-hidden">
2022-09-15 19:15:07 +02:00
<NuxtLink to="/" class="flex flex-col items-center hover:cursor-pointer drop-shadow" :class="route.path === '/' ? 'text-primary' : ''">
2022-11-29 18:14:11 +01:00
<Icon size="1.8em" name="ion:home-outline" />
2022-09-15 19:15:07 +02:00
<span>Home</span>
</NuxtLink>
2022-09-27 17:33:00 +02:00
<NuxtLink to="/news" class="flex flex-col items-center hover:cursor-pointer drop-shadow" :class="route.path.startsWith('/news') ? 'text-primary' : ''">
2022-11-29 18:14:11 +01:00
<Icon size="1.8em" name="ion:newspaper-outline" />
2023-01-22 15:04:12 +01:00
<span>Nieuws</span>
2022-09-15 19:15:07 +02:00
</NuxtLink>
<NuxtLink to="/calendar" class="flex flex-col items-center hover:cursor-pointer drop-shadow" :class="route.path === '/calendar' ? 'text-primary' : ''">
2022-11-29 18:14:11 +01:00
<Icon size="1.8em" name="ion:calendar-outline" />
2023-01-22 15:04:12 +01:00
<span>Agenda</span>
2022-09-15 19:15:07 +02:00
</NuxtLink>
<NuxtLink to="/settings" class="flex flex-col items-center hover:cursor-pointer drop-shadow" :class="route.path.startsWith('/settings') ? 'text-primary' : ''">
2022-11-29 18:14:11 +01:00
<Icon size="1.8em" name="ion:settings-sharp" />
2022-09-15 19:15:07 +02:00
<span>Settings</span>
</NuxtLink>
2022-11-29 18:14:11 +01:00
<NuxtLink v-if="userData.wedstrijdteam" to="/wedstrijd" class="flex flex-col items-center hover:cursor-pointer drop-shadow" :class="route.path.startsWith('/wedstrijd') ? 'text-primary' : ''">
2022-12-04 10:29:11 +01:00
<Icon size="1.8em" name="ion:podium-outline" />
2022-11-29 18:14:11 +01:00
<span>Wedstrijd</span>
</NuxtLink>
2022-09-15 19:15:07 +02:00
</div>
</div>
</template>
<script setup>
2022-12-04 11:57:53 +01:00
import { Device } from '@capacitor/device';
2022-11-29 18:14:11 +01:00
2022-12-04 11:57:53 +01:00
const route = useRoute()
2022-11-29 18:14:11 +01:00
const { userData } = inject('firebase')
2022-12-04 11:57:53 +01:00
const platform = ref(null)
onMounted(() => {
Device.getInfo().then(info => {
platform.value = info.platform
});
})
2022-11-29 18:14:11 +01:00
</script>
2022-12-04 11:57:53 +01:00
<style>
.navbar {
padding-bottom: calc(env(safe-area-inset-bottom) - 10px);
padding-top: 12px;
}
</style>