From bdc2aa32e630140499cf4f644df223610ae2d813 Mon Sep 17 00:00:00 2001 From: radishzzz Date: Tue, 4 Feb 2025 22:32:15 +0000 Subject: [PATCH] refactor: enhance site navigation and styling - Add view transitions for site title - Update Navbar with hover effects and improved typography - Modify index page layout with decorative lines and date formatting - Adjust post publication dates - Update VSCode dictionary with new terms --- .vscode/settings.json | 4 ++++ src/components/Header.astro | 5 ++++- src/components/Navbar.astro | 19 +++++++++++++------ src/components/SiteTitle.astro | 1 + src/content/posts/retypeset_en.md | 2 +- src/content/posts/retypeset_zh.md | 4 +--- src/content/posts/容忍与自由.md | 2 +- src/content/posts/羅生門.md | 2 +- src/pages/index.astro | 16 ++++++++-------- 9 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ccba829..ea9d405 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -63,6 +63,7 @@ "astrojs", "attributify", "bmoji", + "Frontmatter", "gtag", "katex", "Lightbox", @@ -76,6 +77,9 @@ "radishzz", "rehype", "Retypeset", + "Roundhand", + "STIX", + "titlebar", "Umami", "unocss", "vite", diff --git a/src/components/Header.astro b/src/components/Header.astro index 54a7633..aebcdcd 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -16,7 +16,10 @@ const marginBottom = {

- + {title}

diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index e55ff45..aa57847 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -3,21 +3,24 @@ import { getPagePath } from '@/utils/path' import { ui } from '@/utils/ui' const currentPath = Astro.url.pathname -const { currentLang, isHome, isPost, isTag, isAbout, getLocalizedPath } = getPagePath(currentPath) +const { currentLang, isHome, isPost, isTag, isAbout, getLocalizedPath } + = getPagePath(currentPath) const currentUI = ui[currentLang as keyof typeof ui] const isPostActive = isHome || isPost const isTagActive = isTag -const isAboutActive = isAbout +const isAboutActive = isAbout; --- -