From 2fdd1b9a7fa474cdb9d5b3a89bfb85af688a3e88 Mon Sep 17 00:00:00 2001 From: AdrianoDev Date: Thu, 2 Jul 2026 00:48:14 +0200 Subject: [PATCH] feat: layout base con header, footer e 404 --- src/components/ContactForm.astro | 42 +++++++++++++++++++++++++++ src/components/Footer.astro | 49 ++++++++++++++++++++++++++++++++ src/components/Header.astro | 45 +++++++++++++++++++++++++++++ src/layouts/Base.astro | 33 +++++++++++++++++++++ src/pages/404.astro | 14 +++++++++ src/pages/index.astro | 6 ++-- 6 files changed, 187 insertions(+), 2 deletions(-) create mode 100644 src/components/ContactForm.astro create mode 100644 src/components/Footer.astro create mode 100644 src/components/Header.astro create mode 100644 src/layouts/Base.astro create mode 100644 src/pages/404.astro diff --git a/src/components/ContactForm.astro b/src/components/ContactForm.astro new file mode 100644 index 0000000..fec0282 --- /dev/null +++ b/src/components/ContactForm.astro @@ -0,0 +1,42 @@ +--- +interface Props { variant?: 'full' | 'footer' } +const { variant = 'full' } = Astro.props; +--- +
+ + {variant === 'full' && } + {variant === 'full' && } + + + + + +
+ + diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..1546466 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,49 @@ +--- +import { site } from '../data/site'; +import ContactForm from './ContactForm.astro'; +const year = new Date().getFullYear(); +--- + + + diff --git a/src/components/Header.astro b/src/components/Header.astro new file mode 100644 index 0000000..7c62429 --- /dev/null +++ b/src/components/Header.astro @@ -0,0 +1,45 @@ +--- +import { site } from '../data/site'; +const path = Astro.url.pathname; +--- + + + + + diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro new file mode 100644 index 0000000..4b19758 --- /dev/null +++ b/src/layouts/Base.astro @@ -0,0 +1,33 @@ +--- +import '@fontsource/montserrat/400.css'; +import '@fontsource/montserrat/500.css'; +import '@fontsource/montserrat/600.css'; +import '@fontsource/montserrat/700.css'; +import '@fontsource/open-sans/400.css'; +import '@fontsource/open-sans/600.css'; +import '../styles/global.css'; +import Header from '../components/Header.astro'; +import Footer from '../components/Footer.astro'; + +interface Props { title: string; description?: string } +const { title, description = 'InsanityLab — Performance. Balance. Longevity. Allenamento personalizzato, piccoli gruppi e benessere a Bologna.' } = Astro.props; +--- + + + + + + {title} — InsanityLab + + + + + + + + +
+
+