diff --git a/AGENT.md b/AGENT.md index c8dfc47..25d94b3 100644 --- a/AGENT.md +++ b/AGENT.md @@ -58,6 +58,7 @@ This project does not use npm scripts. Instead, use `mise` tasks: - 2 space indentation (configured in .editorconfig) - Use ExternalLink component for external URLs - Responsive design implemented via SCSS breakpoints +- Add file extensions (e.g., ".ts") when you `import` the local files ## Important Files diff --git a/astro.config.ts b/astro.config.ts index 3aaf45a..d938031 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -4,6 +4,7 @@ import compress from "astro-compress"; import icon from "astro-icon"; import mdx from "@astrojs/mdx"; import tailwindcss from "@tailwindcss/vite"; +import { defaultLocale, locales } from "./src/libs/i18n/configs.ts"; export default defineConfig({ compressHTML: true, @@ -11,6 +12,14 @@ export default defineConfig({ trailingSlash: "always", + i18n: { + locales, + defaultLocale, + routing: { + prefixDefaultLocale: true, + }, + }, + integrations: [ mdx(), icon(), diff --git a/src/assets/scss/base/_mixins.scss b/src/assets/scss/base/_mixins.scss index f811ad1..7988b05 100644 --- a/src/assets/scss/base/_mixins.scss +++ b/src/assets/scss/base/_mixins.scss @@ -1,8 +1,6 @@ @mixin text-decoration( $color: var(--text-decoration-color), $hoverColor: var(--text-decoration-hover-color), - $thickness: 2px, - $hoverThickness: 1px, $underlineOffset: 4px, $hoverUnderlineOffset: 2px ) { @@ -12,13 +10,11 @@ text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: $color; - text-decoration-thickness: $thickness; text-decoration-skip-ink: none; text-underline-offset: $underlineOffset; &:where(:hover, :focus-visible) { text-decoration-color: $hoverColor; - text-decoration-thickness: $hoverThickness; text-underline-offset: $hoverUnderlineOffset; } } diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 41b7c50..6436d8e 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,12 +1,37 @@ --- +import { useTranslations } from "@libs/i18n/utils.ts"; import ExternalLink from "./ExternalLink.astro"; import Logo from "./Logo.astro"; +import LanguagePicker from "./LanguagePicker.astro"; +import { defaultLocale } from "@libs/i18n/configs.ts"; /** * Footer Component * @description A component that displays the footer of the website */ const currentYear = new Date().getFullYear(); +const locale = Astro.currentLocale ?? Astro.preferredLocale ?? defaultLocale; +const t = useTranslations(locale); + +const footerLinks = [ + { + section: "GuildKit", + items: [ + { + text: t("footer.home"), + href: `/${ locale }/`, + }, + { + text: "GitHub", + href: "https://github.com/guildkit/guildkit", + }, + { + text: t("footer.demo"), + href: "https://demo.guildkit.net", + }, + ], + }, +] as const; --- diff --git a/src/components/Hero.astro b/src/components/Hero.astro index f52129c..8b2b2bc 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -1,24 +1,39 @@ --- import { Icon } from "astro-icon/components"; import { Image } from "astro:assets"; +import { useTranslations } from "@libs/i18n/utils"; import heroImage from "@assets/images/hero.png"; +import { defaultLocale } from "@libs/i18n/configs.ts"; + +const lang = Astro.currentLocale ?? Astro.preferredLocale ?? defaultLocale; +const t = useTranslations(lang); +const sloganLines = [ + t("hero.slogan1"), + t("hero.slogan2"), + t("hero.slogan3"), +].filter((slogan) => !!slogan); // Remove empty string ---
-

- Build your own
- Job Portal +

+ { + sloganLines.map((slogan, i) => ( + + {slogan} + + )) + }

- Watch on GitHub + {t("hero.watch-github")}
- Coming soon + {t("hero.coming-soon")}