From f8a6d2bc3dac7c3594c1395e4e429f68ae18e933 Mon Sep 17 00:00:00 2001
From: rift <117926989+Riftriot@users.noreply.github.com>
Date: Wed, 24 Jul 2024 17:07:52 -0500
Subject: [PATCH] Get started on homepage
---
src/components/Logo.astro | 13 +++++--------
src/i18n/en_US.json | 3 ++-
src/i18n/jp.json | 5 +++--
src/pages/[lang]/index.astro | 22 ++++++++++++++++++++--
4 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/src/components/Logo.astro b/src/components/Logo.astro
index 365bacc..a33b211 100644
--- a/src/components/Logo.astro
+++ b/src/components/Logo.astro
@@ -5,14 +5,11 @@
width="400"
height="400"
style="width: 100%; height: 100%;"
->
-
nebula
-
- nebula
-
-
+ class="s0">
diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json
index f60e7ba..39ebee6 100644
--- a/src/i18n/en_US.json
+++ b/src/i18n/en_US.json
@@ -2,5 +2,6 @@
"header.home": "Home",
"header.games": "Games",
"header.settings": "Settings",
- "header.morelinks": "Want more links?"
+ "header.morelinks": "Want more links?",
+ "home.placeholder": "Search the web freely"
}
\ No newline at end of file
diff --git a/src/i18n/jp.json b/src/i18n/jp.json
index 33d010f..b100873 100644
--- a/src/i18n/jp.json
+++ b/src/i18n/jp.json
@@ -1,6 +1,7 @@
{
- "header.home": "homee",
+ "header.home": "ホーム",
"header.games": "ゲーム",
"header.settings": "設定",
- "header.morelinks": "リンク一覧"
+ "header.morelinks": "リンク一覧",
+ "home.placeholder": "検索欄"
}
\ No newline at end of file
diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro
index d2451ab..1d2efac 100644
--- a/src/pages/[lang]/index.astro
+++ b/src/pages/[lang]/index.astro
@@ -1,5 +1,7 @@
---
import Layout from "../../layouts/Layout.astro";
+import Logo from "../../components/Logo.astro";
+import { getLangFromUrl, useTranslations } from "../../i18n/utils";
export function getStaticPaths() {
const STATIC_PATHS = [
{ params: { lang: "en_US" } },
@@ -7,12 +9,28 @@ export function getStaticPaths() {
];
return STATIC_PATHS;
}
+
+const lang = getLangFromUrl(Astro.url);
+const t = useTranslations(lang);
---