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

171 lines
3.9 KiB
Vue
Raw Normal View History

2022-04-03 01:20:54 +02:00
<template>
2022-07-11 01:22:28 +02:00
<div class="navbar-container">
2022-07-06 02:18:22 +02:00
<nav
class="navbar container"
role="navigation"
aria-label="main navigation"
>
2022-07-06 02:15:07 +02:00
<div class="navbar-brand">
2022-07-11 01:22:28 +02:00
<nuxt-link class="navbar-item" to="/">
<img src="~/assets/img/logo.png" />
2022-04-03 01:20:54 +02:00
</nuxt-link>
2022-07-06 02:15:07 +02:00
<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>
2022-04-03 01:20:54 +02:00
</div>
2022-07-06 02:15:07 +02:00
<div class="navbar-menu" :class="{ 'is-active': isBurgerOpen }">
<div class="navbar-end">
<div class="place card mr-5">
<div class="card-content is-flex">
<v-icon name="ri-map-pin-2-fill" class="mr-4" />
<div class="subtitle">
Salle Dussane<br />45 rue d'Ulm<br />Paris 5e
</div>
</div>
</div>
<div class="networks">
<a
class="navbar-item"
href="https://www.facebook.com/cineclub.ensulm"
>
<v-icon scale="1.8" name="ri-facebook-box-fill" /> Facebook
</a>
<a
class="navbar-item"
href="https://www.instagram.com/cineclubens/"
>
<v-icon scale="1.8" name="ri-instagram-fill" /> Instagram
</a>
<div class="navbar-item">
<v-icon scale="1.8" name="ri-mail-fill" /> Newsletter
</div>
</div>
</div>
<div class="navbar-start">
<nuxt-link
v-for="(menuItem, index) of menuItems"
:key="index"
class="navbar-item"
:to="menuItem.link"
>
{{ menuItem.label }}
</nuxt-link>
2022-04-03 01:20:54 +02:00
</div>
2022-04-03 01:20:54 +02:00
</div>
2022-07-06 02:15:07 +02:00
</nav>
</div>
2022-04-03 01:20:54 +02:00
</template>
2022-04-03 01:20:54 +02:00
<script setup lang="ts">
2022-07-06 02:15:07 +02:00
const menuItems = [
2022-04-03 01:20:54 +02:00
{
label: "Accueil",
link: "/",
2022-04-03 01:20:54 +02:00
},
2022-04-03 01:20:54 +02:00
{
2022-07-06 02:15:07 +02:00
label: "Calendrier",
link: "/calendrier",
},
{
label: "Analyses",
link: "/analyses",
},
{
label: "Informations pratiques",
link: "/infos-pratiques",
2022-04-03 01:20:54 +02:00
},
{
2022-07-06 02:15:07 +02:00
label: "À propos",
2022-04-03 01:20:54 +02:00
link: "/a-propos",
},
2022-07-06 02:15:07 +02:00
]
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>
2022-07-06 02:15:07 +02:00
$navbar-item-img-max-height: 105px
2022-07-11 01:22:28 +02:00
.navbar
background-color: $grey-light
@include desktop
2022-07-06 02:15:07 +02:00
.navbar-container
color: $black-ter
position: relative
&:before
transform: scaleX(-1)
background-image: url("~/assets/img/projo.jpg")
position: absolute
height: 100%
width: 100%
content: ""
background-size: cover
background-position: center
&:after
position: absolute
top: 0
height: 100%
width: 100%
content: ""
background-color: rgba(248, 245, 243, 0.8)
2022-07-11 01:22:28 +02:00
.navbar
padding: 0 2rem
2022-07-06 02:15:07 +02:00
background: transparent
2022-07-11 01:22:28 +02:00
.navbar-brand .navbar-item
@include reset
margin: 0.5rem 1rem 0.5rem 0
img
max-height: none
width: 160px
height: 205px
2022-07-06 02:15:07 +02:00
.navbar-menu
display: flex
flex-direction: column
align-items: end
justify-content: end
.navbar-start
align-items: end
.navbar-end
align-items: center
margin-bottom: auto
margin-top: auto
2022-07-06 02:15:07 +02:00
.navbar-item
color: $black-ter
&:hover, &:focus, &:focus-within, &.is-active
background: rgba(237, 237, 237, 0.5)
color: $link-dark
.place
2022-07-11 01:22:28 +02:00
display: none
@include desktop
background-color: rgba(240, 237, 234, 62%)
2022-07-06 02:15:07 +02:00
.networks
2022-07-11 01:22:28 +02:00
display: none
@include desktop
display: flex
justify-content: space-between
flex-direction: column
2022-07-06 02:15:07 +02:00
</style>
<style lang="sass">
.navbar .networks .navbar-item .ov-icon
margin-right: 0.5rem
</style>