From 96fba2d47364eaa53f256d1dad4bb853fb2a73d0 Mon Sep 17 00:00:00 2001 From: radishzzz Date: Mon, 19 May 2025 00:58:53 +0100 Subject: [PATCH] fix: accessibility issues with footer links, optimize footer link handling logic --- src/components/Footer.astro | 10 +++++++++- src/config.ts | 14 +++++++------- src/content/posts/guides/Theme Guide-en.md | 12 ++++++------ src/content/posts/guides/Theme Guide-es.md | 12 ++++++------ src/content/posts/guides/Theme Guide-ja.md | 12 ++++++------ src/content/posts/guides/Theme Guide-ru.md | 12 ++++++------ src/content/posts/guides/Theme Guide-zh-tw.md | 12 ++++++------ src/content/posts/guides/Theme Guide-zh.md | 12 ++++++------ 8 files changed, 52 insertions(+), 44 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 13135d4..3f9d7a5 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -16,7 +16,15 @@ const links = socialLinks.map((link) => { if (link.name === 'RSS') { return { ...link, - url: currentLang === defaultLocale ? link.url : `/${currentLang}${link.url}`, + url: currentLang === defaultLocale + ? link.url + : `/${currentLang}${link.url}`, + } + } + if (link.name === 'Email') { + return { + ...link, + url: `mailto:${link.url}`, } } return link diff --git a/src/config.ts b/src/config.ts index d19ab23..6f94cc4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -141,16 +141,16 @@ export const themeConfig: ThemeConfig = { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ], // year of website start - startYear: 2024, + startYear: 2025, }, // FOOTER SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END diff --git a/src/content/posts/guides/Theme Guide-en.md b/src/content/posts/guides/Theme Guide-en.md index 2dd7f8d..c34544e 100644 --- a/src/content/posts/guides/Theme Guide-en.md +++ b/src/content/posts/guides/Theme Guide-en.md @@ -165,13 +165,13 @@ footer: { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ] // year of website start startYear: 2024 diff --git a/src/content/posts/guides/Theme Guide-es.md b/src/content/posts/guides/Theme Guide-es.md index cc31e0d..a2ddf66 100644 --- a/src/content/posts/guides/Theme Guide-es.md +++ b/src/content/posts/guides/Theme Guide-es.md @@ -165,13 +165,13 @@ footer: { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ] // año de inicio del sitio web startYear: 2024 diff --git a/src/content/posts/guides/Theme Guide-ja.md b/src/content/posts/guides/Theme Guide-ja.md index 4de71a8..37091ea 100644 --- a/src/content/posts/guides/Theme Guide-ja.md +++ b/src/content/posts/guides/Theme Guide-ja.md @@ -165,13 +165,13 @@ footer: { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ] // サイト開始年 startYear: 2024 diff --git a/src/content/posts/guides/Theme Guide-ru.md b/src/content/posts/guides/Theme Guide-ru.md index f03df1f..7945b0d 100644 --- a/src/content/posts/guides/Theme Guide-ru.md +++ b/src/content/posts/guides/Theme Guide-ru.md @@ -165,13 +165,13 @@ footer: { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ] // год начала работы веб-сайта startYear: 2024 diff --git a/src/content/posts/guides/Theme Guide-zh-tw.md b/src/content/posts/guides/Theme Guide-zh-tw.md index 58e0e24..a88f3da 100644 --- a/src/content/posts/guides/Theme Guide-zh-tw.md +++ b/src/content/posts/guides/Theme Guide-zh-tw.md @@ -165,13 +165,13 @@ footer: { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ] // 建站年份 startYear: 2024 diff --git a/src/content/posts/guides/Theme Guide-zh.md b/src/content/posts/guides/Theme Guide-zh.md index 7469b5e..8eff18d 100644 --- a/src/content/posts/guides/Theme Guide-zh.md +++ b/src/content/posts/guides/Theme Guide-zh.md @@ -165,13 +165,13 @@ footer: { url: 'https://github.com/radishzzz/astro-theme-retypeset', }, { - name: 'X', - url: 'https://x.com/radishzz_', - }, + name: 'Email', + url: 'email@radishzz.cc', + } // { - // name: 'Email', - // url: 'https://example@gmail.com', - // } + // name: 'X', + // url: 'https://x.com/radishzz_', + // }, ] // 建站年份 startYear: 2024