From 18a9b247c47f8a1a32fbd81b33f7c90b9040e9e3 Mon Sep 17 00:00:00 2001 From: James Pattinson Date: Fri, 26 Jun 2026 07:38:46 -0400 Subject: [PATCH 1/2] banner and fuel updates --- src/components/BannerRotator.astro | 43 +++++++------- src/components/ContactForm.astro | 2 +- src/components/FuelPricesWidget.astro | 82 ++++++++++++++++++++++++++- src/lib/directus.ts | 6 ++ src/lib/fallback-data.ts | 7 +++ src/lib/site.ts | 3 +- src/pages/index.astro | 9 +-- src/pages/pilot-info.astro | 6 +- src/styles/global.css | 8 ++- 9 files changed, 137 insertions(+), 29 deletions(-) diff --git a/src/components/BannerRotator.astro b/src/components/BannerRotator.astro index 025c1c6..d311e30 100644 --- a/src/components/BannerRotator.astro +++ b/src/components/BannerRotator.astro @@ -26,30 +26,35 @@ const slides = images.length > 0 ? images : [{ src: '/images/banner.png', alt: ' {slides.length > 1 && ( )} diff --git a/src/components/ContactForm.astro b/src/components/ContactForm.astro index 3c3b12f..c467206 100644 --- a/src/components/ContactForm.astro +++ b/src/components/ContactForm.astro @@ -41,8 +41,8 @@ const contactRequestEndpoint = `${pprApiBase}/contact-requests/public`; diff --git a/src/components/FuelPricesWidget.astro b/src/components/FuelPricesWidget.astro index c00b0d6..6ff9015 100644 --- a/src/components/FuelPricesWidget.astro +++ b/src/components/FuelPricesWidget.astro @@ -3,10 +3,14 @@ import SectionHeading from './SectionHeading.astro'; import type { FuelPrice } from '../lib/fallback-data'; type Props = { + contactHref?: string; fuelPrices: FuelPrice[]; + moreInfoHref?: string; + sectionId?: string; + serviceNotes?: string[]; }; -const { fuelPrices } = Astro.props as Props; +const { contactHref, fuelPrices, moreInfoHref, sectionId, serviceNotes = [] } = Astro.props as Props; function formatFuelPrice(value: unknown): string { const numeric = Number(value); @@ -18,8 +22,16 @@ function formatVatLabel(value: unknown): string { } --- -
+
+ {serviceNotes.length > 0 && ( +
+ {serviceNotes.map((note) =>

{note}

)} + {contactHref && ( + Contact Us + )} +
+ )}
{fuelPrices.map((fuel) => (
@@ -37,6 +49,14 @@ function formatVatLabel(value: unknown): string {
))}
+ {moreInfoHref && ( + + )}