From b82ad56691458ed50bb8e1513bab231b8a4adcbf Mon Sep 17 00:00:00 2001 From: radishzzz Date: Wed, 5 Mar 2025 20:27:34 +0000 Subject: [PATCH] feat: add back button --- public/image/arrow.svg | 1 + src/components/BackButton.astro | 32 +++++++++++++++++++++++++++++++ src/components/MobileHeader.astro | 11 ----------- src/content/posts/retypeset_zh.md | 2 +- src/pages/index.astro | 2 +- src/pages/posts/[slug].astro | 8 ++++---- src/styles/heti.css | 2 +- 7 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 public/image/arrow.svg create mode 100644 src/components/BackButton.astro diff --git a/public/image/arrow.svg b/public/image/arrow.svg new file mode 100644 index 0000000..0d67a08 --- /dev/null +++ b/public/image/arrow.svg @@ -0,0 +1 @@ + diff --git a/src/components/BackButton.astro b/src/components/BackButton.astro new file mode 100644 index 0000000..f61c139 --- /dev/null +++ b/src/components/BackButton.astro @@ -0,0 +1,32 @@ + + + diff --git a/src/components/MobileHeader.astro b/src/components/MobileHeader.astro index 253b275..cf2fe97 100644 --- a/src/components/MobileHeader.astro +++ b/src/components/MobileHeader.astro @@ -37,14 +37,3 @@ const marginBottom = { )} - - diff --git a/src/content/posts/retypeset_zh.md b/src/content/posts/retypeset_zh.md index 1b6beef..69d58b4 100644 --- a/src/content/posts/retypeset_zh.md +++ b/src/content/posts/retypeset_zh.md @@ -1,7 +1,7 @@ --- title: 主题介绍 published: 2024-01-25 -tags: ["天体", "Markdown"] +tags: ["Astro", "Markdown"] --- 一款基于 Astro 框架的博客主题,最初灵感来自 Typography。本主题通过建立统一的视觉规范,对原主题的所有页面进行重新编排,尽力还原传统印刷的阅读体验,同时不失现代设计的简约感受。所见皆为细节,方寸尽显优雅。 diff --git a/src/pages/index.astro b/src/pages/index.astro index d0e1f3f..826188c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -28,7 +28,7 @@ const postsByYear = await getPostsByYear() {[...postsByYear.entries()].map(([_year, posts]) => ( // Year Group -
+
{/* Decorative Line */}
{/* Posts List */} diff --git a/src/pages/posts/[slug].astro b/src/pages/posts/[slug].astro index 6ea5ceb..612e4ff 100644 --- a/src/pages/posts/[slug].astro +++ b/src/pages/posts/[slug].astro @@ -1,4 +1,5 @@ --- +import BackButton from '@/components/BackButton.astro' import Layout from '@/layouts/Layout.astro' import { checkSlugDuplication } from '@/utils/content' import { generatePostPaths } from '@/utils/i18n' @@ -25,8 +26,7 @@ const { Content, remarkPluginFrontmatter } = await post.render() postImage={post.data.image} >
- -
+

@@ -51,7 +51,7 @@ const { Content, remarkPluginFrontmatter } = await post.render() {post.data.tags && post.data.tags.length > 0 && ( -
+
{post.data.tags.map(tag => ( diff --git a/src/styles/heti.css b/src/styles/heti.css index 4fa4b21..5a812e4 100644 --- a/src/styles/heti.css +++ b/src/styles/heti.css @@ -115,7 +115,7 @@ font-weight:600 } .heti .post-title { - --at-apply: 'mt-4.375 c-primary mb-2.375 font-bold text-9 leading-12'; + --at-apply: 'mt-2.75 c-primary mb-2.375 font-bold text-9 leading-12'; line-height:48px } .heti h1 {