From 80d461f0e273ecb9a8f2bda7780c13082953d0e0 Mon Sep 17 00:00:00 2001 From: xy <10816187@qq.com> Date: Sat, 15 Aug 2026 21:45:31 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AFui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/IndexPage.astro | 55 ++++++++++++--------------------- src/components/PageHeader.astro | 38 +++++++++++++++++++++++ src/components/Post/List.astro | 2 +- src/pages/post/[...slug].astro | 37 +++++----------------- 4 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 src/components/PageHeader.astro diff --git a/src/components/IndexPage.astro b/src/components/IndexPage.astro index 49ea51c..0c5b0c9 100644 --- a/src/components/IndexPage.astro +++ b/src/components/IndexPage.astro @@ -3,6 +3,7 @@ import {siteConfig} from "@/consts.ts"; import PostList from "@/components/Post/List.astro"; import Pagination from "@/components/Post/Pagination.astro"; import type {Post} from "@/types"; +import PageHeader from "@/components/PageHeader.astro"; const {siteTitle} = siteConfig; @@ -16,22 +17,12 @@ const {posts, page, totalPage} = Astro.props ---
-
-
-

{siteTitle}

- - - - - - - -
-
-

did you stand too close to the fire?
- like a liar looking for forgiveness from a stone.

-
-
+ + +
+

did you stand too close to the fire?
+ like a liar looking for forgiveness from a stone.

+
@@ -53,24 +44,6 @@ const {posts, page, totalPage} = Astro.props gap: 24px; } - header { - margin-bottom: 24px; - margin-top: 48px; - } - - .top { - display: flex; - justify-content: space-between; - align-items: center; - border-bottom: var(--border-primary); - padding-bottom: 16px; - } - - h1 { - font-size: 24px; - font-weight: 600; - } - nav { display: flex; gap: 12px; @@ -79,11 +52,12 @@ const {posts, page, totalPage} = Astro.props } .intro { - padding: 28px 0; border-bottom: var(--border-secondary); line-height: 2; font-size: 15px; color: var(--text-secondary); + padding-bottom: 32px; + margin-bottom: 12px; } main { @@ -104,4 +78,15 @@ const {posts, page, totalPage} = Astro.props gap: 12px; color: var(--text-tertiary); } + + @media (max-width: 640px) { + .page-content { + gap: 24px; + } + + footer { + height: 64px; + padding-bottom: 0; + } + } diff --git a/src/components/PageHeader.astro b/src/components/PageHeader.astro new file mode 100644 index 0000000..778c3dc --- /dev/null +++ b/src/components/PageHeader.astro @@ -0,0 +1,38 @@ +--- +import {siteConfig} from "@/consts.ts"; +const {siteTitle} = siteConfig; +--- + +
+

{siteTitle}

+ + + + + + + +
+ + diff --git a/src/components/Post/List.astro b/src/components/Post/List.astro index 771a3c9..6ebe24a 100644 --- a/src/components/Post/List.astro +++ b/src/components/Post/List.astro @@ -39,7 +39,7 @@ const {posts} = Astro.props } .post h2 { - font-size: 17px; + font-size: 16px; font-weight: 500; flex: 1; white-space: nowrap; diff --git a/src/pages/post/[...slug].astro b/src/pages/post/[...slug].astro index efff5d3..02aebd3 100644 --- a/src/pages/post/[...slug].astro +++ b/src/pages/post/[...slug].astro @@ -4,6 +4,7 @@ import "@/styles/github-markdown-reset.css"; import "photoswipe/dist/photoswipe.css"; import Layout from '@/layouts/Layout.astro'; +import PageHeader from '@/components/PageHeader.astro'; import {createHttp} from "@/lib/request.ts"; import type {Post} from "@/types"; import {processHtmlWithJsdom} from "@/lib/processHtml.ts"; @@ -31,10 +32,7 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
- +
@@ -69,39 +67,18 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");