diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-01-12 17:14:52 +0000 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-01-12 17:14:52 +0000 |
| commit | 7751571aca0a3093f33717c7deb1f2f6ce2099b1 (patch) | |
| tree | 6a5138ce3a3c44b3da591b9a76f5e51b8fadcd11 /src | |
| parent | 23e63a1b391c90203f9cde8c939923a0d21ed1c3 (diff) | |
Simplifies homepagerework
Diffstat (limited to 'src')
| -rw-r--r-- | src/i18n/translations/pages/home.ts | 210 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 113 |
2 files changed, 63 insertions, 260 deletions
diff --git a/src/i18n/translations/pages/home.ts b/src/i18n/translations/pages/home.ts index 3a81710..d96147c 100644 --- a/src/i18n/translations/pages/home.ts +++ b/src/i18n/translations/pages/home.ts @@ -5,203 +5,37 @@ const tPage = { sco: () => 'Hame', 'en-GB': () => 'Home', }, - submit: { - sco: () => 'Sangschaw apen for submeissions', - 'en-GB': () => 'Sangschaw open for submissions', + intro: { + sco: () => 'Hullo! We ar the Scots Leid Associe.', + 'en-GB': () => 'Hello! We are the Scots Language Society.', }, - 'submit-para-1': { - sco: () => ` - We ar acceptin submeissions til our annual Scots scrievin competeition, - the Sangschaw, until the 31st o Januar 2024. - `, - 'en-GB': () => ` - We are accepting submissions to our annual Scots writing competition, the - Sangschaw, until the 31st of January 2024. - `, + submit: { + sco: () => 'Submit stuff', + 'en-GB': () => 'Submit stuff', }, - 'submit-para-2': { - sco: () => ` - Aince ye’ve read the submeission criteria in - <a href="/sco/news/2023-12-10-eiks-31"><i>Eiks an Ens</i> 31</a>, send - your submeissions til - <a href="mailto:lallans@hotmail.co.uk">lallans@hotmail.co.uk</a>. - `, - 'en-GB': () => ` - Once you’ve read the submission criteria in - <a href="/en-GB/news/2023-12-10-eiks-31"><i>Eiks an Ens</i> 31</a>, send - your submissions to - <a href="mailto:lallans@hotmail.co.uk">lallans@hotmail.co.uk</a>. - `, + buy: { + sco: () => 'Buy stuff', + 'en-GB': () => 'Buy stuff', }, - 'submit-para-3': { - sco: () => ` - We luik forrit tae haein your submeission, whither you’ve been submittin - for years or you’re a first-time writer! - `, - 'en-GB': () => ` - We look forward to having your submission, whether you’ve been - submitting for years or you’re a first-time writer! - `, + join: { + sco: () => 'Jyne us', + 'en-GB': () => 'Join us', }, news: { - sco: () => 'Recent News', - 'en-GB': () => 'Recent News', - }, - 'aw-news': { - sco: () => 'Aw news', - 'en-GB': () => 'All news', - }, - 'about-us': { - sco: () => 'Aboot us', - 'en-GB': () => 'About us', - }, - 'about-us-para-1': { - sco: () => ` - The Scots Leid Associe wis fundit i 1972 wi an anely brief: tae promuive - the Scots leid and leitratur bi furthsettin the anely magazine dedicatit - til new Scots scrievin. - `, - 'en-GB': () => ` - The Scots Language Society was founded in 1972 with a single mission: to - promote the Scots language and literature by publishing the only magazine - dedicated to new Scots writing. - `, - }, - 'about-us-para-2': { - sco: () => ` - Ower five decades later, that is oor meission else. Asides Lallans, we - rin an annual Scots-leid scrievin competition, the Sangschaw, an we - forby hae furthset an anely ingaitherin o Scots-leid recordins in our - Scotsoun series o CDs. - `, - 'en-GB': () => ` - Over five decades later, that remains our mission. Besides Lallans, we run - an annual Scots-language writing competition, the Sangschaw, and we have - also published a unique collection of Scots-language recordings in our - Scotsoun series of CDs. - `, - }, - 'about-us-para-3': { - sco: () => ` - Mairfortaken, we hae annual Collogues, whaur we ingaither oor memmers - an hear talks on Scots-leid cultur an hear Sangschaw winners readin - their nain wark. - `, - 'en-GB': () => ` - Furthermore, we have annual Conferences, where we gather together our - members and hear talks on Scots-language culture and hear Sangschaw winners - reading their own work. - `, - }, - 'meet-the-commattee': { - sco: () => 'Meet the Commattee', - 'en-GB': () => 'Meet the Committee', - }, - 'mair-commattee-details-soon': { - sco: () => 'Mair details comin shuin!', - 'en-GB': () => 'More details coming soon!', - }, - furthsettins: { - sco: () => 'Furthsettins', - 'en-GB': () => 'Publications', - }, - 'furthsettins-para': { - sco: () => ` - We ar ane o the foremaist furthsetters o new Scots leitratur. - Oor maist important furthsettins ar - <a href="/sco/furthsettins/lallans">Lallans</a> an - <a href="/sco/furthsettins/scotsoun">Scotsoun</a>. - `, - 'en-GB': () => ` - We are one of the leading publishers of new Scots literature. - Our most important publications are - <a href="/en-GB/furthsettins/lallans">Lallans</a> and - <a href="/en-GB/furthsettins/scotsoun">Scotsoun</a>. - `, - }, - 'aw-furthsettins': { - sco: () => 'Aw furthsettins', - 'en-GB': () => 'All publications', - }, - jyne: { - sco: () => 'Jyne', - 'en-GB': () => 'Join', - }, - 'why-jyne': { - sco: () => 'Why jyne the Scots Leid Associe?', - 'en-GB': () => 'Why join the Scots Language Society?', - }, - 'why-jyne-para-1': { - sco: () => ` - Bi jynin us, ye ar helpin us tae heize up the Scots leid, maistly bi giein - Scots scrievers a place tae lairn frae anither an finnd their ain Scots vyce. - `, - 'en-GB': () => ` - By joining us, you are helping us to champion the Scots language, - especially by giving Scots writers a place to learn from one - another and to find their own Scots voice. - `, - }, - 'why-jyne-para-2': { - sco: () => ` - Forby, memmers get biannual issues o our aesome <i>Lallans</i> magazine gratis, - an hae the richt tae atten our Annual Collogues, whaur we haud our AGM an - enjoy talks frae kenspeckle spikkers on thochtie maiters effeirin til Scots - leid an leiteratur. - `, - 'en-GB': () => ` - In addition, members get biannual issues of our unique <i>Lallans</i> - magazine gratis, and have the right to attend our Annual Conferences, where - we hold our AGM and enjoy talks from highly regarded speakers on - thought-provoking subjects relating to Scots language and literature. - `, - }, - 'why-jyne-para-3': { - sco: () => ` - Gin whit ye ar seekin is a community o prose-scrievers, makars, pleywreichts - an owersetters, aw wi muckle care fur the Scots leid, the ar nae peer wi hus, - the auldest Scots-leid activist organisation that’s about eenou an the anely - fully dedicatit til the forderance o new Scots leiteratur. - `, - 'en-GB': () => ` - If what you’re looking for is a community of prose-writers, poets, - playwrights and translators with a passion for the Scots language, we have - no equal. We are the oldest extant Scots-language activist organisation and - the only one solely dedicated to the development of new Scots literature. - `, - }, - 'hou-jyne': { - sco: () => 'Hou can A jyne?', - 'en-GB': () => 'How can I join?', + sco: () => 'Read our news', + 'en-GB': () => 'Read our news', }, - 'hou-jyne-para-1': { - sco: () => ` - Fur individuals, memmership costs £20 per annum. Fur institutions, the stent is £25 per annum. - `, - 'en-GB': () => ` - For individuals, membership costs £20 per annum. For institutions, the fee is £25 per annum. - `, + about: { + sco: () => 'Lairn mair about us', + 'en-GB': () => 'Learn more about us', }, - 'hou-jyne-para-2': { - sco: ({ membershipEmail }: { membershipEmail: string }) => ` - Fur tae become a memmer, simply get in titch wi us at - <a href="mailto:${membershipEmail}">${membershipEmail}</a> - an we’ll provide ye wi our bank details; or ye can jyne bi sendin us a cheque - made peyable til <b>The Scots Language Society</b>. See - <a href="#contact">Contact us</a> - fur our address. - `, - 'en-GB': ({ membershipEmail }: { membershipEmail: string }) => ` - To become a member, simply get in touch with us at - <a href="mailto:${membershipEmail}">${membershipEmail}</a> - and we’ll provide you with our bank details; or you can join by sending us - a cheque made payable to <b>The Scots Language Society</b>. See - <a href="#contact">Contact us</a> for our address. - `, + committee: { + sco: () => 'Meet our comatee', + 'en-GB': () => 'Meet our committee', }, contact: { - sco: () => 'Contact', - 'en-GB': () => 'Contact', + sco: () => 'Contact us', + 'en-GB': () => 'Contact us', }, }; diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index b08f412..d895128 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -4,11 +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'; export async function getStaticPaths() { return localeStaticPaths; @@ -16,76 +11,50 @@ 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' })}> <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' })} /> - <p set:html={t(tPage, { key: 'about-us-para-2' })} /> - <p set:html={t(tPage, { key: 'about-us-para-3' })} /> - <h3 set:html={t(tPage, { key: 'meet-the-commattee' })} /> - <p class="italic">{t(tPage, { key: 'mair-commattee-details-soon' })}</p> - <CommitteeList /> - </section> - - <section> - <h2 set:html={t(tPage, { key: 'furthsettins' })} /> - <p set:html={t(tPage, { key: 'furthsettins-para' })} /> - <Button classNames="grid-span-3 grid-prose-end" href={`/${locale}/furthsettins`}> - {t(tPage, { key: 'aw-furthsettins' })} ▶ - </Button> - </section> - - <section id="jyne"> - <h2 set:html={t(tPage, { key: 'jyne' })} /> - - <h3 set:html={t(tPage, { key: 'why-jyne' })} /> - <p set:html={t(tPage, { key: 'why-jyne-para-1' })} /> - <p set:html={t(tPage, { key: 'why-jyne-para-2' })} /> - <p set:html={t(tPage, { key: 'why-jyne-para-3' })} /> - - <h3 set:html={t(tPage, { key: 'hou-jyne' })} /> - <p set:html={t(tPage, { key: 'hou-jyne-para-1' })} /> - <p - set:html={t(tPage, { - key: 'hou-jyne-para-2', - membershipEmail: contactDetails.membershipSecretary.emailAddress, - })} - /> - </section> - - <section id="contact"> - <h2 set:html={t(tPage, { key: 'contact' })} /> - <a href={`${locale}/mailto:${contactDetails.generalEnquiries.emailAddress}`}> - {contactDetails.generalEnquiries.emailAddress} - </a> - <address> - Scots Language Society<br /> - c/o 61 Cliffburn Road<br /> - Arbroath<br /> - Angus<br /> - DD11 5BA<br /> - United Kingdom<br /> - </address> + <p>{t(tPage, { key: 'intro' })}</p> + + <nav> + <ul class="list-style-none"> + <li> + <a href={`/${locale}/submit`} class="btn"> + {t(tPage, { key: 'submit' })} + </a> + </li> + <li> + <a href={`/${locale}/furthsettins`} class="btn"> + {t(tPage, { key: 'buy' })} + </a> + </li> + <li> + <a href={`/${locale}/jyne`} class="btn"> + {t(tPage, { key: 'join' })} + </a> + </li> + <li> + <a href={`/${locale}/news`} class="btn"> + {t(tPage, { key: 'news' })} + </a> + </li> + <li> + <a href={`/${locale}/about`} class="btn"> + {t(tPage, { key: 'about' })} + </a> + </li> + <li> + <a href={`/${locale}/comatee`} class="btn"> + {t(tPage, { key: 'committee' })} + </a> + </li> + <li> + <a href={`/${locale}/contact`} class="btn"> + {t(tPage, { key: 'contact' })} + </a> + </li> + </ul> + </nav> </section> </Page> |
