Skip to content

Commit 8da2c71

Browse files
committed
chore: format code
1 parent 0fafff2 commit 8da2c71

File tree

10 files changed

+257
-55
lines changed

10 files changed

+257
-55
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: 120
3+
printWidth: 80
44
trailingComma: none

.vitepress/config.mts

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

710
export default defineConfig({
@@ -49,12 +52,16 @@ export default defineConfig({
4952
alias: [
5053
{
5154
find: /^.*\/VPFooter\.vue$/,
52-
replacement: fileURLToPath(new URL('./theme/components/Footer.vue', import.meta.url))
55+
replacement: fileURLToPath(
56+
new URL('./theme/components/Footer.vue', import.meta.url)
57+
)
5358
}
5459
]
5560
},
5661
plugins: [
57-
GitChangelog({ repoURL: () => 'https://github.com/Theo-messi/xx.theovan.cn' }),
62+
GitChangelog({
63+
repoURL: () => 'https://github.com/Theo-messi/xx.theovan.cn'
64+
}),
5865
GitChangelogMarkdownSection()
5966
]
6067
},
@@ -81,7 +88,8 @@ export default defineConfig({
8188

8289
// GitHub编辑页面
8390
editLink: {
84-
pattern: 'https://github.com/Theo-messi/xx.theovan.cn/blob/main/src/:path',
91+
pattern:
92+
'https://github.com/Theo-messi/xx.theovan.cn/blob/main/src/:path',
8593
text: '为此页提供修改建议'
8694
},
8795

.vitepress/configs/nav.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ export const nav: DefaultTheme.Config['nav'] = [
1111
{ text: '卜', link: '卜/毕法赋', activeMatch: '/卜/' },
1212
{ text: '灵宠', link: '灵宠/宠物篇', activeMatch: '/灵宠/' },
1313
{ text: '相关经典', link: '相关经典/道德经', activeMatch: '/相关经典/' },
14-
{ text: '提交书籍与纠错', link: '提交书籍与纠错', activeMatch: '/提交书籍与纠错/' },
15-
{ text: '服务推荐', link: 'https://doc.theovan.cn/serve/sharing/Account-sharing-guide' }
14+
{
15+
text: '提交书籍与纠错',
16+
link: '提交书籍与纠错',
17+
activeMatch: '/提交书籍与纠错/'
18+
},
19+
{
20+
text: '服务推荐',
21+
link: 'https://doc.theovan.cn/serve/sharing/Account-sharing-guide'
22+
}
1623
]

.vitepress/theme/components/AsideLogo.vue

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,38 @@
2121
</span>
2222
</a>
2323
<a class="banner mp" href="https://share.theovan.cn/" target="_blank">
24-
<img width="22" height="22" src="https://i.theovan.cn/docs/202405101119004.png" />
24+
<img
25+
width="22"
26+
height="22"
27+
src="https://i.theovan.cn/docs/202405101119004.png"
28+
/>
2529
<span>
2630
<p class="extra-info">快速获取热门影视资源</p>
2731
<p class="heading">阿里云盘资源分享</p>
2832
<p class="extra-info">转存观看!</p>
2933
</span>
3034
</a>
31-
<a class="banner mp" href="https://doc.theovan.cn/serve/sharing/Account-sharing-guide" target="_blank">
32-
<img width="22" height="22" src="https://cdn.iconscout.com/icon/free/png-256/free-netflix-2296042-1912001.png" />
35+
<a
36+
class="banner mp"
37+
href="https://doc.theovan.cn/serve/sharing/Account-sharing-guide"
38+
target="_blank"
39+
>
40+
<img
41+
width="22"
42+
height="22"
43+
src="https://cdn.iconscout.com/icon/free/png-256/free-netflix-2296042-1912001.png"
44+
/>
3345
<span>
3446
<p class="extra-info">流媒体账号合租</p>
3547
<p class="heading">流媒体帐号合租</p>
3648
<p class="extra-info">共享车位</p>
3749
</span>
3850
</a>
39-
<a class="banner mp" href="https://github.com/sponsors/Theo-messi" target="_blank">
51+
<a
52+
class="banner mp"
53+
href="https://github.com/sponsors/Theo-messi"
54+
target="_blank"
55+
>
4056
<img width="22" height="22" src="https://doc.theovan.cn/爱心.png" />
4157
<span>
4258
<!-- <p class="extra-info">Sponsor for me</p> -->
@@ -119,7 +135,12 @@
119135
}
120136
121137
.heading {
122-
background-image: linear-gradient(120deg, var(--vp-c-brand-3) 32%, var(--vp-c-brand-2), var(--vp-c-brand-1));
138+
background-image: linear-gradient(
139+
120deg,
140+
var(--vp-c-brand-3) 32%,
141+
var(--vp-c-brand-2),
142+
var(--vp-c-brand-1)
143+
);
123144
background-clip: text;
124145
-webkit-background-clip: text;
125146
-webkit-text-fill-color: transparent;

.vitepress/theme/components/Box.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,18 @@
1717
<span v-else class="icon">
1818
<i :class="item.icon + ' fa-2xl'" :style="{ color: item.color }"></i>
1919
</span>
20-
<img v-if="item.light" :src="item.light" alt="icon" class="icon-container light-only" />
21-
<img v-if="item.dark" :src="item.dark" alt="icon" class="icon-container dark-only" />
20+
<img
21+
v-if="item.light"
22+
:src="item.light"
23+
alt="icon"
24+
class="icon-container light-only"
25+
/>
26+
<img
27+
v-if="item.dark"
28+
:src="item.dark"
29+
alt="icon"
30+
class="icon-container dark-only"
31+
/>
2232
<p class="name">{{ item.name }}</p>
2333
</div>
2434
</a>
@@ -46,7 +56,10 @@ export default {
4656
},
4757
methods: {
4858
isImage(url) {
49-
return typeof url === 'string' && /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/.test(url)
59+
return (
60+
typeof url === 'string' &&
61+
/\.(png|jpe?g|gif|svg|webp)(\?.*)?$/.test(url)
62+
)
5063
}
5164
}
5265
}

.vitepress/theme/components/BoxCube.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
<span v-else class="icon">
1616
<i :class="item.icon + ' fa-2xl'" :style="{ color: item.color }"></i>
1717
</span>
18-
<img v-if="item.light" :src="item.light" alt="icon" class="img light-only" />
18+
<img
19+
v-if="item.light"
20+
:src="item.light"
21+
alt="icon"
22+
class="img light-only"
23+
/>
1924
<img v-if="item.dark" :src="item.dark" alt="icon" class="img dark-only" />
2025
<span class="name">{{ item.name }}</span>
2126
<span class="secondary">{{ item.secondary }}</span>
@@ -47,7 +52,10 @@ export default {
4752
},
4853
methods: {
4954
isImage(url) {
50-
return typeof url === 'string' && /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/.test(url)
55+
return (
56+
typeof url === 'string' &&
57+
/\.(png|jpe?g|gif|svg|webp)(\?.*)?$/.test(url)
58+
)
5159
}
5260
}
5361
}

0 commit comments

Comments
 (0)