Add hover and active state to setting page

This commit is contained in:
DrMint 2024-03-13 03:11:55 +01:00
parent 1e7654e976
commit 07544dfb20
1 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ const { t } = await getI18n(currentLocale);
{ {
cache.locales.map(({ id }) => ( cache.locales.map(({ id }) => (
<a <a
class:list={{ current: currentLocale === id }} class:list={{ current: currentLocale === id, "pressable-link": true }}
href={`?action-lang=${id}`} href={`?action-lang=${id}`}
data-astro-prefetch="tap"> data-astro-prefetch="tap">
{formatLocale(id)} {formatLocale(id)}
@ -32,19 +32,19 @@ const { t } = await getI18n(currentLocale);
<h2>{t("settings.theme.title")}</h2> <h2>{t("settings.theme.title")}</h2>
<p>{t("settings.theme.description")}</p><br /> <p>{t("settings.theme.description")}</p><br />
<a <a
class:list={{ current: currentTheme === "dark" }} class:list={{ current: currentTheme === "dark", "pressable-link": true }}
href="?action-theme=dark" href="?action-theme=dark"
data-astro-prefetch="tap"> data-astro-prefetch="tap">
{t("global.theme.dark")} {t("global.theme.dark")}
</a> </a>
<a <a
class:list={{ current: currentTheme === "auto" }} class:list={{ current: currentTheme === "auto", "pressable-link": true }}
href="?action-theme=auto" href="?action-theme=auto"
data-astro-prefetch="tap"> data-astro-prefetch="tap">
{t("global.theme.auto")} {t("global.theme.auto")}
</a> </a>
<a <a
class:list={{ current: currentTheme === "light" }} class:list={{ current: currentTheme === "light", "pressable-link": true }}
href="?action-theme=light" href="?action-theme=light"
data-astro-prefetch="tap"> data-astro-prefetch="tap">
{t("global.theme.light")} {t("global.theme.light")}
@ -57,7 +57,7 @@ const { t } = await getI18n(currentLocale);
{ {
cache.currencies.map((id) => ( cache.currencies.map((id) => (
<a <a
class:list={{ current: currentCurrency === id }} class:list={{ current: currentCurrency === id, "pressable-link": true }}
href={`?action-currency=${id}`} href={`?action-currency=${id}`}
data-astro-prefetch="tap"> data-astro-prefetch="tap">
{`${id} (${formatCurrency(id)})`} {`${id} (${formatCurrency(id)})`}