Skip to content

Commit ba04abf

Browse files
committed
feat(theme): restructure the footer section to make it look more stylish (#70)
1 parent 11d7f63 commit ba04abf

File tree

9 files changed

+204
-82
lines changed

9 files changed

+204
-82
lines changed

.prettierrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
semi: false
22
singleQuote: true
3-
printWidth: 80
3+
printWidth: 120
44
trailingComma: none

.vitepress/config.mts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { defineConfig } from 'vitepress'
22
import { nav, sidebar, head, socialLinks } from './configs'
33
import footnote_plugin from 'markdown-it-footnote'
4-
import {
5-
GitChangelog,
6-
GitChangelogMarkdownSection
7-
} from '@nolebase/vitepress-plugin-git-changelog/vite'
4+
import { GitChangelog, GitChangelogMarkdownSection } from '@nolebase/vitepress-plugin-git-changelog/vite'
5+
import { fileURLToPath, URL } from 'node:url'
86

97
export default defineConfig({
108
// 站点名称
@@ -47,11 +45,16 @@ export default defineConfig({
4745

4846
// 插件配置
4947
vite: {
48+
resolve: {
49+
alias: [
50+
{
51+
find: /^.*\/VPFooter\.vue$/,
52+
replacement: fileURLToPath(new URL('./theme/components/Footer.vue', import.meta.url))
53+
}
54+
]
55+
},
5056
plugins: [
51-
GitChangelog({
52-
// 填写在此处填写您的仓库链接
53-
repoURL: () => 'https://github.com/Theo-messi/xx.theovan.cn'
54-
}),
57+
GitChangelog({ repoURL: () => 'https://github.com/Theo-messi/xx.theovan.cn' }),
5558
GitChangelogMarkdownSection()
5659
]
5760
},
@@ -78,8 +81,7 @@ export default defineConfig({
7881

7982
// GitHub编辑页面
8083
editLink: {
81-
pattern:
82-
'https://github.com/Theo-messi/xx.theovan.cn/blob/main/src/:path',
84+
pattern: 'https://github.com/Theo-messi/xx.theovan.cn/blob/main/src/:path',
8385
text: '为此页提供修改建议'
8486
},
8587

.vitepress/configs/nav.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ export const nav: DefaultTheme.Config['nav'] = [
1111
{ text: '卜', link: '卜/毕法赋', activeMatch: '/卜/' },
1212
{ text: '灵宠', link: '灵宠/宠物篇', activeMatch: '/灵宠/' },
1313
{ text: '相关经典', link: '相关经典/道德经', activeMatch: '/相关经典/' },
14-
{
15-
text: '提交书籍与纠错',
16-
link: '提交书籍与纠错',
17-
activeMatch: '/提交书籍与纠错/'
18-
},
19-
{
20-
text: '服务推荐',
21-
link: 'https://theovan.xyz/serve/sharing/Account-sharing-guide'
22-
}
14+
{ text: '提交书籍与纠错', link: '提交书籍与纠错', activeMatch: '/提交书籍与纠错/' },
15+
{ text: '服务推荐', link: 'https://theovan.xyz/serve/sharing/Account-sharing-guide' }
2316
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<template>
2+
<footer class="bg-alt f12 lh-normal" style="text-align: center; margin: 0 auto">
3+
<div class="flex flex-grow-1 ma4" style="display: flex; justify-content: center; width: 100%">
4+
<!-- GitHub Source -->
5+
<div class="fb6">
6+
<div class="mb2 fw6 f14">GitHub Source</div>
7+
<ul>
8+
<li class="mb2">
9+
<a class="external-link" target="_blank" href="https://github.com/Theo-messi/Theo-Docs">Theo-Docs</a>
10+
</li>
11+
<li class="mb2">
12+
<a class="external-link" target="_blank" href="https://github.com/Theo-messi/xx.theovan.cn">玄学宝典</a>
13+
</li>
14+
<li class="mb2">
15+
<a class="external-link" target="_blank" href="https://github.com/Theo-messi/share.theovan.cn"
16+
>阿里云盘资源分享</a
17+
>
18+
</li>
19+
<li class="mb2">
20+
<a class="external-link" target="_blank" href="https://github.com/Theo-messi/own-rules">自用 Clash 配置</a>
21+
</li>
22+
</ul>
23+
</div>
24+
<!-- 合作伙伴 -->
25+
<div class="fb6">
26+
<div class="mb2 fw6 f14">合作伙伴</div>
27+
<ul>
28+
<li class="mb2">
29+
<a class="external-link" target="_blank" href="https://nf.video/kaIuE">银河录像局</a>
30+
</li>
31+
<li class="mb2">
32+
<a class="external-link" target="_blank" href="https://ihezu.love/UKTer6">奈飞小铺</a>
33+
</li>
34+
<li class="mb2">
35+
<a class="external-link" target="_blank" href="https://fbinv01.fbaff.cc/auth/register?code=RZP3"
36+
>FlyingBird</a
37+
>
38+
</li>
39+
<li class="mb2">
40+
<a class="external-link" target="_blank" href="https://patriot.ninja/aff.php?aff=1471">Bridge The Wise</a>
41+
</li>
42+
<li class="mb2">
43+
<a class="external-link" target="_blank" href="https://sms-activate.org/?ref=8170513">SMS-Activate</a>
44+
</li>
45+
</ul>
46+
</div>
47+
<!-- 观影指南 -->
48+
<div class="fb6">
49+
<div class="mb2 fw6 f14">观影指南</div>
50+
<ul>
51+
<li class="mb2">
52+
<a class="external-link" target="_blank" href="https://theovan.cn/streaming/Netflix-guide">Netflix</a>
53+
</li>
54+
<li class="mb2">
55+
<a class="external-link" target="_blank" href="https://theovan.cn/streaming/Disney-introduce">Disney+</a>
56+
</li>
57+
<li class="mb2">
58+
<a class="external-link" target="_blank" href="https://theovan.cn/streaming/Spotify">Spotify Premium</a>
59+
</li>
60+
<li class="mb2">
61+
<a class="external-link" target="_blank" href="https://theovan.cn/streaming/YouTube">YouTube Premium</a>
62+
</li>
63+
<li class="mb2">
64+
<a class="external-link" target="_blank" href="https://theovan.cn/streaming/Hulu">Hulu</a>
65+
</li>
66+
<li class="mb2">
67+
<a class="external-link" target="_blank" href="https://theovan.cn/streaming/HBO-Max">HBO Max</a>
68+
</li>
69+
</ul>
70+
</div>
71+
<!-- 友情链接 -->
72+
<div class="fb6">
73+
<div class="mb2 fw6 f14">相关链接</div>
74+
<ul>
75+
<li class="mb2">
76+
<a class="external-link" target="_blank" href="https://theovan.cn/">Theo-Docs</a>
77+
</li>
78+
<li class="mb2">
79+
<a class="external-link" target="_blank" href="https://xx.theovan.cn/">玄学宝典</a>
80+
</li>
81+
<li class="mb2">
82+
<a class="external-link" target="_blank" href="https://share.theovan.cn/">阿里云盘资源分享</a>
83+
</li>
84+
<li class="mb2">
85+
<a class="external-link" target="_blank" href="https://vitepress.dev/">VitePress</a>
86+
</li>
87+
</ul>
88+
</div>
89+
</div>
90+
91+
<!-- 底部信息栏 -->
92+
93+
<div class="flex ma4" style="display: inline-block">
94+
<span class="ml1"
95+
>Copyright © 2019 - {{ new Date().getFullYear() }}
96+
<a target="_blank" href="https://github.com/Theo-messi">Theo-Messi</a>. All Rights Reserved</span
97+
>
98+
<span class="ml1">ICP备粤<a target="_blank" href="https://theovan.cn/">B2-20090059号</a></span>
99+
<span class="ml1">粤公网安备<a target="_blank" href="https://theovan.cn/">44030002000001号</a></span>
100+
</div>
101+
</footer>
102+
</template>

.vitepress/theme/components/pendant.vue

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ const asideSponsors = computed(() => {
3535

3636
<template>
3737
<VPDocAsideSponsors :data="asideSponsors" />
38-
<a
39-
class="banner mp"
40-
href="https://fbinv01.fbaff.cc/auth/register?code=RZP3"
41-
target="_blank"
42-
>
38+
<a class="banner mp" href="https://fbinv01.fbaff.cc/auth/register?code=RZP3" target="_blank">
4339
<!-- <img
4440
width="22"
4541
height="22"
@@ -61,38 +57,22 @@ const asideSponsors = computed(() => {
6157
</span>
6258
</a>
6359
<a class="banner mp" href="https://share.theovan.cn/" target="_blank">
64-
<img
65-
width="22"
66-
height="22"
67-
src="https://m.theovan.cn/docs/202405101119004.png"
68-
/>
60+
<img width="22" height="22" src="https://m.theovan.cn/docs/202405101119004.png" />
6961
<span>
7062
<p class="extra-info">快速获取热门影视资源</p>
7163
<p class="heading">阿里云盘资源分享</p>
7264
<p class="extra-info">转存观看!</p>
7365
</span>
7466
</a>
75-
<a
76-
class="banner mp"
77-
href="https://theovan.xyz/serve/sharing/Account-sharing-guide"
78-
target="_blank"
79-
>
80-
<img
81-
width="22"
82-
height="22"
83-
src="https://cdn.iconscout.com/icon/free/png-256/free-netflix-2296042-1912001.png"
84-
/>
67+
<a class="banner mp" href="https://theovan.xyz/serve/sharing/Account-sharing-guide" target="_blank">
68+
<img width="22" height="22" src="https://cdn.iconscout.com/icon/free/png-256/free-netflix-2296042-1912001.png" />
8569
<span>
8670
<p class="extra-info">流媒体账号合租</p>
8771
<p class="heading">流媒体帐号合租</p>
8872
<p class="extra-info">转存观看!</p>
8973
</span>
9074
</a>
91-
<a
92-
class="banner mp"
93-
href="https://github.com/sponsors/Theo-messi"
94-
target="_blank"
95-
>
75+
<a class="banner mp" href="https://github.com/sponsors/Theo-messi" target="_blank">
9676
<img width="22" height="22" src="https://theovan.cn/爱心.png" />
9777
<span>
9878
<!-- <p class="extra-info">Sponsor for me</p> -->
@@ -179,12 +159,7 @@ const asideSponsors = computed(() => {
179159
}
180160
181161
.banner .heading {
182-
background-image: linear-gradient(
183-
120deg,
184-
var(--vp-c-brand-3) 32%,
185-
var(--vp-c-brand-2),
186-
var(--vp-c-brand-1)
187-
);
162+
background-image: linear-gradient(120deg, var(--vp-c-brand-3) 32%, var(--vp-c-brand-2), var(--vp-c-brand-1));
188163
background-clip: text;
189164
-webkit-background-clip: text;
190165
-webkit-text-fill-color: transparent;
@@ -197,12 +172,7 @@ const asideSponsors = computed(() => {
197172
}
198173
199174
.banner.mp .heading {
200-
background-image: linear-gradient(
201-
120deg,
202-
var(--vp-c-brand-3) 32%,
203-
var(--vp-c-brand-2),
204-
var(--vp-c-brand-1)
205-
);
175+
background-image: linear-gradient(120deg, var(--vp-c-brand-3) 32%, var(--vp-c-brand-2), var(--vp-c-brand-1));
206176
}
207177
208178
.banner.mp .Activity {

.vitepress/theme/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,12 @@ export default {
2626
name: 'Theo',
2727
username: 'Theo-messi',
2828
mapByNameAliases: ['Theo', 'vanhiupun'],
29-
mapByEmailAliases: [
30-
31-
32-
33-
]
29+
3430
},
3531
{
3632
name: 'dependabot',
3733
username: 'dependabot',
38-
mapByEmailAliases: [
39-
'49699333+dependabot[bot]@users.noreply.github.com'
40-
]
34+
mapByEmailAliases: ['49699333+dependabot[bot]@users.noreply.github.com']
4135
}
4236
]
4337
})

.vitepress/theme/styles/footer.css

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* 页脚 */
2+
footer {
3+
width: 100%;
4+
}
5+
6+
footer a:hover {
7+
text-decoration: underline;
8+
}
9+
10+
.has-sidebar ~ footer {
11+
display: none;
12+
}
13+
14+
.external-link::after {
15+
content: ' ↗️';
16+
/* margin-left: 2px; */
17+
color: var(--vp-c-text-3);
18+
}
19+
20+
.bg-alt {
21+
background: var(--vp-c-bg-alt);
22+
}
23+
24+
.lh-normal {
25+
line-height: normal;
26+
}
27+
28+
.flex {
29+
display: flex;
30+
}
31+
32+
.flex-grow-1 {
33+
flex-grow: 1;
34+
}
35+
36+
.ma4 {
37+
margin: 1.5rem;
38+
}
39+
.ma2 {
40+
margin: 1rem;
41+
}
42+
.ml0 {
43+
margin-left: 0.5rem;
44+
}
45+
46+
.ml1 {
47+
margin-left: 1rem;
48+
}
49+
.mb2 {
50+
margin-bottom: 0.5rem;
51+
}
52+
53+
.f12 {
54+
font-size: 12px;
55+
}
56+
57+
.f14 {
58+
font-size: 13px;
59+
}
60+
61+
.fw6 {
62+
font-weight: 600;
63+
}
64+
65+
.fb6 {
66+
flex-basis: 20rem;
67+
}
68+
69+
@media screen and (min-width: 960px) {
70+
.flex-l {
71+
display: flex;
72+
}
73+
}

.vitepress/theme/styles/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
@import './custom.css';
22
@import './home-links.css';
33
@import './vars.css';
4+
@import './footer.css';

.vitepress/theme/styles/vars.css

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
--c-bg-accent: var(--c-white-dark);
4444
--code-bg-color: var(--c-white-dark);
4545
--code-inline-bg-color: var(--c-white-dark);
46-
--code-font-family: 'dm', source-code-pro, Menlo, Monaco, Consolas,
47-
'Courier New', monospace;
46+
--code-font-family: 'dm', source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
4847
--code-font-size: 16px;
4948
}
5049

@@ -84,11 +83,7 @@ html.dark:root {
8483
--vp-c-mute-dark: var(--c-black-lighter);
8584
--vp-c-mute-darker: var(--c-black-darker);
8685

87-
--vp-home-hero-name-background: -webkit-linear-gradient(
88-
78deg,
89-
var(--c-yellow-2) 30%,
90-
var(--c-green-2)
91-
);
86+
--vp-home-hero-name-background: -webkit-linear-gradient(78deg, var(--c-yellow-2) 30%, var(--c-green-2));
9287
}
9388

9489
html.dark .DocSearch {
@@ -117,16 +112,8 @@ html.dark .DocSearch {
117112

118113
:root {
119114
--vp-home-hero-name-color: transparent;
120-
--vp-home-hero-name-background: linear-gradient(
121-
292deg,
122-
var(--c-yellow-2) 50%,
123-
var(--c-green-2)
124-
);
125-
--vp-home-hero-image-background-image: linear-gradient(
126-
15deg,
127-
var(--c-yellow-2) 65%,
128-
var(--c-green-1) 30%
129-
);
115+
--vp-home-hero-name-background: linear-gradient(292deg, var(--c-yellow-2) 50%, var(--c-green-2));
116+
--vp-home-hero-image-background-image: linear-gradient(15deg, var(--c-yellow-2) 65%, var(--c-green-1) 30%);
130117
--vp-home-hero-image-filter: blur(40px);
131118
}
132119

0 commit comments

Comments
 (0)