blob: 78eb650bcecfbf9ed9c1d07c4b10a99d3c896b73 (
plain) (
blame)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
<style lang="scss" scoped>
@import '~/assets/styles/_colors.scss';
nav.navbar {
background: transparent;
box-shadow: none;
.navbar-brand {
width: calc(100% - 2em);
align-items: flex-start;
padding: 1em;
div.spacer { flex: 1 0 10px; }
a.navbar-item {
color: $defaultTextColor;
font-size: 16px;
font-weight: 700;
text-decoration-style: solid;
}
a.navbar-item:hover, a.navbar-item.is-active, a.navbar-link:hover, a.navbar-link.is-active {
text-decoration: underline;
background: transparent;
}
i {
font-size: 2em;
&.hidden {
width: 0px;
height: 1.5em;
pointer-events: none;
}
}
}
&.isWhite {
.navbar-brand {
a.navbar-item {
color: white;
}
}
}
}
</style>
<template>
<nav :class="{ isWhite }"
class="navbar is-transparent">
<div class="navbar-brand">
<router-link to="/"
class="navbar-item no-active">
<i class="icon-ecommerce-safebox" /> {{ config.serviceName }}
</router-link>
<div class="spacer" />
<template v-if="loggedIn">
<router-link
to="/dashboard"
class="navbar-item no-active"
exact>
<i class="hidden" />
Uploads
</router-link>
<router-link
to="/dashboard/albums"
class="navbar-item no-active"
exact>
<i class="hidden" />
Albums
</router-link>
<router-link
to="/dashboard/account"
class="navbar-item no-active"
exact>
<i class="hidden" />
Account
</router-link>
</template>
<template v-else>
<router-link
class="navbar-item"
to="/login">
<i class="hidden" />
Login
</router-link>
</template>
</div>
</nav>
</template>
<script>
export default {
props: {
isWhite: {
type: Boolean,
default: false
}
},
data() {
return { hamburger: false };
},
computed: {
loggedIn() {
return this.$store.state.loggedIn;
},
config() {
return this.$store.state.config;
}
},
methods: {
logOut() {
this.$emit('logout');
}
}
};
</script>
|