From 3098c31049e17dfdcdf451e843f6c4bdcf5b2fa1 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 5 Aug 2023 21:16:45 +0100 Subject: Moves to root folder --- src/pages/[locale]/index.astro | 60 +++++++++++++++++++++++++++++++++++++++ src/pages/[locale]/staticPaths.ts | 10 +++++++ src/pages/index.astro | 3 ++ 3 files changed, 73 insertions(+) create mode 100644 src/pages/[locale]/index.astro create mode 100644 src/pages/[locale]/staticPaths.ts create mode 100644 src/pages/index.astro (limited to 'src/pages') diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro new file mode 100644 index 0000000..23a270d --- /dev/null +++ b/src/pages/[locale]/index.astro @@ -0,0 +1,60 @@ +--- +import Layout from '../../layouts/Layout.astro'; +import staticPaths from './staticPaths'; +import translate from '../../i18n/translate'; +import site from '../../i18n/translations/site'; +import home from '../../i18n/translations/pages/home'; +import type Locale from '../../types/Locale'; + +export async function getStaticPaths() { return staticPaths; } + +const locale = Astro.params.locale as Locale; +const t = translate(locale); +--- + + +
+
+

{ t(site, 'title') }

+

Tap-level heidin

+

Seicont-level heidin

+

Third-level heidin

+

Fowert-level heidin

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. +

+ Lairn mair! +

+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. +

+ +

+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +

+
+
+

Seicont-level heidin

+

Third-level heidin

+

Fowert-level heidin

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. +

+ Lairn mair! +

+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. +

+ +

+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla + pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +

+
+
+
diff --git a/src/pages/[locale]/staticPaths.ts b/src/pages/[locale]/staticPaths.ts new file mode 100644 index 0000000..266ad2c --- /dev/null +++ b/src/pages/[locale]/staticPaths.ts @@ -0,0 +1,10 @@ +import type Locale from '../../types/Locale'; + +// Defines what values to insert into the [locale] URL path parameter +// when generating a static site +const staticPaths: { params: { locale: Locale} }[] = [ + { params: { locale: 'sco' } }, + { params: { locale: 'en-GB' } }, +] + +export default staticPaths; \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..4a02fcc --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,3 @@ +--- +--- + \ No newline at end of file -- cgit v1.2.3