diff options
| author | Joe Carstairs <65492573+joeacarstairs@users.noreply.github.com> | 2024-10-13 17:49:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-13 17:49:03 +0100 |
| commit | 7eea6da108ab664cdc0e1a2691159cfafa981ac7 (patch) | |
| tree | 0e08447045bf28ab4210be7a9a0238eef9037168 /src/pages | |
| parent | 2febffe5e3036c4b35dff4a8b274f42a7f8fef42 (diff) | |
| parent | dcdc91cbd06b82b042e601f792a1a5b08d9b82ce (diff) | |
Merge pull request #104 from joeacarstairs/staging
Update
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/[locale]/contact.astro | 25 | ||||
| -rw-r--r-- | src/pages/[locale]/furthsettins/lallans/index.astro | 2 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 35 | ||||
| -rw-r--r-- | src/pages/[locale]/submit.astro | 21 |
4 files changed, 47 insertions, 36 deletions
diff --git a/src/pages/[locale]/contact.astro b/src/pages/[locale]/contact.astro new file mode 100644 index 0000000..c5ee07b --- /dev/null +++ b/src/pages/[locale]/contact.astro @@ -0,0 +1,25 @@ +--- +import Page from '$layouts/Page.astro'; +import localeStaticPaths from '$lib/localeStaticPaths'; +import translate from '$i18n/translate'; +import tPage from '$i18n/translations/pages/contact'; +import type Locale from '$types/Locale'; +import contactDetails from '$data/contactDetails'; + +export async function getStaticPaths() { + return localeStaticPaths; +} + +const locale = Astro.params.locale as Locale; +const t = translate(locale); +--- + +<Page title={t(tPage, { key: 'title' })}> + <section> + <h1>{t(tPage, { key: 'title' })}</h1> + <a href={`${locale}/mailto:${contactDetails.generalEnquiries.emailAddress}`}> + {contactDetails.generalEnquiries.emailAddress} + </a> + <address set:html={contactDetails.generalEnquiries.address.join('<br />')} /> + </section> +</Page> diff --git a/src/pages/[locale]/furthsettins/lallans/index.astro b/src/pages/[locale]/furthsettins/lallans/index.astro index 61f31ec..a4b6d70 100644 --- a/src/pages/[locale]/furthsettins/lallans/index.astro +++ b/src/pages/[locale]/furthsettins/lallans/index.astro @@ -17,7 +17,7 @@ const t = translate(locale); <Page title={t(tPage, { key: 'title' })}> <section> <h1>{t(tPage, { key: 'title' })}</h1> - <p>{t(tPage, { key: 'about-lallans' })}</p> + <p set:html={t(tPage, { key: 'about-lallans' })} /> <LallansIssuesGallery /> </section> </Page> diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index 9f994a2..796bf59 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -4,9 +4,6 @@ import localeStaticPaths from '$lib/localeStaticPaths'; import translate from '$i18n/translate'; import tPage from '$i18n/translations/pages/home'; import type Locale from '$types/Locale'; -import { getMostRecentNewsItem } from '$lib/newsUtils'; -import contactDetails from '$data/contactDetails'; -import NewsIndex from '$components/NewsIndex/NewsIndex.astro'; import Button from '$components/Button.astro'; import CommitteeList from '$components/CommitteeList/CommitteeList.astro'; @@ -16,33 +13,9 @@ export async function getStaticPaths() { const locale = Astro.params.locale as Locale; const t = translate(locale); -const mostRecentNewsItem = await getMostRecentNewsItem(locale); --- <Page title={t(tPage, { key: 'title' })}> - <!-- - Lallans 105 is leukin fair full the nou. Ance Lallans 105 is out we'll - stert encouragin submeissions for 106. - - <section> - <h2 set:html={t(tPage, { key: 'submit' })} /> - <p set:html={t(tPage, { key: 'submit-para-1' })} /> - <p set:html={t(tPage, { key: 'submit-para-2' })} /> - <p set:html={t(tPage, { key: 'submit-para-3' })} /> - </section> - --> - <section> - <h2 class="grid-span-6" set:html={t(tPage, { key: 'news' })} /> - <NewsIndex newsItems={mostRecentNewsItem ? [mostRecentNewsItem] : []} headingLevel="h3" /> - { - mostRecentNewsItem && ( - <Button classNames="grid-span-3 grid-prose-end" href={`/${locale}/news`}> - {t(tPage, { key: 'aw-news' })} ▶ - </Button> - ) - } - </section> - <section id="about"> <h2 set:html={t(tPage, { key: 'about-us' })} /> <p set:html={t(tPage, { key: 'about-us-para-1' })} /> @@ -59,12 +32,4 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); {t(tPage, { key: 'aw-furthsettins' })} ▶ </Button> </section> - - <section id="contact"> - <h2 set:html={t(tPage, { key: 'contact' })} /> - <a href={`${locale}/mailto:${contactDetails.generalEnquiries.emailAddress}`}> - {contactDetails.generalEnquiries.emailAddress} - </a> - <address set:html={contactDetails.generalEnquiries.address.join('<br />')} /> - </section> </Page> diff --git a/src/pages/[locale]/submit.astro b/src/pages/[locale]/submit.astro new file mode 100644 index 0000000..599b9b6 --- /dev/null +++ b/src/pages/[locale]/submit.astro @@ -0,0 +1,21 @@ +--- +import Page from '$layouts/Page.astro'; +import localeStaticPaths from '$lib/localeStaticPaths'; +import translate from '$i18n/translate'; +import tPage from '$i18n/translations/pages/submit'; +import type Locale from '$types/Locale'; + +export async function getStaticPaths() { + return localeStaticPaths; +} + +const locale = Astro.params.locale as Locale; +const t = translate(locale); +--- + +<Page title={t(tPage, { key: 'title' })}> + <section> + <h2 set:html={t(tPage, { key: 'title' })} /> + <p set:html={t(tPage, { key: '105-submissions-full' })} /> + </section> +</Page> |
