diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-10-07 07:14:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-07 07:14:46 +0100 |
| commit | 6a0bd0ab3a0960cd1436190285ebe24bf8ef1f28 (patch) | |
| tree | 3c1cb310d0db6e342a8e0db44046bcfe143ccb24 /src/pages | |
| parent | c3cb0ee85b09104045e7eaf76d7d720bd9239141 (diff) | |
| parent | 054d41398527550a931a8dd4ec0d9970d1caad51 (diff) | |
Merge pull request #9 from Sycamost/optimise-images
Images moved to /image
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/[locale]/furthsettins/index.astro | 6 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/pages/[locale]/furthsettins/index.astro b/src/pages/[locale]/furthsettins/index.astro index 97f530a..e1f4928 100644 --- a/src/pages/[locale]/furthsettins/index.astro +++ b/src/pages/[locale]/furthsettins/index.astro @@ -6,6 +6,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'; export async function getStaticPaths() { return localeStaticPaths; @@ -22,13 +24,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="/images/furthsettins/lallans.jpg" /> + <img src={lallansImg.src} 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="/images/furthsettins/scotsoun.jpg" /> + <img src={scotsounImg.src} 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 a230aee..653c637 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -50,13 +50,7 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); { committee.map((member) => ( <li class="committee__member"> - {member.imgSrc && ( - <img - class="committee__member__img" - src={member.imgSrc} - alt={`A photo of ${member.name}`} - /> - )} + {member.img && <img class="committee__member__img" src={member.img.src} alt="" />} <div class="committee__member__text"> <h4> {member.name} |
