File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <nav >
3+ <router-link
4+ v-for =" (nav, $index) in navs"
5+ :key =" $index"
6+ v-if =" !/^http/.test(nav.link)"
7+ v-text =" nav.text"
8+ :to =" nav.link" >
9+ </router-link >
10+ <a target =" _blank" :href =" nav.link" v-else >{{ nav.text }}<outbound-link /></a >
11+
12+ <a
13+ v-if =" $site.themeConfig.repo"
14+ target =" _blank"
15+ :href =" $site.themeConfig.repo" >GitHub<outbound-link /></a >
16+ </nav >
17+ </template >
18+
19+ <script >
20+ export default {
21+ computed: {
22+ navs () {
23+ return this .$themeLocaleConfig .nav || this .$site .themeConfig .nav || [];
24+ },
25+ },
26+ };
27+ </script >
28+
29+ <style lang="less" scoped>
30+ @import ' ./less/variables.less' ;
31+
32+ nav {
33+ float : right ;
34+ padding : 20px 0 ;
35+
36+ a {
37+ color : @c-basic ;
38+ margin-left : 35px ;
39+ transition : font- weight 0.2s ;
40+
41+ & :not (:hover ) {
42+ text-decoration : none ;
43+ }
44+
45+ & .router-link-active {
46+ font-weight : bold ;
47+ color : lighten (@c-basic , 10% );
48+ }
49+ }
50+ }
51+ </style >
You can’t perform that action at this time.
0 commit comments