{fuel.fuel_type}
-{fuel.currency} {formatFuelPrice(fuel.price_per_litre)} / litre
+{fuel.fuel_type}
++ {fuel.currency} {formatFuelPrice(fuel.price_per_litre)} + / litre + {formatVatLabel(fuel.inc_vat)} +
+{fuel.notes}
}diff --git a/README.md b/README.md index 59a89a5..8e23862 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Production-ready airfield website stack built with Astro, Directus, PostgreSQL, - All deploy-time variables live in `.env`. - `PUBLIC_PPR_API_BASE` controls the browser-side PPR API base URL; PPR and drone request endpoints are derived from it at build/dev-server startup. +- `DIRECTUS_HOMEPAGE_BANNER_FOLDER` names the Directus file folder used for rotating homepage banner images. If the folder is missing or empty, the site falls back to `/images/banner.png`. - The frontend service bind-mounts the project into `/app`, keeps `node_modules` and `.astro` in named volumes, and serves the site with `astro dev` on the published frontend port. - Layout and page structure are controlled entirely by Astro. - Frontend source edits should appear without rebuilding the container image. diff --git a/docker-compose.yml b/docker-compose.yml index 254c1bd..ae531c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,6 +74,7 @@ services: PUBLIC_PPR_API_BASE: ${PUBLIC_PPR_API_BASE} DIRECTUS_URL: ${DIRECTUS_URL} DIRECTUS_PUBLIC_URL: ${DIRECTUS_PUBLIC_URL} + DIRECTUS_HOMEPAGE_BANNER_FOLDER: ${DIRECTUS_HOMEPAGE_BANNER_FOLDER} DIRECTUS_PORT: ${DIRECTUS_PORT} DIRECTUS_ADMIN_TOKEN: ${DIRECTUS_ADMIN_TOKEN} depends_on: diff --git a/src/components/BannerRotator.astro b/src/components/BannerRotator.astro new file mode 100644 index 0000000..8d66b92 --- /dev/null +++ b/src/components/BannerRotator.astro @@ -0,0 +1,78 @@ +--- +import type { HomepageBannerImage } from '../lib/fallback-data'; + +type Props = { + images: HomepageBannerImage[]; +}; + +const { images } = Astro.props; +const slides = images.length > 0 ? images : [{ src: '/images/banner.png', alt: 'Swansea Airport banner' }]; +--- + +
+ +{slides.length > 1 && ( + +)} + + diff --git a/src/components/DroneFlightRequestForm.astro b/src/components/DroneFlightRequestForm.astro index 5557282..f1f10a7 100644 --- a/src/components/DroneFlightRequestForm.astro +++ b/src/components/DroneFlightRequestForm.astro @@ -13,7 +13,9 @@ const frzGeoJsonEndpoint = `${pprApiBase}/drone-requests/frz`; Tell us when and where you plan to fly. Pick the operating location on the map or enter it manually, then click Submit. We will review your request and contact you if we need any further information. - ++ If your flight is outside the FRZ, you do not need to submit a request, but it would still be appreciated if it is in the vicinity. Please follow the local drone guidance and fly safely. +
@@ -30,6 +32,16 @@ const frzGeoJsonEndpoint = `${pprApiBase}/drone-requests/frz`; +{fuel.fuel_type}
-{fuel.fuel_type}
+{fuel.notes}
}- This form is under test. If you have any issues, email - james.pattinson@sasalliance.org. + If you have any issues, email + james.pattinson@sasalliance.org - our resident IT nerd!
+ The cafe at Swansea Airport is a relaxed, welcoming spot for pilots, visitors, walkers, + families, and anyone passing through the airfield. It is friendly, informal, and dog + friendly, making it an easy place to stop for a drink, a bite to eat, and a view of the + airfield. +
++ Whether you are meeting friends, watching the aircraft, or taking a break while exploring + Fairwood Common and the Gower, the cafe offers a comfortable place to pause and enjoy the + airport atmosphere. +
++ On Thursday to Sunday evenings, the cafe transforms into Thai Bach Express, serving Thai + food for delivery and dining in. + Visit Thai Bach. +
+ +About
-- This section provides information for local communities and visitors. Choose a topic - below to view placeholder content that will be replaced with final approved copy. -
A friendly, dog-friendly cafe for visitors, walkers, pilots, and local families.
+The story of Swansea Airport, formerly RAF Fairwood Common.
diff --git a/src/pages/events/index.astro b/src/pages/events/index.astro index 4e979d3..f6034d9 100644 --- a/src/pages/events/index.astro +++ b/src/pages/events/index.astro @@ -2,8 +2,9 @@ import BaseLayout from '../../layouts/BaseLayout.astro'; import EventsList from '../../components/EventsList.astro'; import { getEvents } from '../../lib/directus'; +import { getUpcomingEvents } from '../../lib/events'; -const events = (await getEvents()).sort((left, right) => new Date(left.start_datetime).getTime() - new Date(right.start_datetime).getTime()); +const events = getUpcomingEvents(await getEvents()); ---Flying from Swansea
-- Swansea Airport is set up for straightforward arrivals and departures, with a compact layout, a clear operating rhythm, and enough room to keep the focus on flying rather than logistics. -
-- Operational notices, fuel pricing, events, and visitor guidance are presented together so people can scan what they need without digging through the page. -
-
-