aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/navbar/Navbar.vue
blob: 108c1502294223ad56e250d6973b198a28a76242 (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
116
117
118
119
<style lang="scss" scoped>
	@import '../../styles/colors.scss';
	nav.navbar {
		background: transparent;
		box-shadow: none;

		.navbar-brand {
			width: 100%;
			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>

			<!--
			<template v-if="loggedIn">
				<router-link
					to="/dashboard/uploads"
					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/tags"
					class="navbar-item no-active"
					exact><i class="hidden"/>Tags</router-link>

				<router-link
					to="/dashboard/settings"
					class="navbar-item no-active"
					exact><i class="hidden"/>Settings</router-link>
			</template>
			-->

			<div class="spacer" />

			<router-link v-if="!loggedIn"
				class="navbar-item"
				to="/login"><i class="hidden"/>Login</router-link>

			<router-link v-else
				to="/dashboard"
				class="navbar-item no-active"
				exact><i class="hidden"/>Dashboard</router-link>
		</div>
	</nav>
</template>

<script>
export default {
	props: {
		isWhite: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return { hamburger: false };
	},
	computed: {
		loggedIn() {
			return this.$store.state.loggedIn;
		},
		user() {
			return this.$store.state.user;
		},
		config() {
			return this.$store.state.config;
		}
	},
	methods: {
		logOut() {
			this.$emit('logout');
		}
	}
};
</script>