Skip to content

Commit 812d2ea

Browse files
committed
update docs
1 parent fd09d34 commit 812d2ea

31 files changed

+1270
-118
lines changed

docs/.vuepress/bulletin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {BulletinOptions} from "vuepress-theme-plume";
22

33
export const myBulletin: BulletinOptions = {
44
enablePage: true,
5+
lifetime: 'session',
56
title: '欢迎加入我们',
67
content: `
78
::: center

docs/.vuepress/client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
import {defineClientConfig} from 'vuepress/client'
22
import RepoCard from 'vuepress-theme-plume/features/RepoCard.vue'
3+
import Layout from './layouts/Layout.vue'
34

45
import './styles/custom.css'
56
import Swiper from "./components/Swiper.vue";
7+
import SponsorPanel from "./components/SponsorPanel.vue";
68

79
export default defineClientConfig({
810
enhance({app}) {
911
app.component('RepoCard', RepoCard)
1012
app.component('Swiper', Swiper)
13+
app.component('SponsorPanel', SponsorPanel)
1114
},
15+
layouts: {
16+
Layout,
17+
}
1218
})
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<template>
2+
<div class="sponsor-container">
3+
<!-- Gold Sponsors Section -->
4+
<div class="gold-sponsors">
5+
<div
6+
v-for="(sponsor, index) in goldSponsors"
7+
:key="'gold-' + index"
8+
class="sponsor-item gold"
9+
@click="openSponsorLink(sponsor.href)"
10+
>
11+
<img
12+
v-if="sponsor.link"
13+
:src="sponsor.link"
14+
:alt="sponsor.alt"
15+
class="sponsor-image"
16+
/>
17+
<span v-else class="sponsor-text">{{ sponsor.text }}</span>
18+
</div>
19+
</div>
20+
21+
<!-- Regular Sponsors Section -->
22+
<div class="general-sponsors">
23+
<div
24+
v-for="(sponsor, index) in generalSponsors"
25+
:key="'general-' + index"
26+
class="sponsor-item"
27+
@click="openSponsorLink(sponsor.href)"
28+
>
29+
<img
30+
v-if="sponsor.link"
31+
:src="sponsor.link"
32+
:alt="sponsor.alt"
33+
class="sponsor-image"
34+
/>
35+
<span v-else class="sponsor-text">{{ sponsor.text }}</span>
36+
</div>
37+
</div>
38+
</div>
39+
</template>
40+
41+
<script setup>
42+
import { goldSponsors, generalSponsors } from "../data/sponsors";
43+
44+
const openSponsorLink = (href) => {
45+
window.open(href, '_blank')
46+
}
47+
</script>
48+
49+
<style scoped>
50+
.sponsor-container {
51+
display: flex;
52+
flex-direction: column;
53+
gap: 5px;
54+
margin: 10px 0;
55+
}
56+
57+
.gold-sponsors {
58+
display: flex;
59+
flex-direction: column;
60+
gap: 5px;
61+
}
62+
63+
.general-sponsors {
64+
display: grid;
65+
grid-template-columns: repeat(2, 1fr);
66+
gap: 3px;
67+
}
68+
69+
.sponsor-item {
70+
background-color: var(--vp-c-bg-soft);
71+
cursor: pointer;
72+
display: flex;
73+
align-items: center;
74+
justify-content: center;
75+
min-height: 68px;
76+
}
77+
78+
.sponsor-item.gold {
79+
height: 98px;
80+
}
81+
82+
.sponsor-image {
83+
width: 100%;
84+
height: 100%;
85+
object-fit:cover;
86+
}
87+
88+
.sponsor-text {
89+
color: var(--vp-c-text-3);
90+
font-size: 10px;
91+
}
92+
93+
.sponsor-item.gold .sponsor-text {
94+
font-size: 14px;
95+
}
96+
</style>

docs/.vuepress/components/Swiper.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
EffectCreative,
88
EffectCube,
99
EffectFade,
10+
EffectFlip,
1011
Mousewheel,
1112
Navigation,
1213
Pagination,
@@ -198,8 +199,8 @@ function onSwiper(swiper: SwiperType) {
198199
.swiper-slide-custom-container {
199200
width: 100%;
200201
height: 100%;
201-
border: 1px solid #ccc;
202-
border-radius: 8px;
202+
border: 1px solid var(--vp-c-text-3);
203+
border-radius: 6px;
203204
}
204205
205206
.swiper-slide-text {

docs/.vuepress/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export default defineUserConfig({
4949
icons: true,
5050
bilibili: true,
5151
},
52+
markdownEnhance: {
53+
mermaid: true,
54+
},
5255
},
5356
}),
5457
bundler: viteBundler(),

docs/.vuepress/data/sponsors.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import {ref} from "vue";
2+
3+
export const goldSponsors = ref([
4+
{
5+
link: '',
6+
text: '成为赞助商',
7+
href: 'https://discord.com/invite/yNN3wTbVAC',
8+
alt: 'wu-clan',
9+
},
10+
{
11+
link: '',
12+
text: '成为赞助商',
13+
href: 'https://discord.com/invite/yNN3wTbVAC',
14+
alt: 'wu-clan',
15+
},
16+
{
17+
link: '',
18+
text: '成为赞助商',
19+
href: 'https://discord.com/invite/yNN3wTbVAC',
20+
alt: 'wu-clan',
21+
}
22+
])
23+
24+
export const generalSponsors = ref([
25+
{
26+
link: '',
27+
text: '成为赞助商',
28+
href: 'https://discord.com/invite/yNN3wTbVAC',
29+
alt: 'wu-clan',
30+
},
31+
{
32+
link: '',
33+
text: '成为赞助商',
34+
href: 'https://discord.com/invite/yNN3wTbVAC',
35+
alt: 'wu-clan',
36+
},
37+
{
38+
link: '',
39+
text: '成为赞助商',
40+
href: 'https://discord.com/invite/yNN3wTbVAC',
41+
alt: 'wu-clan',
42+
},
43+
{
44+
link: '',
45+
text: '成为赞助商',
46+
href: 'https://discord.com/invite/yNN3wTbVAC',
47+
alt: 'wu-clan',
48+
},
49+
{
50+
link: '',
51+
text: '成为赞助商',
52+
href: 'https://discord.com/invite/yNN3wTbVAC',
53+
alt: 'wu-clan',
54+
},
55+
{
56+
link: '',
57+
text: '成为赞助商',
58+
href: 'https://discord.com/invite/yNN3wTbVAC',
59+
alt: 'wu-clan',
60+
}
61+
])

docs/.vuepress/layouts/Layout.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script setup>
2+
import { Layout } from 'vuepress-theme-plume/client'
3+
import SponsorPanel from "../components/SponsorPanel.vue";
4+
</script>
5+
6+
<template>
7+
<Layout>
8+
<template #aside-outline-after>
9+
<div class="custom-content">
10+
<SponsorPanel />
11+
</div>
12+
</template>
13+
</Layout>
14+
</template>
15+
16+
<style>
17+
.custom-content {
18+
width: 100%;
19+
}
20+
</style>

docs/.vuepress/navbar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const myNavbar = defineNavbarConfig([
4040
},
4141
{
4242
text: '互动',
43-
icon: 'ic:baseline-discord',
43+
icon: 'game-icons:talk',
4444
link: 'https://wu-clan.github.io/homepage/'
4545
},
4646
{
@@ -49,7 +49,7 @@ export const myNavbar = defineNavbarConfig([
4949
items: [
5050
{
5151
text: '谁在使用',
52-
icon: 'fa-solid:user-friends',
52+
icon: 'mdi:user-check',
5353
link: '/who'
5454
},
5555
{
Loading

docs/.vuepress/sidebar.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,29 @@ export const mySidebar: SidebarMulti = {
1818
collapsed: false,
1919
prefix: 'reference/',
2020
items: [
21-
{text: '授权', link: 'oauth'},
22-
{text: '跨域', link: 'cors'},
21+
{text: 'JWT', link: 'jwt'},
22+
{text: '跨域', link: 'CORS'},
2323
{text: 'RBAC', link: 'RBAC'},
24+
{text: 'CRUD', link: 'CRUD'},
2425
{text: '事务', link: 'transaction'},
26+
{text: '切换数据库', link: 'db'},
2527
{text: '数据规则', link: 'data-rule'},
2628
{text: '代码生成', link: 'code-generation'},
29+
{text: '自定义异常', link: 'custom-err-msg'},
30+
{text: '接口响应', link: 'response'},
31+
{text: '分页', link: 'paginate'},
32+
{text: 'Celery', link: 'Celery'},
33+
{text: 'APScheduler', link: 'apscheduler'},
34+
{text: '日志分析', link: 'log'},
35+
{text: 'Socketio', link: 'socketio'},
2736
]
2837
},
2938
{
3039
text: 'Mixin',
3140
collapsed: false,
3241
prefix: 'mixin/',
3342
items: [
34-
{text: '用户', link: 'user'},
43+
{text: '用户信息', link: 'user'},
3544
]
3645
},
3746
{

0 commit comments

Comments
 (0)