Skip to content

Commit 16ced01

Browse files
committed
留言板横幅调整
1 parent e6d3a2e commit 16ced01

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

src/assets/msgboard/board.png

-743 KB
Binary file not shown.

src/assets/msgboard/boat.png

3.18 MB
Loading

src/pages/msgboard/index.astro

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,43 @@
11
---
2-
import { Image } from 'astro:assets';
2+
import { Image } from 'astro:assets'
33
import MsgboardLayout from '@/layouts/MsgboardLayout.astro'
44
import DanmakuComments from '@/components/waline/DanmakuComments.astro'
5-
import bannerImage from '@/assets/msgboard/board.png';
5+
import bannerImage from '@/assets/msgboard/boat.png'
6+
import { Icon } from '@/custom/components/user'
67
78
const meta = {
89
title: '留言板',
910
description: '欢迎分享你的故事与想法, 请友善交流, 尊重彼此.'
1011
}
1112
---
1213

13-
<MsgboardLayout info={{ slug: '/msgboard' }} >
14-
<div id="content-header" class="animate relative w-full overflow-hidden rounded-lg shadow-lg mb-8 aspect-[3/1] md:aspect-[4/1]">
14+
<MsgboardLayout info={{ slug: '/msgboard' }}>
15+
<div
16+
id='content-header'
17+
class='animate relative w-full overflow-hidden rounded-lg shadow-lg mb-8 aspect-[3/1] md:aspect-[4/1]'
18+
>
1519
<!-- Optimized Image as Background -->
16-
<Image src={bannerImage} alt="留言板横幅" class="absolute inset-0 z-0 w-full h-full object-cover object-center" />
17-
20+
<Image
21+
src={bannerImage}
22+
alt='留言板横幅'
23+
class='absolute inset-0 z-0 w-full h-full object-cover object-center'
24+
/>
25+
1826
<!-- Gradient Overlay -->
19-
<div class="absolute inset-0 z-10 bg-gradient-to-r from-black/60 via-black/30 to-transparent"></div>
20-
27+
<div class='absolute inset-0 z-10 bg-gradient-to-r from-black/60 via-black/30 to-transparent'>
28+
</div>
29+
2130
<!-- Text Content -->
22-
<div class="relative z-20 flex h-full flex-col justify-center p-6 md:p-8 md:w-3/4 lg:w-2/3">
23-
<div class="flex items-start gap-3">
24-
<div>
25-
<h1 class="text-3xl font-bold text-white">{meta.title}</h1>
26-
<p class="mt-2 text-white/80">
27-
{meta.description}
28-
</p>
29-
</div>
31+
<div class='relative z-20 flex h-full flex-col justify-center p-6 md:p-8 md:w-3/4 lg:w-2/3'>
32+
<div class='flex items-center gap-3'>
33+
<Icon name='msgboard' class='size-8 text-white' />
34+
<h1 class='text-3xl font-bold text-white'>{meta.title}</h1>
3035
</div>
36+
<p class='mt-2 text-white/80'>
37+
{meta.description}
38+
</p>
3139
</div>
3240
</div>
3341

3442
<DanmakuComments />
35-
36-
</MsgboardLayout>
43+
</MsgboardLayout>

0 commit comments

Comments
 (0)