Skip to content

Commit 9e9d16d

Browse files
committed
优化首页图片,移出 monaco 字体
1 parent 5bbcd95 commit 9e9d16d

5 files changed

Lines changed: 28 additions & 17 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@playform/compress": "^0.1.7",
2929
"@unocss/preset-wind3": "^66.0.0",
3030
"@unocss/reset": "^66.0.0",
31-
"@waline/client": "^3.5.2",
3231
"astro": "5.5.3",
3332
"astro-expressive-code": "^0.41.3",
3433
"astro-icon": "^1.1.5",
@@ -50,6 +49,7 @@
5049
"prettier": "^3.5.1",
5150
"prettier-plugin-astro": "^0.14.1",
5251
"rollup-plugin-visualizer": "^5.14.0",
53-
"typescript-eslint": "^8.24.1"
52+
"typescript-eslint": "^8.24.1",
53+
"@waline/client": "^3.5.2"
5454
}
5555
}

src/assets/avatar.webp

7.92 KB
Loading

src/assets/styles/app.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
src: url(https://npm.elemecdn.com/fontcdn-ariasaka@1.0.0/HYTangMeiRen55W.woff2) format("woff2")
77
}
88

9-
@font-face {
9+
/* @font-face {
1010
font-family: Monaco;
1111
font-display: swap;
1212
src: url(https://cdn1.tianli0.top/npm/fontcdn-ariasaka@1.0.0/MONACO.TTF) format("truetype")
13-
}
13+
} */
1414

1515

1616
html {

src/components/BaseHead.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ const socialImageURL = new URL(ogImage ? ogImage : '/images/social-card.png', As
3333
type='font/woff2'
3434
crossorigin
3535
/>
36-
<link
36+
<!-- <link
3737
rel='preload'
3838
href='https://cdn1.tianli0.top/npm/fontcdn-ariasaka@1.0.0/MONACO.TTF'
3939
as='font'
4040
type='font/ttf'
4141
crossorigin
42-
/>
42+
/> -->
4343

4444
{/* Canonical URL */}
4545
<link rel='canonical' href={canonicalURL} />

src/pages/index.astro

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { Image } from 'astro:assets'
33
44
import { PostPreview } from 'astro-pure/components/pages'
55
import { getBlogCollection, sortMDByDate } from 'astro-pure/server'
6-
import { Button, Card, Icon, Label } from 'astro-pure/user'
6+
import { Button, Icon, Label } from 'astro-pure/user'
77
import PageLayout from '@/layouts/BaseLayout.astro'
88
import Section from '@/components/home/Section.astro'
99
import SkillLayout from '@/components/home/SkillLayout.astro'
10-
import avatar from '@/assets/avatar.jpeg'
10+
import avatar from '@/assets/avatar.webp'
1111
import config from '@/site-config'
1212
1313
const languages = [
@@ -119,7 +119,7 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
119119
<Label
120120
title='GitHub'
121121
as='a'
122-
href='https://github.com/your-github'
122+
href='https://github.com/catcodeme'
123123
target='_blank'
124124
class='transition-colors hover:text-primary'
125125
>
@@ -128,7 +128,7 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
128128
<Label
129129
title='twitter'
130130
as='a'
131-
href='https://twitter.com/your-handle'
131+
href='https://twitter.com/hulj13'
132132
target='_blank'
133133
class='transition-colors hover:text-primary'
134134
>
@@ -137,7 +137,7 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
137137
<Label
138138
title='Bilibili'
139139
as='a'
140-
href='https://space.bilibili.com/your-id'
140+
href='https://space.bilibili.com/19080963'
141141
target='_blank'
142142
class='transition-colors hover:text-primary'
143143
>
@@ -147,14 +147,23 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
147147

148148
<!-- 按钮组 -->
149149
<div class='flex flex-col gap-4 sm:flex-row sm:justify-start'>
150-
<Button title='About Me' href='/about' style='ahead' class='hero-button w-full sm:w-auto' />
151-
<Button title='View Blog' href='/blog' style='ahead' class='hero-button w-full sm:w-auto' />
150+
<Button
151+
title='About Me'
152+
href='/about'
153+
style='ahead'
154+
class='hero-button w-full sm:w-auto'
155+
/>
156+
<Button
157+
title='View Blog'
158+
href='/blog'
159+
style='ahead'
160+
class='hero-button w-full sm:w-auto'
161+
/>
152162
</div>
153163
</div>
154164
</div>
155165
</div>
156166
</div>
157-
158167
</section>
159168

160169
<!-- 第二屏:博客文章和技能 -->
@@ -210,7 +219,9 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
210219
></span>
211220
<span class='size-1.5 sm:size-2 rounded-full bg-green-400'></span>
212221
</span>
213-
<p class='font-medium text-muted-foreground whitespace-nowrap'>五帝三皇神圣事,骗了无涯过客</p>
222+
<p class='font-medium text-muted-foreground whitespace-nowrap'>
223+
五帝三皇神圣事,骗了无涯过客
224+
</p>
214225
</div>
215226
</div>
216227
</div>
@@ -483,7 +494,7 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
483494
.avatar-wrapper:hover .avatar-message {
484495
opacity: 0;
485496
}
486-
497+
487498
/* 在小屏幕上禁用头像点击交互 */
488499
.avatar-wrapper {
489500
pointer-events: none;
@@ -495,7 +506,7 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)
495506
display: flex !important;
496507
justify-content: space-between !important;
497508
}
498-
509+
499510
@media (min-width: 640px) {
500511
.hero-button {
501512
display: inline-flex !important;

0 commit comments

Comments
 (0)