1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
<template>
<div id="navbar">
<nav class="navbar is-fixed-top is-primary">
<div class="navbar-brand">
<router-link to="/" class="navbar-item">
<img src="@/assets/logo_sm.png" />
<div class="navbar-item">
<span style="color: white">
The Glassy Ladies
</span>
</div>
</router-link>
<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="/faq" class="navbar-item">
F.A.Q.
</router-link>
<router-link to="/care" class="navbar-item">
Care & Handling
</router-link>
<router-link to="/privacy" class="navbar-item">
Privacy Policy
</router-link>
<router-link to="/admin" class="navbar-item">
Inventory
</router-link>
</div>
<transition
mode="out-in"
enter-active-class="animate__animated animate__flipInX"
leave-active-class="animate__animated animate__flipOutX"
>
<div
class="navbar-end"
v-if="routeName != 'Administration'"
key="cartCheckout"
>
<div
class="navbar-item has-dropdown is-active"
v-for="category in categories"
:key="category"
>
<div class="navbar-link">
{{ category }}
</div>
</div>
<div class="navbar-item">
<CartCheckout></CartCheckout>
</div>
</div>
</transition>
</div>
</nav>
</div>
</template>
<script>
import CartCheckout from "@/components/CartCheckout.vue";
export default {
name: "Navbar",
components: {
CartCheckout
},
data() {
return {
isMenuActive: false
};
},
computed: {
navMenu() {
if (this.isMenuActive) {
return "navbar-menu is-active";
} else {
return "navbar-menu";
}
},
categories() {
//const raw = this.$store.getters.products.map(p => p.category.split("/"));
//const raw = [
// [1, 2, 3],
// [1, 2, 4],
// [1, 5],
// [6, 7]
//];
return [];
},
routeName() {
return this.$route.name;
}
},
methods: {
generateCategories() {
let results = [];
return results;
},
toggleNavMenu() {
this.isMenuActive = !this.isMenuActive;
}
}
};
</script>
|