about summary refs log tree commit diff
path: root/components
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-17 21:56:13 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-17 21:56:13 +0200
commit5cbfdab567005a963ef3c4f1ee4f1412f9c0de47 (patch)
tree637695cbd54494fe0f98a31f66c0f8ad6589a1a5 /components
parent61dfb8f8e6aa261c3743ef7315a5358cb8867ab9 (diff)
downloadpuszcza-5cbfdab567005a963ef3c4f1ee4f1412f9c0de47.tar.gz
puszcza-5cbfdab567005a963ef3c4f1ee4f1412f9c0de47.zip
Fix empty post list
Diffstat (limited to 'components')
-rw-r--r--components/NavBar.vue14
-rw-r--r--components/NavLink.vue4
2 files changed, 14 insertions, 4 deletions
diff --git a/components/NavBar.vue b/components/NavBar.vue
index 2887464..4ffdf16 100644
--- a/components/NavBar.vue
+++ b/components/NavBar.vue
@@ -8,14 +8,21 @@
     <button @click="toggleMenu" class="menu-toggler">Menu</button>
     <ul :class="linksClass" @click="toggleMenu">
       <!-- Loop for generating links -->
-      <NavLink v-for="route in routes" :key="route.path" :link="route.path" :name="route.name"></NavLink>
+      <NavLink v-for="route in routes" :key="route.path" :link="route.path" :name="route.name" />
+      <NavLink
+        v-for="route in staticRoutes"
+        :key="route.path"
+        :link="route.path"
+        :name="route.name"
+        static
+      />
       <NavLink
         v-for="route in externalRoutes"
         :key="route.path"
         :link="route.path"
         :name="route.name"
-        :external="true"
-      ></NavLink>
+        external
+      />
     </ul>
   </nav>
 </template>
@@ -30,6 +37,7 @@ export default {
   props: {
     routes: Array,
     externalRoutes: Array,
+    staticRoutes: Array,
     title: String,
     logo: String
   },
diff --git a/components/NavLink.vue b/components/NavLink.vue
index 253dde9..6074db0 100644
--- a/components/NavLink.vue
+++ b/components/NavLink.vue
@@ -1,6 +1,7 @@
 <template>
   <li class="navlink">
     <a v-if="external" class="link" target="_blank" rel="”noopener”" :href="link">{{ name }}</a>
+    <a v-else-if="static" class="link" :href="link">{{ name }}</a>
     <nuxt-link v-else class="link" :to="link">{{ name }}</nuxt-link>
   </li>
 </template>
@@ -10,7 +11,8 @@ export default {
   props: {
     link: String,
     name: String,
-    external: { type: Boolean, default: false }
+    external: { type: Boolean, default: false },
+    static: { type: Boolean, default: false }
   }
 }
 </script>