From 96e9adb5132fd8c4a4fdf19a05e479c3ecb9a8ef Mon Sep 17 00:00:00 2001 From: Jewgeni Lewash Date: Sun, 25 Feb 2024 22:35:23 +0100 Subject: [PATCH] refactor(layout): create baselayout component --- src/layouts/BaseLayout.astro | 45 ++++++++++++++++++++++++++++++++++++ src/pages/index.astro | 44 ++++------------------------------- 2 files changed, 49 insertions(+), 40 deletions(-) create mode 100644 src/layouts/BaseLayout.astro diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro new file mode 100644 index 0000000..b323107 --- /dev/null +++ b/src/layouts/BaseLayout.astro @@ -0,0 +1,45 @@ +--- +import '@/styles/globals.css'; +import { ModeToggle } from '@/components/ModeToggle'; + +const { title } = Astro.props; +--- + + + + + + + + + + + + {title} + + +
+ +
+
+ +
+ + diff --git a/src/pages/index.astro b/src/pages/index.astro index b12bc92..45898cd 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,43 +1,7 @@ --- -import '@/styles/globals.css'; -import { ModeToggle } from '@/components/ModeToggle'; +import BaseLayout from '@/layouts/BaseLayout.astro'; --- - - - - - - - - - - - Astro Deploy - - -
-
Hello World
-
- -
-
- - + +
Hello World
+