Skip to content

Commit 406c488

Browse files
committed
更新首页UI
1 parent 5803ea4 commit 406c488

2 files changed

Lines changed: 47 additions & 16 deletions

File tree

frontend/src/assets/blog.css

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,11 @@ body {
535535
margin-top: 48px;
536536
}
537537

538+
/* 最新文章与订阅区块之间额外留白 */
539+
.home-section-latest {
540+
padding-bottom: 40px;
541+
}
542+
538543
.home-section-head {
539544
display: flex;
540545
align-items: baseline;
@@ -581,8 +586,8 @@ body {
581586
}
582587

583588
.home-newsletter {
584-
margin-top: 64px;
585-
border-radius: 18px;
589+
margin-top: 96px;
590+
border-radius: 22px;
586591
background: rgba(0, 0, 0, 0.03);
587592
border: 1px solid var(--border);
588593
}
@@ -592,30 +597,31 @@ body {
592597
}
593598

594599
.home-newsletter-inner {
595-
padding: 44px 18px;
600+
padding: 72px 40px 80px;
596601
text-align: center;
597602
}
598603

599604
.home-newsletter-title {
600605
margin: 0;
601-
font-size: 20px;
606+
font-size: 24px;
602607
font-weight: 900;
608+
letter-spacing: -0.02em;
603609
color: var(--text);
604610
}
605611

606612
.home-newsletter-sub {
607-
margin: 10px auto 0;
608-
max-width: 520px;
613+
margin: 18px auto 0;
614+
max-width: 560px;
609615
color: var(--muted);
610-
font-size: 13px;
611-
line-height: 1.8;
616+
font-size: 14px;
617+
line-height: 1.85;
612618
}
613619

614620
.home-newsletter-form {
615-
margin: 16px auto 0;
616-
max-width: 520px;
621+
margin: 32px auto 0;
622+
max-width: 560px;
617623
display: flex;
618-
gap: 10px;
624+
gap: 12px;
619625
align-items: center;
620626
justify-content: center;
621627
}
@@ -626,8 +632,8 @@ body {
626632
border: 1px solid var(--border);
627633
background: rgba(255, 255, 255, 0.9);
628634
border-radius: 999px;
629-
padding: 10px 14px;
630-
font-size: 14px;
635+
padding: 14px 20px;
636+
font-size: 15px;
631637
outline: none;
632638
color: var(--text);
633639
}
@@ -646,17 +652,42 @@ body {
646652
background: #111;
647653
color: #fff;
648654
border-radius: 999px;
649-
padding: 10px 16px;
655+
padding: 14px 24px;
650656
cursor: pointer;
651657
font-weight: 700;
652-
font-size: 13px;
658+
font-size: 14px;
659+
flex-shrink: 0;
653660
}
654661

655662
[data-theme='dark'] .home-newsletter-btn {
656663
background: #e5e7eb;
657664
color: #111;
658665
}
659666

667+
@media (max-width: 680px) {
668+
.home-newsletter {
669+
margin-top: 72px;
670+
}
671+
672+
.home-newsletter-inner {
673+
padding: 48px 20px 56px;
674+
}
675+
676+
.home-newsletter-title {
677+
font-size: 20px;
678+
}
679+
680+
.home-newsletter-form {
681+
flex-direction: column;
682+
align-items: stretch;
683+
margin-top: 24px;
684+
}
685+
686+
.home-newsletter-btn {
687+
width: 100%;
688+
}
689+
}
690+
660691
/* 首页:更接近参考图的“封面在上”的文章卡片 */
661692
.home-post-card {
662693
border-radius: 16px;

frontend/src/views/HomeView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</div>
4848
</div>
4949

50-
<section class="home-section">
50+
<section class="home-section home-section-latest">
5151
<div class="home-section-head">
5252
<h2 class="home-section-title">最新文章</h2>
5353
<router-link class="home-section-more" to="/all">查看全部 →</router-link>

0 commit comments

Comments
 (0)