From f19fc78a151c761642cf7c9b654e0da9db3c4418 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:33:03 +0100 Subject: More robust relative path handling --- src/components/LallansIssue.astro | 5 ++++- src/components/LallansIssuesGallery.astro | 12 +++++++++++- src/components/Scotsoun.astro | 5 ++++- src/components/ScotsounCdGallery.astro | 12 +++++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) (limited to 'src/components') diff --git a/src/components/LallansIssue.astro b/src/components/LallansIssue.astro index c71755b..a07d345 100644 --- a/src/components/LallansIssue.astro +++ b/src/components/LallansIssue.astro @@ -1,6 +1,7 @@ --- import translate from '$i18n/translate'; import tSite from '$i18n/translations/site'; +import relativePath from '$lib/relativePath'; import type LallansIssue from '$types/LallansIssue'; import type Locale from '$types/Locale'; import LallansIssueContributions from './LallansIssueContributions.astro'; @@ -25,7 +26,9 @@ const t = translate(locale);
- +
diff --git a/src/components/LallansIssuesGallery.astro b/src/components/LallansIssuesGallery.astro index bee50c8..c784156 100644 --- a/src/components/LallansIssuesGallery.astro +++ b/src/components/LallansIssuesGallery.astro @@ -1,5 +1,12 @@ --- import { getAllLallansIssues } from '$data/lallans'; +import type Locale from '$types/Locale'; + +interface Props { + locale: Locale; +} + +const { locale } = Astro.props; const issues = await getAllLallansIssues(); --- @@ -8,7 +15,10 @@ const issues = await getAllLallansIssues(); { issues.map((issue) => (
  • - + diff --git a/src/components/Scotsoun.astro b/src/components/Scotsoun.astro index 13c6fa9..1491ebc 100644 --- a/src/components/Scotsoun.astro +++ b/src/components/Scotsoun.astro @@ -5,6 +5,7 @@ import tComponent from '$i18n/translations/components/scotsoun'; import type Locale from '$types/Locale'; import type Scotsoun from '$types/Scotsoun'; import PayPalButtons from './PayPalButtons.astro'; +import relativePath from '$lib/relativePath'; interface Props { locale: Locale; @@ -30,7 +31,9 @@ const t = translate(locale);
    - +
    diff --git a/src/components/ScotsounCdGallery.astro b/src/components/ScotsounCdGallery.astro index 12bafb0..6f6c794 100644 --- a/src/components/ScotsounCdGallery.astro +++ b/src/components/ScotsounCdGallery.astro @@ -1,5 +1,12 @@ --- import { getAllScotsoun } from '$data/scotsoun'; +import type Locale from '$types/Locale'; + +interface Props { + locale: Locale; +} + +const { locale } = Astro.props; const scotsoun = await getAllScotsoun(); --- @@ -8,7 +15,10 @@ const scotsoun = await getAllScotsoun(); { scotsoun.map((scotsounItem) => (
  • - + -- cgit v1.2.3