|
1 | 1 | <template> |
2 | 2 | <header id="header"> |
3 | 3 | <div class="header-wrapper"> |
4 | | - <h1 class="title">{{ $site.title }}</h1> |
| 4 | + <h1 class="title"> |
| 5 | + <router-link |
| 6 | + :to="$site.base" |
| 7 | + class="home-link" |
| 8 | + >{{ $site.title }}</router-link> |
| 9 | + </h1> |
5 | 10 | <div class="header-right-wrap"> |
6 | 11 | <ul class="nav" v-if="$themeConfig.nav"> |
7 | 12 | <li class="nav-item" v-for="item in $themeConfig.nav"> |
8 | 13 | <NavLink :link="item.link">{{ item.text }}</NavLink> |
9 | 14 | </li> |
10 | 15 | </ul> |
11 | | - <SearchBox /> |
| 16 | + <SearchBox/> |
12 | 17 | </div> |
13 | 18 | </div> |
14 | 19 | </header> |
|
29 | 34 | <style lang="stylus"> |
30 | 35 | @import '~@app/style/config' |
31 | 36 | |
32 | | - ol, ul |
33 | | - list-style none |
34 | | - margin 0 |
35 | | - padding 0 |
36 | | - |
37 | 37 | #header |
38 | 38 | z-index 12 |
39 | 39 | position fixed |
40 | 40 | top 0 |
41 | 41 | width 100vw |
42 | 42 | box-sizing border-box |
43 | 43 | // background lighten(#3eaf7c, 90%) |
44 | | - background-color #FdFdFd |
| 44 | + background-color #FFF |
45 | 45 | font-family Abel, sans-serif |
46 | 46 | padding 20px 32px 20px |
47 | 47 | margin auto |
48 | 48 | border-bottom 1px solid rgba(0, 0, 0, 0.15) |
49 | | - // border-bottom 5px solid lighten(#3eaf7c, 50%) |
50 | | -
|
| 49 | + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03), 0 6px 6px rgba(0, 0, 0, 0.05) |
| 50 | + transition: all 1s cubic-bezier(.25, .8, .25, 1) |
| 51 | + |
| 52 | + ol, ul |
| 53 | + list-style none |
| 54 | + margin 0 |
| 55 | + padding 0 |
| 56 | + |
| 57 | + &:hover |
| 58 | + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08), 0 6px 6px rgba(0, 0, 0, 0.1); |
| 59 | + |
| 60 | + // border-bottom 5px solid lighten(#3eaf7c, 50%) |
| 61 | + |
51 | 62 | .header-wrapper |
52 | 63 | display flex |
53 | 64 | line-height 40px |
|
64 | 75 | letter-spacing 2px |
65 | 76 | display block |
66 | 77 | font-weight 900 |
67 | | - |
| 78 | + a |
| 79 | + color #000 |
| 80 | + text-decoration none |
| 81 | + |
68 | 82 | .header-right-wrap |
69 | 83 | flex 1 |
70 | 84 | display flex |
|
88 | 102 | transition color .3s |
89 | 103 | |
90 | 104 | &:hover |
91 | | - color lighten(#3eaf7c, 10%) |
92 | | - |
93 | | - |
| 105 | + color $accentColor |
| 106 | + |
94 | 107 | .search-box |
95 | 108 | margin-left 20px |
| 109 | + |
96 | 110 | input |
97 | | - border-radius 0 |
98 | | - border: 1px solid rgba(0, 0, 0, 0.15) |
| 111 | + border-radius 5px |
| 112 | + transition all .5s |
| 113 | + border: 1px solid #000 |
| 114 | + &:hover |
| 115 | + border: 1px solid $accentColor |
| 116 | + box-shadow 0 0 5px $accentColor |
| 117 | + |
99 | 118 | .suggestions |
| 119 | + border 1px solid #000 |
100 | 120 | top: 40px |
101 | 121 | right 0 |
102 | | - |
| 122 | + a |
| 123 | + color #000 |
| 124 | + text-decoration none |
| 125 | + &.focused |
| 126 | + color $accentColor |
| 127 | +
|
103 | 128 | @media (max-width: $MQMobile) |
104 | 129 | .header-wrapper |
105 | 130 | flex-direction column |
| 131 | + |
106 | 132 | .header-right-wrap |
107 | 133 | display none |
108 | 134 | </style> |
0 commit comments