cineclub-site/front/components/layout/NavBar.vue

72 lines
1.5 KiB
Vue
Raw Normal View History

2022-04-03 01:20:54 +02:00
<template>
2022-04-03 01:20:54 +02:00
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<nuxt-link class="navbar-item" to="index">
<img src="~/assets/img/logo.png" />
2022-04-03 01:20:54 +02:00
</nuxt-link>
<a
role="button"
class="navbar-burger"
aria-label="menu"
aria-expanded="false"
@click="isBurgerOpen = !isBurgerOpen"
>
<!-- the next three lines are meant for the burger menu -->
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu" :class="{ 'is-active': isBurgerOpen }">
<div class="navbar-start">
<nuxt-link
v-for="(menuItem, index) of menuItems"
:key="index"
class="navbar-item"
:to="menuItem.link"
>
{{ menuItem.label }}
</nuxt-link>
</div>
<div class="navbar-end">
<div class="navbar-item">
<a class="button is-light"> Log in </a>
</div>
2022-04-03 01:20:54 +02:00
</div>
</div>
2022-04-03 01:20:54 +02:00
</nav>
2022-04-03 01:20:54 +02:00
</template>
2022-04-03 01:20:54 +02:00
<script setup lang="ts">
const menuItems = ref([
{
label: "Accueil",
link: "/",
2022-04-03 01:20:54 +02:00
},
2022-04-03 01:20:54 +02:00
{
label: "À venir",
link: "/a-venir",
},
{
label: "À props",
link: "/a-propos",
},
])
2022-04-03 01:20:54 +02:00
2022-04-03 01:20:54 +02:00
const isBurgerOpen = ref(false)
</script>
<style lang="sass" scoped>
@include desktop
.navbar
padding: 0 2rem
.navbar-item img
object-fit: contain
@include desktop
max-height: 5rem
padding: 0 // necessary ?
</style>