diff --git a/src/components/Posts/PostItem.astro b/src/components/Posts/PostItem.astro index 309422b..ab2de9d 100644 --- a/src/components/Posts/PostItem.astro +++ b/src/components/Posts/PostItem.astro @@ -12,14 +12,14 @@ const tags = data.tags;
-

+

{data.title}

{data.description} -
+
{ tags.map((tag: string) => (

@@ -40,7 +40,13 @@ const tags = data.tags;

- {data.title} + {data.title}
@@ -167,7 +173,7 @@ const tags = data.tags; text-decoration: none; font-weight: 400; font-size: 0.92rem; - font-style: italic; + /* font-style: italic; */ } .post-meta-row { @@ -206,7 +212,7 @@ const tags = data.tags; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; - border: 2px #94a0ab dashed; + border: 1.5px #94a0ab dashed; flex-shrink: 0; display: block; } @@ -256,7 +262,7 @@ const tags = data.tags; } .post-image { - border: none; + /* border: none; */ grid-area: image; width: 100%; height: calc(145px * 10 / 16); diff --git a/src/components/Posts/PostList.astro b/src/components/Posts/PostList.astro index 0d8e26c..43cd00f 100644 --- a/src/components/Posts/PostList.astro +++ b/src/components/Posts/PostList.astro @@ -39,6 +39,7 @@ const latestPosts = filteredPosts.slice(0, 7); img={post.data.image.url} tags={post.data.tags} slug={slug} + postId={post.id} /> ); }) diff --git a/src/components/Posts/PostTimeline.astro b/src/components/Posts/PostTimeline.astro index f6a4244..d097ac1 100644 --- a/src/components/Posts/PostTimeline.astro +++ b/src/components/Posts/PostTimeline.astro @@ -54,7 +54,7 @@ const groupedPosts = filteredPosts.reduce((acc: any[], post: any) => { >

{post.data.title}

@@ -147,7 +147,8 @@ const groupedPosts = filteredPosts.reduce((acc: any[], post: any) => { margin: 0; font-size: 0.88rem; color: #555; - font-style: italic; + font-weight: 400; + /* font-style: italic; */ line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; diff --git a/src/components/ThemeIcon.astro b/src/components/ThemeIcon.astro index 259635e..415a4e0 100644 --- a/src/components/ThemeIcon.astro +++ b/src/components/ThemeIcon.astro @@ -70,15 +70,15 @@ const switchHref = "/" + segments.join("/"); } .lang-switch { - color: black; !important - font-weight: 700; !important - font-size: 0.95rem; !important - text-decoration: none; !important - line-height: 1; !important + color: black; + font-weight: 700; + font-size: 0.95rem; + text-decoration: none; + line-height: 1; } .lang-switch:hover { - text-decoration: underline; !important + text-decoration: underline; } .sun { @@ -104,37 +104,37 @@ const switchHref = "/" + segments.join("/"); diff --git a/src/layouts/MarkdownPostLayout.astro b/src/layouts/MarkdownPostLayout.astro index 3b12688..55686b4 100644 --- a/src/layouts/MarkdownPostLayout.astro +++ b/src/layouts/MarkdownPostLayout.astro @@ -1,10 +1,11 @@ --- import BaseLayout from "./BaseLayout.astro"; import Remark42Embed from "@/components/Remark42Embed.astro"; +import { fade } from "astro:transitions"; import { getLangFromUrl, getTranslations } from "@/i18n"; import "@/styles/global.css"; -const { frontmatter, lang, postId } = Astro.props; +const { frontmatter, lang, slug, postId } = Astro.props; const comments = lang === "zh" ? "评论区" : "comments"; const t = getTranslations(lang); --- @@ -14,7 +15,7 @@ const t = getTranslations(lang); description={frontmatter.description} image={frontmatter.image?.url} > - +