about summary refs log tree commit diff
path: root/src/components/NavLink.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/NavLink.vue')
-rw-r--r--src/components/NavLink.vue17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/components/NavLink.vue b/src/components/NavLink.vue
index 7a9e8f8..8915585 100644
--- a/src/components/NavLink.vue
+++ b/src/components/NavLink.vue
@@ -1,7 +1,7 @@
 <template>
   <li class="navlink">
-    <a v-if="external" :class="linkClass" target="_blank" :href="link">{{ name }}</a>
-    <router-link v-else :class="linkClass" :to="link">{{ name }}</router-link>
+    <a v-if="external" class="link" target="_blank" rel="”noopener”" :href="link">{{ name }}</a>
+    <router-link v-else class="link" :to="link">{{ name }}</router-link>
   </li>
 </template>
 
@@ -10,16 +10,7 @@ export default {
   props: {
     link: String,
     name: String,
-    external: { type: Boolean, default: false },
-    active: { type: Boolean, default: false }
-  },
-  computed: {
-    linkClass() {
-      if (this.active) {
-        return "link active";
-      }
-      return "link";
-    }
+    external: { type: Boolean, default: false }
   }
 };
 </script>
@@ -50,7 +41,7 @@ export default {
   margin: 10px;
 }
 
-.active {
+.router-link-exact-active {
   background-color: #ececec !important;
 }