summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2021-01-04 16:41:42 -0500
committerAdam T. Carpenter <atc@53hor.net>2021-01-04 16:41:42 -0500
commit6991872a00dc25d8009aeca4abbb8fd5c8bf2a5b (patch)
tree63761451b8a061afae9077e80b2512558d35c86f
parentfceb8ffc0c551d0da5bfd936bbc4a54b07e8f4c4 (diff)
downloadtheglassyladies-6991872a00dc25d8009aeca4abbb8fd5c8bf2a5b.tar.xz
theglassyladies-6991872a00dc25d8009aeca4abbb8fd5c8bf2a5b.zip
sped up searching by only searching product fields that matter, cleaned
up nav
-rw-r--r--iridescence/src/components/Footer.vue32
-rw-r--r--iridescence/src/components/Navbar.vue13
-rw-r--r--iridescence/src/components/ProductSearch.vue2
-rw-r--r--iridescence/src/router/index.js3
-rw-r--r--iridescence/src/store/index.js8
5 files changed, 21 insertions, 37 deletions
diff --git a/iridescence/src/components/Footer.vue b/iridescence/src/components/Footer.vue
index d41c4ce..8210c62 100644
--- a/iridescence/src/components/Footer.vue
+++ b/iridescence/src/components/Footer.vue
@@ -28,37 +28,11 @@
</div>
<div class="level-item has-text-centered">
- <div class="content">
- <p>&copy; {{ year }} The Glassy Ladies, LLC</p>
- <p>
- Experiencing issues?
- <a href="mailto:webmaster@theglassyladies.com">Let us know.</a>
- </p>
- </div>
- </div>
- <div class="level-item has-text-centered">
<ul>
+ <li>&copy; {{ year }} The Glassy Ladies, LLC</li>
<li>
- <a>
- <router-link to="/admin" class="navbar-item">
- <span
- class="iconify-inline"
- data-icon="mdi-package-variant-closed"
- ></span>
- <span>Inventory</span>
- </router-link>
- </a>
- </li>
- <li>
- <a
- ><router-link to="/privacy" class="navbar-item">
- <span
- class="iconify-inline"
- data-icon="mdi-monitor-eye"
- ></span>
- <span>Privacy</span>
- </router-link></a
- >
+ Experiencing issues?
+ <a href="mailto:webmaster@theglassyladies.com">Let us know.</a>
</li>
</ul>
</div>
diff --git a/iridescence/src/components/Navbar.vue b/iridescence/src/components/Navbar.vue
index d5dff01..6b9f609 100644
--- a/iridescence/src/components/Navbar.vue
+++ b/iridescence/src/components/Navbar.vue
@@ -2,14 +2,14 @@
<div id="navbar">
<nav class="navbar is-fixed-top is-primary">
<div class="navbar-brand">
- <div class="navbar-item">
+ <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>
- </div>
+ </router-link>
<a class="navbar-burger burger" v-on:click="toggleNavMenu">
<span></span>
<span></span>
@@ -18,15 +18,18 @@
</div>
<div :class="navMenu">
<div class="navbar-start">
- <router-link to="/" class="navbar-item">
- Home
- </router-link>
<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
diff --git a/iridescence/src/components/ProductSearch.vue b/iridescence/src/components/ProductSearch.vue
index e02952a..d492b66 100644
--- a/iridescence/src/components/ProductSearch.vue
+++ b/iridescence/src/components/ProductSearch.vue
@@ -4,7 +4,7 @@
<div class="control is-expanded has-icons-left">
<input
class="input is-medium is-primary is-rounded"
- type="text"
+ type="search"
placeholder="Find something in particular..."
v-model.trim="term"
@input="updateSearch"
diff --git a/iridescence/src/router/index.js b/iridescence/src/router/index.js
index ce48c8c..1dc6e63 100644
--- a/iridescence/src/router/index.js
+++ b/iridescence/src/router/index.js
@@ -51,7 +51,8 @@ const routes = [
const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL,
- routes
+ routes,
+ linkExactActiveClass: "is-active"
});
export default router;
diff --git a/iridescence/src/store/index.js b/iridescence/src/store/index.js
index e2d970d..b324bd1 100644
--- a/iridescence/src/store/index.js
+++ b/iridescence/src/store/index.js
@@ -19,7 +19,13 @@ export default new Vuex.Store({
products(state) {
return state.products
.filter(item => {
- return JSON.stringify(item)
+ let haystack = [
+ item.id,
+ item.name,
+ item.description,
+ item.category
+ ].join("");
+ return haystack
.toLowerCase()
.includes(state.searchTerm.toLowerCase());
})