diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6c421b..998cf03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1690,8 +1690,8 @@ packages: duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - electron-to-chromium@1.5.118: - resolution: {integrity: sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==} + electron-to-chromium@1.5.119: + resolution: {integrity: sha512-Ku4NMzUjz3e3Vweh7PhApPrZSS4fyiCIbcIrG9eKrriYVLmbMepETR/v6SU7xPm98QTqMSYiCwfO89QNjXLkbQ==} emmet@2.4.11: resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} @@ -3823,8 +3823,8 @@ packages: resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} engines: {node: '>=18'} - zod-to-json-schema@3.24.3: - resolution: {integrity: sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A==} + zod-to-json-schema@3.24.4: + resolution: {integrity: sha512-0uNlcvgabyrni9Ag8Vghj21drk7+7tp7VTwwR7KxxXXc/3pbXz2PHlDgj3cICahgF1kHm4dExBFj7BXrZJXzig==} peerDependencies: zod: ^3.24.1 @@ -5269,7 +5269,7 @@ snapshots: yargs-parser: 21.1.1 yocto-spinner: 0.2.1 zod: 3.24.2 - zod-to-json-schema: 3.24.3(zod@3.24.2) + zod-to-json-schema: 3.24.4(zod@3.24.2) zod-to-ts: 1.2.0(typescript@5.8.2)(zod@3.24.2) optionalDependencies: sharp: 0.33.5 @@ -5353,7 +5353,7 @@ snapshots: browserslist@4.24.4: dependencies: caniuse-lite: 1.0.30001704 - electron-to-chromium: 1.5.118 + electron-to-chromium: 1.5.119 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) @@ -5612,7 +5612,7 @@ snapshots: duplexer@0.1.2: {} - electron-to-chromium@1.5.118: {} + electron-to-chromium@1.5.119: {} emmet@2.4.11: dependencies: @@ -8367,7 +8367,7 @@ snapshots: yoctocolors@2.1.1: {} - zod-to-json-schema@3.24.3(zod@3.24.2): + zod-to-json-schema@3.24.4(zod@3.24.2): dependencies: zod: 3.24.2 diff --git a/src/components/MainHeader.astro b/src/components/MainHeader.astro index 2520ea9..3a6abbc 100644 --- a/src/components/MainHeader.astro +++ b/src/components/MainHeader.astro @@ -6,13 +6,9 @@ import { getPageInfo } from '@/utils/page' const { currentLang, getLocalizedPath } = getPageInfo(Astro.url.pathname) const currentUI = ui[currentLang as keyof typeof ui] -const { title, subtitle } = themeConfig.site -const headerTitle = title || currentUI.title -const headerSubtitle = !subtitle - ? '' - : (subtitle === 'Revive the beauty of typography' - ? currentUI.subtitle - : subtitle) +const { title, subtitle, i18nTitle } = themeConfig.site +const headerTitle = i18nTitle ? currentUI.title : title +const headerSubtitle = i18nTitle ? currentUI.subtitle : subtitle const { titleSpace } = themeConfig.global const marginBottom = { @@ -23,7 +19,7 @@ const marginBottom = { ---
-

+

{headerSubtitle && ( -

+

{headerSubtitle}

)} diff --git a/src/components/MobileHeader.astro b/src/components/MobileHeader.astro index 6aa8e9f..485e467 100644 --- a/src/components/MobileHeader.astro +++ b/src/components/MobileHeader.astro @@ -6,13 +6,9 @@ import { getPageInfo } from '@/utils/page' const { currentLang, getLocalizedPath } = getPageInfo(Astro.url.pathname) const currentUI = ui[currentLang as keyof typeof ui] -const { title, subtitle } = themeConfig.site -const headerTitle = title || currentUI.title -const headerSubtitle = !subtitle - ? '' - : (subtitle === 'Revive the beauty of typography' - ? currentUI.subtitle - : subtitle) +const { title, subtitle, i18nTitle } = themeConfig.site +const headerTitle = i18nTitle ? currentUI.title : title +const headerSubtitle = i18nTitle ? currentUI.subtitle : subtitle const { titleSpace } = themeConfig.global const marginBottom = { diff --git a/src/components/PostTime.astro b/src/components/PostDate.astro similarity index 97% rename from src/components/PostTime.astro rename to src/components/PostDate.astro index 75d70de..35fc281 100644 --- a/src/components/PostTime.astro +++ b/src/components/PostDate.astro @@ -56,12 +56,12 @@ function formatDate(date: Date, format: 'YYYY-MM-DD' | 'MM-DD-YYYY' | 'DD-MM-YYY } --- - + - + {updatedDate && (