-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavbar.vue
52 lines (47 loc) · 1.06 KB
/
Navbar.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
<template>
<header class="navbar">
<router-link to="/" class="home-link">
<img class="logo"
v-if="$site.themeConfig.logo"
:src="$withBase($site.themeConfig.logo)">
</router-link>
<div class="links">
<SearchBox v-if="$site.themeConfig.search !== false"/>
<NavLinks class="can-hide"/>
</div>
</header>
</template>
<script>
import SearchBox from './SearchBox.vue'
import NavLinks from './NavLinks.vue'
export default {
components: { NavLinks, SearchBox }
}
</script>
<style lang="stylus">
@import './styles/config.styl'
.navbar
padding 0.7rem 1.5rem
line-height $navbarHeight - 1.4rem
position relative
a, span, img
display inline-block
.logo
height $navbarHeight - 1.4rem
min-width $navbarHeight - 1.4rem
margin-right 0.8rem
vertical-align top
.site-name
font-size 1.3rem
font-weight 600
color $textColor
position relative
.links
font-size 0.9rem
position absolute
right 1.5rem
top 0.7rem
@media (max-width: $MQMobile)
.navbar .can-hide
display none
</style>