-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathAppNavbar.vue
96 lines (79 loc) · 2.2 KB
/
AppNavbar.vue
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
<template>
<nav id="navbar">
<b-navbar toggleable="md" type="dark">
<b-navbar-toggle target="nav_collapse">
<i class="fa fa-navicon" aria-hidden="true" />
</b-navbar-toggle>
<b-collapse is-nav id="nav_collapse">
<b-navbar-nav @click.capture="clicked" justified>
<b-nav-item v-if="!$root.onMobile" :to="{ name: 'Events' }" key="events">Все землетрясения</b-nav-item>
<b-nav-item v-if="!$root.onMobile" :to="{ name: 'Analytics' }" key="analytics">Аналитика</b-nav-item>
<li><a href="https://geophystech.ru/services/seismic-monitoring-system/" class="nav-item nav-link">Мониторинг объектов</a></li>
<b-nav-item :to="{ name: 'StaticPage', params: { page: 'about' } }" key="static-page-about">О проекте</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>
</nav>
</template>
<script>
export default {
name: 'app-navbar',
methods: {
clicked: function(e) {
if (e.target.classList.contains('nav-link')
&& e.target.classList.contains('router-link-active')
&& !this.$router.currentRoute.params.id
) {
e.preventDefault()
}
}
}
}
</script>
<style lang="scss" scoped>
@import '~scss/_variables';
$border-bottom-blue: 3px solid $color-blue;
$border-bottom-orange: 3px solid $color-orange;
#navbar {
background-color: $color-blue;
border-color: $color-gray;
border-radius: $border-radius;
a {
color: $color-white;
font-weight: bold;
}
}
.navbar {
width: 100%;
margin: 0;
@media screen and (max-width: 767px) {
padding-left: 0;
}
@media screen and (min-width: 768px) {
padding-bottom: 1px;
padding-top: 8px;
}
ul {
width: 100%;
}
li {
transition: border-bottom 0.30s ease 0s;
a {
border-bottom: $border-bottom-blue;
}
}
li:hover {
a {
border-bottom: $border-bottom-orange;
}
}
}
.router-link-active {
border-bottom: $border-bottom-orange !important;
}
.navbar-toggler {
border: none;
// .navbar-toggler-icon {
// }
}
</style>