blob: b83834abbff545d538b3d20db576a7b0eb302e6e (
plain) (
tree)
|
|
<template>
<div id="navbar">
<nav class="navbar is-primary">
<div class="navbar-brand">
<div class="navbar-item">
<img src="@/assets/logo.png" />
<div class="navbar-item">
<span>
The Glassy Ladies
</span>
</div>
</div>
<a class="navbar-burger burger" v-on:click="toggleNavMenu">
<span></span>
<span></span>
<span></span>
</a>
</div>
<div :class="navMenu">
<div class="navbar-start">
<router-link to="/" class="navbar-item">
Home
</router-link>
<router-link to="/about" class="navbar-item">
About
</router-link>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<button class="button">
Cart (5)
</button>
<button class="button is-info">
Checkout
</button>
</div>
</div>
</div>
</div>
</nav>
</div>
</template>
<script>
export default {
name: "Navbar",
data() {
return {
isMenuActive: false
};
},
computed: {
navMenu() {
if (this.isMenuActive) {
return "navbar-menu is-active";
} else {
return "navbar-menu";
}
}
},
methods: {
toggleNavMenu() {
this.isMenuActive = !this.isMenuActive;
}
}
};
</script>
|