Skip to content

Commit 3d00bfb

Browse files
committed
优化布局,添加内容
1 parent ee6dd5d commit 3d00bfb

10 files changed

Lines changed: 445 additions & 340 deletions

File tree

docs/.vuepress/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import AsideNav from './theme/components/AsideNav.vue'
77
import GitHubCard from './theme/components/GitHubCard.vue'
88
import ItemGrid from './theme/components/ItemGrid.vue'
99
import Douyin from './theme/components/Douyin.vue'
10+
import PostsTop from './theme/components/PostsTop.vue'
1011

1112
import './theme/styles/custom.css'
1213

@@ -23,6 +24,7 @@ export default defineClientConfig({
2324
Layout: h(Layout, null, {
2425
'doc-title-after': () => h(PageContextMenu),
2526
'aside-outline-after': () => h(AsideNav),
27+
'posts-top': () => h(PostsTop),
2628
}),
2729
},
2830
})

docs/.vuepress/navbar.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { defineNavbarConfig } from 'vuepress-theme-plume'
88

99
export default defineNavbarConfig([
1010
{ text: '主页', icon: 'mdi:home', link: '/' },
11-
{ text: '博客', icon: 'mdi:blog', link: '/blog/' },
1211
{ text: '技能', icon: 'mdi:code-tags', link: '/skills' },
1312
{ text: '友链', icon: 'mdi:link', link: '/friends' },
1413
{

docs/.vuepress/plume.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default defineThemeConfig({
88
appearance: true,
99
social: [
1010
{ icon: 'github', link: 'https://github.com/Jursin/Blog' },
11-
{ icon: 'bilibili', link: 'https://space.bilibili.com/1575907920' },
1211
{
1312
icon: {
1413
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="m20 8l-8 5l-8-5V6l8 5l8-5m0-2H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2"/></svg>',
@@ -18,7 +17,7 @@ export default defineThemeConfig({
1817
},
1918
{ icon: 'rss', link: '/rss.xml' },
2019
],
21-
navbarSocialInclude: ['github', 'bilibili', 'rss'], // 允许显示在导航栏的 social 社交链接
20+
navbarSocialInclude: ['github', 'rss'], // 允许显示在导航栏的 social 社交链接
2221
// aside: true, // 页内侧边栏, 默认显示在右侧
2322
// outline: [2, 3], // 页内大纲, 默认显示 h2, h3
2423
copyright: {

docs/.vuepress/theme/components/GitHubCard.vue

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
5252
<Icon name="material-symbols:update-rounded" size="1em" />
5353
更新于:{{ formatDate(repoData.updated_at) }}
5454
</span>
55-
<span class="branch">
56-
<Icon name="octicon:git-branch-16" size="0.8em" />
57-
默认分支:{{ repoData.default_branch }}
58-
</span>
5955
</div>
6056
</div>
6157
</div>
@@ -145,7 +141,7 @@ export default {
145141
padding: 16px;
146142
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
147143
position: relative;
148-
background-color: transparent;
144+
background-color: var(--vp-c-bg);
149145
color: var(--vp-c-text-1);
150146
transition: border-color var(--vp-t-color), box-shadow var(--vp-t-color), background-color var(--vp-t-color);
151147
width: 100%;
@@ -274,12 +270,6 @@ export default {
274270
margin-left: auto;
275271
}
276272
277-
.branch {
278-
display: flex;
279-
align-items: center;
280-
gap: 4px;
281-
}
282-
283273
.language-color {
284274
width: 16px;
285275
height: 16px;
@@ -325,15 +315,17 @@ export default {
325315
}
326316
327317
.footer {
328-
flex-direction: column;
318+
flex-direction: row;
319+
flex-wrap: wrap;
329320
align-items: flex-start;
330-
gap: 8px;
321+
gap: 12px;
331322
}
332323
333324
.dates {
334325
flex-direction: column;
335326
gap: 8px;
336-
align-items: flex-start;
327+
align-items: flex-end;
328+
margin-left: auto;
337329
}
338330
}
339331
</style>

docs/.vuepress/theme/components/ItemGrid.vue

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<template>
2-
<div>
2+
<div class="skills">
3+
<h2 class="title">技能</h2>
34
<!-- 技术栈 -->
4-
<h2>🫡使用的技术栈</h2>
5+
<h3>🫡使用的技术栈</h3>
56
<div class="itemGrid">
67
<div
78
v-for="(item, index) in techStackData.techStack"
@@ -21,7 +22,7 @@
2122
</div>
2223

2324
<!-- 开发工具 -->
24-
<h2>🛠️使用的编程工具</h2>
25+
<h3>🛠️使用的编程工具</h3>
2526
<div class="itemGrid">
2627
<div
2728
v-for="(item, index) in devToolsData.devTools"
@@ -41,7 +42,7 @@
4142
</div>
4243

4344
<!-- 云服务平台 -->
44-
<h2>☁️使用的云服务平台</h2>
45+
<h3>☁️使用的云服务平台</h3>
4546
<div class="itemGrid">
4647
<div
4748
v-for="(item, index) in cloudPlatformsData.cloudPlatforms"
@@ -61,12 +62,14 @@
6162
</div>
6263
<div class="project">
6364
<div class="project-header">
64-
<Icon name="octicon:repo-16" size="1em" />
65-
<h2>开源项目</h2>
65+
<Icon name="octicon:repo-16" size="20px" />
66+
<h3>开源项目</h3>
67+
</div>
68+
<div class="github-cards-grid">
69+
<GitHubCard owner="Jursin" repo="Awesome-Class-Softwares" />
70+
<GitHubCard owner="Jursin" repo="Awesome-Class-Softwares-Web" />
71+
<GitHubCard owner="Jursin" repo="MC-Guide" />
6672
</div>
67-
<GitHubCard owner="Jursin" repo="Awesome-Class-Softwares" /><br/>
68-
<GitHubCard owner="Jursin" repo="Awesome-Class-Softwares-Web" /><br/>
69-
<GitHubCard owner="Jursin" repo="MC-Guide" /><br/>
7073
</div>
7174
</div>
7275
</template>
@@ -78,7 +81,25 @@ import cloudPlatformsData from "../data/cloudPlatforms.json";
7881
</script>
7982

8083
<style scoped>
81-
h2 {
84+
.skills {
85+
max-width: 1400px;
86+
margin: 20px auto;
87+
padding: 20px;
88+
}
89+
90+
.title {
91+
padding: 40px 0 0 0;
92+
margin: 0 0 16px 0 !important;
93+
padding: 0 !important;
94+
font-size: 28px;
95+
font-weight: 700;
96+
color: var(--vp-c-brand-1);
97+
text-align: center;
98+
outline: none;
99+
transition: color var(--vp-t-color);
100+
}
101+
102+
h3 {
82103
margin-top: 2rem;
83104
margin-bottom: 1rem;
84105
}
@@ -125,13 +146,24 @@ h2 {
125146
126147
.project-header {
127148
display: flex;
128-
align-items: baseline;
129-
gap: 0.5rem;
149+
align-items: center;
130150
margin-top: 2rem;
131151
margin-bottom: 1rem;
132152
}
133153
134-
.project-header h2 {
154+
.project-header h3 {
135155
margin: 0;
136156
}
157+
158+
.github-cards-grid {
159+
display: grid;
160+
grid-template-columns: repeat(2, 1fr);
161+
gap: 1rem;
162+
}
163+
164+
@media (max-width: 768px) {
165+
.github-cards-grid {
166+
grid-template-columns: 1fr;
167+
}
168+
}
137169
</style>

0 commit comments

Comments
 (0)