2023-11-04 14:31:48 +01:00
|
|
|
<template>
|
2023-11-07 09:01:54 +01:00
|
|
|
<header class="flex flex-row text-center justify-center pt-1">
|
|
|
|
<nav>
|
|
|
|
<router-link to="/">home</router-link>
|
|
|
|
<router-link to="/user" v-if="session.isAuthenticated">user</router-link>
|
|
|
|
<router-link to="/login" v-else href="/login">login</router-link>
|
|
|
|
</nav>
|
|
|
|
</header>
|
2023-11-04 14:31:48 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { useSession } from '@/stores/session'
|
|
|
|
const session = useSession()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
nav {
|
2023-11-07 09:01:54 +01:00
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
2023-11-04 14:31:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
2023-11-07 09:01:54 +01:00
|
|
|
color: #8787a4;
|
|
|
|
text-decoration: underline;
|
2023-11-04 14:31:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
a:hover {
|
2023-11-07 09:01:54 +01:00
|
|
|
color: #ffffff;
|
|
|
|
background: #8787A4;
|
2023-11-04 14:31:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
a.selected {
|
2023-11-07 09:01:54 +01:00
|
|
|
color: #ffffff;
|
|
|
|
background: #8787A4;
|
2023-11-04 14:31:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
nav>a {
|
2023-11-07 09:01:54 +01:00
|
|
|
margin: 0 3px;
|
2023-11-04 14:31:48 +01:00
|
|
|
}
|
|
|
|
</style>
|