diff options
Diffstat (limited to 'components/NavLink.vue')
-rw-r--r-- | components/NavLink.vue | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/components/NavLink.vue b/components/NavLink.vue new file mode 100644 index 0000000..253dde9 --- /dev/null +++ b/components/NavLink.vue @@ -0,0 +1,53 @@ +<template> + <li class="navlink"> + <a v-if="external" class="link" target="_blank" rel="”noopener”" :href="link">{{ name }}</a> + <nuxt-link v-else class="link" :to="link">{{ name }}</nuxt-link> + </li> +</template> + +<script> +export default { + props: { + link: String, + name: String, + external: { type: Boolean, default: false } + } +} +</script> + +<style scoped> +@import url('https://fonts.googleapis.com/css?family=Roboto+Slab&display=swap'); + +.link { + font-family: 'Roboto Slab', serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + text-decoration: none; + color: #181818; + + padding: 10px; + + border-radius: 5px; +} + +.link:hover { + background-color: #cfcfcf; +} + +.navlink { + list-style-type: none; + + margin: 10px; +} + +.nuxt-link-exact-active { + background-color: #ececec !important; +} + +@media (max-width: 1300px) { + .navlink { + margin: 0; + } +} +</style> \ No newline at end of file |