summaryrefslogtreecommitdiff
path: root/iridescence/src/components/Navbar.vue
diff options
context:
space:
mode:
authorAdam Carpenter <atc@53hor.net>2020-04-23 08:07:35 -0400
committerAdam Carpenter <atc@53hor.net>2020-04-23 08:07:35 -0400
commit6e787a89e0c40f42d51681c960a18818650646b7 (patch)
tree5edad46e2dec72ebe5d00a4a7d53263b1d4d076e /iridescence/src/components/Navbar.vue
parentbe3b6030b4175f6c06d20dae8470b4a44a1befea (diff)
downloadtheglassyladies-6e787a89e0c40f42d51681c960a18818650646b7.tar.xz
theglassyladies-6e787a89e0c40f42d51681c960a18818650646b7.zip
switched back to js, added navbar with burger toggle
Diffstat (limited to 'iridescence/src/components/Navbar.vue')
-rw-r--r--iridescence/src/components/Navbar.vue63
1 files changed, 63 insertions, 0 deletions
diff --git a/iridescence/src/components/Navbar.vue b/iridescence/src/components/Navbar.vue
new file mode 100644
index 0000000..bf287b2
--- /dev/null
+++ b/iridescence/src/components/Navbar.vue
@@ -0,0 +1,63 @@
+<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>