Skip to content

Commit 29b2599

Browse files
committed
fix: fixed navbar
1 parent bd7555c commit 29b2599

10 files changed

+140
-387
lines changed

docs/.vuepress/client.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { defineClientConfig } from '@vuepress/client'
22
import MyLayout from './theme/layouts/Layout.vue'
33

44
export default defineClientConfig({
5-
65
enhance({ router }) {
76
router.addRoute('/', {
87
path: '/ads.txt',

docs/.vuepress/config.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,21 @@ export default defineUserConfig({
3333
docsDir: 'docs',
3434
docsBranch: 'master',
3535
sidebarDepth: 6,
36-
sidebar: [...getGuideSidebar()]
36+
sidebar: [...getGuideSidebar()],
37+
navbar: [
38+
{
39+
text: 'Guide',
40+
link: '/'
41+
},
42+
{
43+
text: 'Sponsor',
44+
link: '/support/'
45+
},
46+
{
47+
text: 'Twitter',
48+
link: 'https://twitter.com/intent/user?screen_name=kirorisk'
49+
}
50+
]
3751
})
3852
})
3953

Loading
Loading

docs/.vuepress/public/assets/img/github.svg

-1
This file was deleted.
Loading
Loading

docs/.vuepress/public/assets/img/twitter.svg

-1
This file was deleted.

docs/.vuepress/styles/index.scss

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@import url('https://use.fontawesome.com/releases/v5.7.1/css/all.css');
2+
@import url('https://fonts.bunny.net/css?family=dosis:500|inconsolata:200|roboto:400,500,700|roboto-mono:400|source-sans-pro:300,400,600');
3+
4+
body {
5+
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
6+
}
7+
8+
.navbar .site-name {
9+
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
10+
font-weight: normal !important;
11+
12+
&.can-hide {
13+
display: inline-block !important;
14+
}
15+
}
16+
17+
.navbar .home-link:hover {
18+
.logo {
19+
animation: spin 0.5s ease-in-out 1 !important;
20+
}
21+
}
22+
23+
.navbar .logo {
24+
margin-right: 0.4rem !important;
25+
}
26+
27+
@keyframes spin {
28+
50% {
29+
transform: rotate(180deg) scale(1.2);
30+
}
31+
32+
to {
33+
transform: rotate(180deg) scale(1);
34+
}
35+
}
36+
37+
h2 {
38+
padding-bottom: 1rem;
39+
border-bottom: none;
40+
}
41+
42+
// Twitter
43+
nav > div:nth-child(3) > a {
44+
background-image: url(/assets/img/twitter-black.svg);
45+
background-repeat: no-repeat;
46+
height: 20px;
47+
display: flex;
48+
align-items: center;
49+
padding-left: 30px; /* width of the image plus a little extra padding */
50+
}
51+
52+
.dark nav > div:nth-child(3) > a {
53+
background-image: url(/assets/img/twitter-white.svg);
54+
}
55+
56+
// Github
57+
nav > div:nth-child(4) > a {
58+
background-image: url(/assets/img/github-black.svg);
59+
background-repeat: no-repeat;
60+
height: 20px;
61+
display: flex;
62+
fill: #ffffff;
63+
align-items: center;
64+
padding-left: 30px; /* width of the image plus a little extra padding */
65+
}
66+
67+
.dark nav > div:nth-child(4) > a {
68+
background-image: url(/assets/img/github-white.svg);
69+
}

0 commit comments

Comments
 (0)