diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-10-13 21:43:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-13 21:43:18 +0100 |
| commit | 429aef251345cf54af2feed3f8ecb608db7fd7e7 (patch) | |
| tree | 37a73f2fa3be191ff3b493246dc9b1fc6b7c5f5c /src/pages | |
| parent | 300f8c673829f6af26f1b5e73e4e9d10e8dd6692 (diff) | |
| parent | a37d5bd725cfe61c56d84f06a58d88872f6b7690 (diff) | |
Merge pull request #12 from Sycamost/optimise-images-again
Optimise images again
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/[locale]/furthsettins/index.astro | 9 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 26 |
2 files changed, 7 insertions, 28 deletions
diff --git a/src/pages/[locale]/furthsettins/index.astro b/src/pages/[locale]/furthsettins/index.astro index e1f4928..80698bd 100644 --- a/src/pages/[locale]/furthsettins/index.astro +++ b/src/pages/[locale]/furthsettins/index.astro @@ -1,4 +1,5 @@ --- +import { Image } from 'astro:assets'; import Page from '$layouts/Page.astro'; import localeStaticPaths from '$lib/localeStaticPaths'; import translate from '$i18n/translate'; @@ -6,8 +7,8 @@ import tFurthsettins from '$i18n/translations/pages/furthsettins'; import tSite from '$i18n/translations/site'; import type Locale from '$types/Locale'; import relativePath from '$lib/relativePath'; -import lallansImg from '$images/furthsettins/lallans.jpg'; -import scotsounImg from '$images/furthsettins/scotsoun.jpg'; +import lallansImg from '$images/furthsettins/lallans-192w.jpg'; +import scotsounImg from '$images/furthsettins/scotsoun-192w.jpg'; export async function getStaticPaths() { return localeStaticPaths; @@ -24,13 +25,13 @@ const t = translate(locale); <ul class="link-gallery link-gallery--furthsettins"> <li> <a href={relativePath(Astro.url.pathname, 'lallans')} class="link link-gallery__container"> - <img src={lallansImg.src} alt="" /> + <Image src={lallansImg} alt="" /> <p class="link-gallery__title">{t(tSite, { key: 'lallans' })}</p> </a> </li> <li> <a href={relativePath(Astro.url.pathname, 'scotsoun')} class="link link-gallery__container"> - <img src={scotsounImg.src} alt="" /> + <Image src={scotsounImg} alt="" /> <p class="link-gallery__title">{t(tSite, { key: 'scotsoun' })}</p> </a> </li> diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index 653c637..c67ded0 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -3,14 +3,12 @@ import Page from '$layouts/Page.astro'; import localeStaticPaths from '$lib/localeStaticPaths'; import translate from '$i18n/translate'; import tPage from '$i18n/translations/pages/home'; -import tRole from '$i18n/translations/enums/committeeRole'; 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'; import Button from '$components/Button.astro'; -import CommitteeRole from '$enums/CommitteeRole'; +import CommitteeList from '$components/CommitteeList/CommitteeList.astro'; export async function getStaticPaths() { return localeStaticPaths; @@ -46,27 +44,7 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); <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> - <ul> - { - committee.map((member) => ( - <li class="committee__member"> - {member.img && <img class="committee__member__img" src={member.img.src} alt="" />} - <div class="committee__member__text"> - <h4> - {member.name} - {member.roles.length > 0 && ( - <span class="font-weight-lighter"> - |{' '} - {member.roles.map((role) => t(tRole, { key: CommitteeRole[role] })).join(', ')} - </span> - )} - </h4> - {member.bio && <p set:html={member.bio[locale]} />} - </div> - </li> - )) - } - </ul> + <CommitteeList /> </section> <section> |
