blob: 0418172c4aae3eae031cb47d1d86655f842b32c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
<template>
<li class="navlink">
<a v-if="external" class="link" target="_blank" rel="”noopener”" :href="link">{{ name }}</a>
<a v-else-if="pure" class="link" :href="link">{{ name }}</a>
<nuxt-link v-else class="link" :to="link">{{ name }}</nuxt-link>
</li>
</template>
<script>
export default {
props: {
link: {
type: String,
required: true
},
name: {
type: String,
required: true
},
external: {
type: Boolean,
default: false
},
pure: {
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;
font-weight: bold;
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 (min-width: 900px) {
.link {
font-weight: normal;
}
}
@media (max-width: 1300px) {
.navlink {
margin: 0;
}
}
</style>
|