diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-08-12 12:16:39 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-08-12 12:16:39 +0200 |
commit | a163ec2d7497acb51612669a83e31e37746c176f (patch) | |
tree | 6682612003c94dfc71227146079881a7ebde11e3 /src/components/NavLink.vue | |
parent | 64c80504b5d14a179508bd764e107741a80e8be6 (diff) | |
download | puszcza-a163ec2d7497acb51612669a83e31e37746c176f.tar.gz puszcza-a163ec2d7497acb51612669a83e31e37746c176f.zip |
Add NavBar
Diffstat (limited to 'src/components/NavLink.vue')
-rw-r--r-- | src/components/NavLink.vue | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/components/NavLink.vue b/src/components/NavLink.vue index 6211333..7ad5088 100644 --- a/src/components/NavLink.vue +++ b/src/components/NavLink.vue @@ -1,6 +1,7 @@ <template> - <li> - <router-link v-bind:to="link">{{ name }}</router-link> + <li class="navlink"> + <a v-if="external" class="link" :href="link">{{name}}</a> + <router-link v-else class="link" :to="link">{{ name }}</router-link> </li> </template> @@ -8,7 +9,22 @@ export default { props: { link: String, - name: String + name: String, + external: { type: Boolean, default: false } } }; -</script> \ No newline at end of file +</script> + +<style scoped> +.link { + text-decoration: none; + color: #181818; +} + +.navlink { + list-style-type: none; + + padding: 10px; + margin: 10px; +} +</style> \ No newline at end of file |