From 4b901f72e4bb7a0f724196a82db78d71b7e111e3 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Thu, 26 Dec 2024 17:24:56 +0800 Subject: [PATCH] refactor: update card design --- src/components/Card.astro | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/components/Card.astro b/src/components/Card.astro index 73d786c..caa8668 100644 --- a/src/components/Card.astro +++ b/src/components/Card.astro @@ -1,8 +1,6 @@ --- import { defaultLocale } from "astro-i18n-aut"; import type { CollectionEntry } from "astro:content"; -import { getPhrases } from "../phrases"; -import { getLocaleFromUrl } from "../utils/locale"; type Props = { entry: CollectionEntry<"terms">; @@ -15,19 +13,15 @@ const { const slug = rawSlug.startsWith(`${defaultLocale}/`) ? rawSlug.slice(defaultLocale.length + 1) : rawSlug; -const locale = getLocaleFromUrl(Astro.url); -const phrases = getPhrases(locale); ---

- {title} + {title}

{description}

-
- {phrases.general.learn_more}