peer-group-grading/frontend/src/components/HeaderNav.vue
Mikail Killi 6b4dd96d83
Some checks failed
ci/woodpecker/pr/cargo_check Pipeline was successful
ci/woodpecker/pr/cargo_clippy Pipeline was successful
ci/woodpecker/pr/cargo_test Pipeline was successful
ci/woodpecker/pr/check_fmt Pipeline failed
chaged the header and styling
2025-04-09 09:38:53 +02:00

78 lines
1.4 KiB
Vue

<template>
<nav class="header-container">
<div class="left-icon">
<slot name="left-icon"></slot>
</div>
<div class="nav-items">
<button
v-if="!isLoggedIn"
class="nav-button"
>
<component :is="LogInIcon" class="icon" />
Login
</button>
<template v-if="isLoggedIn">
<button class="nav-button">
<component :is="LogOutIcon" class="icon" />
Logout
</button>
<button
v-if="isTeacher"
class="nav-button"
>
<component :is="BoltIcon" class="icon" />
Lehrerverwaltung
</button>
</template>
</div>
</nav>
</template>
<script setup lang="ts">
import { LogInIcon, LogOutIcon, BoltIcon } from 'lucide-vue-next';
defineProps<{
isLoggedIn: boolean;
isTeacher: boolean;
}>();
</script>
<style scoped>
.header-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
width: 100%;
box-sizing: border-box;
}
.left-icon {
display: flex;
align-items: center;
}
.nav-items {
display: flex;
gap: 1rem;
align-items: center;
margin-left: auto;
}
.nav-button {
display: flex;
align-items: center;
gap: 0.5rem;
background: none;
border: none;
cursor: pointer;
font-weight: bold;
color: white;
}
.icon {
width: 1rem;
height: 1rem;
}
</style>