From d68de64bd8a2139e9fe53041411026ab174b02f3 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 24 Sep 2025 10:44:16 +0200 Subject: Extract layout --- src/layouts/Layout.astro | 28 ++++++++++++++++++++++++++++ src/pages/history/[date].astro | 17 ++++------------- src/pages/index.astro | 20 ++++---------------- 3 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 src/layouts/Layout.astro diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..e983a6d --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,28 @@ +--- +export interface Props { + title?: string; + description?: string; +} + +const { title = "geshem.space", description = "geshem.space - Israel Rain Radar" } = Astro.props; +--- + + + + + + + + + + + + + {title} + + + + + + + \ No newline at end of file diff --git a/src/pages/history/[date].astro b/src/pages/history/[date].astro index 8796c14..0a78f9f 100644 --- a/src/pages/history/[date].astro +++ b/src/pages/history/[date].astro @@ -1,4 +1,5 @@ --- +import Layout from '../../layouts/Layout.astro'; import { Geshem } from '../../components/Geshem'; import '../../styles/global.css'; @@ -7,16 +8,6 @@ export const prerender = false; const { date } = Astro.params; --- - - - - - - - Geshem - Rain Radar History - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 96dfa0c..5b08f18 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,23 +1,11 @@ --- +import Layout from "../layouts/Layout.astro"; import { Geshem } from "../components/Geshem"; import "../styles/global.css"; const { date } = Astro.params; --- - - - - - - Geshem - Rain Radar - - - - - - - + + + -- cgit v1.3.1