From 6e787a89e0c40f42d51681c960a18818650646b7 Mon Sep 17 00:00:00 2001
From: Adam Carpenter <atc@53hor.net>
Date: Thu, 23 Apr 2020 08:07:35 -0400
Subject: switched back to js, added navbar with burger toggle

---
 iridescence/src/components/Navbar.vue | 63 +++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 iridescence/src/components/Navbar.vue

(limited to 'iridescence/src/components/Navbar.vue')

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>
-- 
cgit v1.2.3

