From 31af084f8a29ffbd7b195c6883354b7e4dfafbc9 Mon Sep 17 00:00:00 2001 From: saicaca Date: Tue, 10 Sep 2024 01:31:35 +0800 Subject: [PATCH 1/9] feat!: front-matter `language` -> `lang` --- scripts/new-post.js | 2 +- src/content/config.ts | 2 +- src/pages/posts/[...slug].astro | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/new-post.js b/scripts/new-post.js index 6f9f21ec8..f66a188c5 100644 --- a/scripts/new-post.js +++ b/scripts/new-post.js @@ -44,7 +44,7 @@ image: '' tags: [] category: '' draft: false -language: '' +lang: '' --- ` diff --git a/src/content/config.ts b/src/content/config.ts index 50e7d8b50..aca0bff79 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -9,7 +9,7 @@ const postsCollection = defineCollection({ image: z.string().optional().default(''), tags: z.array(z.string()).optional().default([]), category: z.string().optional().default(''), - language: z.string().optional().default(''), + lang: z.string().optional().default(''), /* For internal use */ prevTitle: z.string().default(''), diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 5025db603..34815a559 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -41,11 +41,11 @@ const jsonLd = { url: Astro.site, }, datePublished: formatDateToYYYYMMDD(entry.data.published), - inLanguage: (entry.data.language ? entry.data.language.replace('_', '-') : siteConfig.lang.replace('_', '-')), + inLanguage: (entry.data.lang ? entry.data.lang.replace('_', '-') : siteConfig.lang.replace('_', '-')), // TODO include cover image here } --- - +
Date: Tue, 10 Sep 2024 01:32:01 +0800 Subject: [PATCH 2/9] docs: update README --- README.md | 5 +++-- README.zh-CN.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1433fe1c5..425e58e60 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A static blog template built with [Astro](https://astro.build). [**🌏 한국어**](https://github.com/saicaca/fuwari/blob/main/README.ko.md)   /    [**🌏 Español**](https://github.com/saicaca/fuwari/blob/main/README.es.md) -> README version: `2024-04-07` +> README version: `2024-09-10` ![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) @@ -40,10 +40,11 @@ A static blog template built with [Astro](https://astro.build). title: My First Blog Post published: 2023-09-09 description: This is the first post of my new Astro blog. -image: /images/cover.jpg +image: ./cover.jpg tags: [Foo, Bar] category: Front-end draft: false +lang: jp # Set only if the post's language differs from the site's language in `config.ts` --- ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index b2a706397..82cc58359 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -5,7 +5,7 @@ [**🖥️在线预览(Vercel)**](https://fuwari.vercel.app)   /    [**📦旧 Hexo 版本**](https://github.com/saicaca/hexo-theme-vivia) -> README 版本:`2024-04-07` +> README 版本:`2024-09-10` ![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) @@ -36,10 +36,11 @@ title: My First Blog Post published: 2023-09-09 description: This is the first post of my new Astro blog. -image: /images/cover.jpg +image: ./cover.jpg tags: [Foo, Bar] category: Front-end draft: false +lang: jp # 仅当文章语言与 `config.ts` 中的网站语言不同时需要设置 --- ``` From f0754cae3fd78bc714038e331a38eb903884dec6 Mon Sep 17 00:00:00 2001 From: "saica.go" Date: Fri, 13 Sep 2024 20:14:03 +0800 Subject: [PATCH 3/9] perf: optimizing page transition (#178) * perf: optimizing page transition * fix: minor fixes --- src/components/Footer.astro | 18 ++-- src/components/GlobalStyles.astro | 4 +- src/components/Navbar.astro | 2 +- src/components/control/BackToTop.astro | 10 --- src/components/widget/SideBar.astro | 2 +- src/config.ts | 2 +- src/layouts/Layout.astro | 116 ++++++++++++++++++++----- src/layouts/MainGridLayout.astro | 63 ++++++++------ src/types/config.ts | 2 +- 9 files changed, 145 insertions(+), 74 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 14c535b20..f35836b87 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -4,14 +4,18 @@ import { profileConfig } from '../config' import { url } from '../utils/url-utils' --- -
+ +
+ +
© 2024 {profileConfig.name}. All Rights Reserved. / - RSS / - Sitemap -
+ RSS / + Sitemap +
+
Powered by - Astro & - Fuwari + Astro & + Fuwari
-
+
\ No newline at end of file diff --git a/src/components/GlobalStyles.astro b/src/components/GlobalStyles.astro index ea6b8630f..ce425af5b 100644 --- a/src/components/GlobalStyles.astro +++ b/src/components/GlobalStyles.astro @@ -307,8 +307,8 @@ color_set({ #content-wrapper { animation-delay: var(--content-delay); } -#footer { - animation-delay: 400ms; +.footer { + animation-delay: 250ms; } #banner-credit { animation-delay: 400ms; diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 0b9cc17a1..577c16b7e 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -19,7 +19,7 @@ let links: NavBarLink[] = navBarConfig.links.map( }, ) --- -