diff --git a/src/components/WebcamPanel.astro b/src/components/WebcamPanel.astro new file mode 100644 index 0000000..6bcf4cc --- /dev/null +++ b/src/components/WebcamPanel.astro @@ -0,0 +1,161 @@ +--- +const webcamBase = (import.meta.env.PUBLIC_WEATHER_BASE ?? 'https://wx.swansea-airport.wales').replace(/\/$/, ''); +const webcamImage = `${webcamBase}/webcam/apron.jpg`; +--- + + + + + Live apron webcam + Swansea Airport apron + + A live view across the apron. The image refreshes automatically every 30 seconds. + + + + + Loading + + + + + + + Waiting for latest image + + + + + + + diff --git a/src/lib/site.ts b/src/lib/site.ts index c62cfbd..da9d075 100644 --- a/src/lib/site.ts +++ b/src/lib/site.ts @@ -17,6 +17,7 @@ export const site = { { label: 'Home', href: '/' }, { label: 'Pilot Info', href: '/pilot-info/' }, { label: 'Weather', href: '/weather/' }, + { label: 'Webcam', href: '/webcam/' }, { label: 'About', href: '/about/', diff --git a/src/pages/webcam.astro b/src/pages/webcam.astro new file mode 100644 index 0000000..4e073ba --- /dev/null +++ b/src/pages/webcam.astro @@ -0,0 +1,10 @@ +--- +import BaseLayout from '../layouts/BaseLayout.astro'; +import WebcamPanel from '../components/WebcamPanel.astro'; +--- + + + + + +
Live apron webcam
+ A live view across the apron. The image refreshes automatically every 30 seconds. +