From 4c585f562ccd2a7474367d21ba772140dfb3b03d Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Wed, 23 Aug 2023 07:48:52 +0100 Subject: Adds about us section --- public/css/modules/committee.css | 4 +++ public/css/modules/committee.md.css | 15 +++++++++ public/css/modules/committee.xl.css | 15 +++++++++ public/css/modules/index.css | 4 ++- src/components/Navbar/NavLinks.astro | 3 ++ src/data/committee.ts | 23 ++++++++++++++ src/enums/CommitteeRole.ts | 11 +++++++ src/i18n/translations/enums/committeeRole.ts | 28 +++++++++++++++++ src/i18n/translations/pages/home.ts | 46 ++++++++++++++++++++++++++++ src/pages/[locale]/index.astro | 28 +++++++++++++++++ src/types/CommitteeMember.d.ts | 9 ++++++ 11 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 public/css/modules/committee.css create mode 100644 public/css/modules/committee.md.css create mode 100644 public/css/modules/committee.xl.css create mode 100644 src/data/committee.ts create mode 100644 src/enums/CommitteeRole.ts create mode 100644 src/i18n/translations/enums/committeeRole.ts create mode 100644 src/types/CommitteeMember.d.ts diff --git a/public/css/modules/committee.css b/public/css/modules/committee.css new file mode 100644 index 0000000..b8a75a5 --- /dev/null +++ b/public/css/modules/committee.css @@ -0,0 +1,4 @@ +.committee__member__img { + margin-inline: calc(var(--grid-column-width) + var(--grid-gutter-width)); + width: calc(var(--grid-gutter-width) + 2 * var(--grid-column-width)); +} \ No newline at end of file diff --git a/public/css/modules/committee.md.css b/public/css/modules/committee.md.css new file mode 100644 index 0000000..23a4cba --- /dev/null +++ b/public/css/modules/committee.md.css @@ -0,0 +1,15 @@ +.committee__member { + display: grid; + grid-template-columns: repeat(var(--grid-column-count), var(--grid-column-width)); + grid-template-rows: 1fr; + column-gap: var(--grid-gutter-width); +} + +.committee__member__img { + grid-column: 1 / 3; + margin-block: auto; +} + +.committee__member__text { + grid-column: 3 / min(9, calc(var(--grid-column-count) + 1)); +} \ No newline at end of file diff --git a/public/css/modules/committee.xl.css b/public/css/modules/committee.xl.css new file mode 100644 index 0000000..94d8429 --- /dev/null +++ b/public/css/modules/committee.xl.css @@ -0,0 +1,15 @@ +.committee__member { + display: grid; + grid-template-columns: repeat(var(--grid-column-count), var(--grid-column-width)); + grid-template-rows: 1fr; + column-gap: var(--grid-gutter-width); +} + +.committee__member__img { + grid-column: 1 / 3; + margin-block: auto; +} + +.committee__member__text { + grid-column: 3 / min(11, calc(var(--grid-column-count) + 1)); +} \ No newline at end of file diff --git a/public/css/modules/index.css b/public/css/modules/index.css index 9194307..618e4ca 100644 --- a/public/css/modules/index.css +++ b/public/css/modules/index.css @@ -9,4 +9,6 @@ @import './nav.css'; @import './nav.md.css' (min-width: 48rem); @import './nav.lg.css' (min-width: 64rem); -@import './skip-to-content.css'; \ No newline at end of file +@import './skip-to-content.css'; +@import './committee.css'; +@import './committee.md.css' (min-width: 48rem); \ No newline at end of file diff --git a/src/components/Navbar/NavLinks.astro b/src/components/Navbar/NavLinks.astro index a34014e..fe2ade0 100644 --- a/src/components/Navbar/NavLinks.astro +++ b/src/components/Navbar/NavLinks.astro @@ -13,6 +13,9 @@ const t = translate(locale);
  • {t(tNews, { key: 'title' })}
  • +
  • + {t(tHame, { key: 'about-us' })} +
  • {t(tFurthsettins, { key: 'title' })}
  • diff --git a/src/data/committee.ts b/src/data/committee.ts new file mode 100644 index 0000000..0d077b8 --- /dev/null +++ b/src/data/committee.ts @@ -0,0 +1,23 @@ +import type { CommitteeMember } from '$types/CommitteeMember'; +import CommitteeRole from 'enums/CommitteeRole'; + +const committee: CommitteeMember[] = [ + { + name: 'Joe Carstairs', + roles: [CommitteeRole.Secretar, CommitteeRole.Wabmaister], + bio: { + sco: ` + Joe haes been i the Associe syne 2019. He is a Scots leid lairner an + believes eydent at the Scots leid belangs awbody. He is frae Perth + but bides eenou i Embro, at he haes bidden in syne 2018. + `, + 'en-GB': ` + Joe has been in the Society since 2019. He is a Scots language learner + and believes passionately that the Scots language belongs to everyone. + He is from Perth but now lives in Edinburgh, where he lived since 2018. + `, + }, + }, +]; + +export default committee; diff --git a/src/enums/CommitteeRole.ts b/src/enums/CommitteeRole.ts new file mode 100644 index 0000000..8db8456 --- /dev/null +++ b/src/enums/CommitteeRole.ts @@ -0,0 +1,11 @@ +enum CommitteeRole { + Preses, + Secretar, + Thesaurer, + Wabmaister, + MemmershipSecretar, + LallansEiditor, + HonoraryPreses, +} + +export default CommitteeRole; diff --git a/src/i18n/translations/enums/committeeRole.ts b/src/i18n/translations/enums/committeeRole.ts new file mode 100644 index 0000000..06b9980 --- /dev/null +++ b/src/i18n/translations/enums/committeeRole.ts @@ -0,0 +1,28 @@ +import type { TranslationsDictionary } from '$types/TranslationsDictionary'; +import CommitteeRole from 'enums/CommitteeRole'; + +const tEnum = { + [CommitteeRole.Preses]: { + sco: () => 'Preses', + 'en-GB': () => 'President', + }, + [CommitteeRole.Secretar]: { + sco: () => 'Secretar', + 'en-GB': () => 'Secretar', + }, + [CommitteeRole.Thesaurer]: { + sco: () => 'Thesaurer', + 'en-GB': () => 'Treasurer', + }, + [CommitteeRole.Wabmaister]: { + sco: () => 'Wabmaister', + 'en-GB': () => 'Webmaster', + }, + [CommitteeRole.LallansEiditor]: { + sco: () => 'Lallans Eiditor', + 'en-GB': () => 'Lallans Editor', + }, +}; + +type Raw = typeof tEnum; +export default tEnum as TranslationsDictionary; diff --git a/src/i18n/translations/pages/home.ts b/src/i18n/translations/pages/home.ts index 302d643..48fbdee 100644 --- a/src/i18n/translations/pages/home.ts +++ b/src/i18n/translations/pages/home.ts @@ -13,6 +13,52 @@ const tPage = { 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', + }, furthsettins: { sco: () => 'Furthsettins', 'en-GB': () => 'Publications', diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index 486d2e8..4c4c82a 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -7,6 +7,7 @@ import type Locale from '$types/Locale'; import { getMostRecentNewsItem } from '$lib/newsUtils'; import contactDetails from '$data/contactDetails'; import NewsIndex from '$components/NewsIndex/NewsIndex.astro'; +import committee from '$data/committee'; export async function getStaticPaths() { return localeStaticPaths; @@ -32,6 +33,33 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); } +
    +

    +

    +

    +

    +

    +
      + { + committee.map((member) => ( +
    • + {member.imgSrc && ( + {`A + )} +
      +

      {member.name}

      +

      +

      +
    • + )) + } +
    +

    +

    diff --git a/src/types/CommitteeMember.d.ts b/src/types/CommitteeMember.d.ts new file mode 100644 index 0000000..b3655d0 --- /dev/null +++ b/src/types/CommitteeMember.d.ts @@ -0,0 +1,9 @@ +import type CommitteeRole from 'enums/CommitteeRole'; +import type Locale from './Locale'; + +type CommitteeMember = { + name: string; + roles: CommitteeRole[]; + bio: { [key in Locale]: string }; + imgSrc?: string; +}; -- cgit v1.2.3