blob: bf287b25fe520eb817bf1ed0753236e59aede031 (
plain) (
tree)
|
|
<template>
<div id="navbar">
<nav class="navbar">
<div class="navbar-brand">
<div class="navbar-item">
<img src="@/assets/logo.png" />
</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">
<a class="navbar-item">
<router-link to="/">Home</router-link>
</a>
<a class="navbar-item">
<router-link to="/about">About</router-link>
</a>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<button class="button">
Cart (5)
</button>
<button class="button is-primary">
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>
|