diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-01-12 13:50:20 +0000 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-01-12 13:50:20 +0000 |
| commit | 2bf64117190300caac82594cb7818dbc7f67af67 (patch) | |
| tree | 927ce1c8966fa5d01c72b511e38fba292619fe8a | |
| parent | da96287803ea26f4cc35173f9f34b71a1d6adfa5 (diff) | |
Moves Navbar/Footer to sub-layouts
| -rw-r--r-- | src/layouts/Article.astro | 4 | ||||
| -rw-r--r-- | src/layouts/Layout.astro | 4 | ||||
| -rw-r--r-- | src/layouts/Page.astro | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/layouts/Article.astro b/src/layouts/Article.astro index 253479b..babe66f 100644 --- a/src/layouts/Article.astro +++ b/src/layouts/Article.astro @@ -1,4 +1,6 @@ --- +import Footer from '$components/Footer.astro'; +import Navbar from '$components/Navbar/Navbar.astro'; import Layout from './Layout.astro'; interface Props { @@ -9,7 +11,9 @@ const { title } = Astro.props; --- <Layout title={title}> + <Navbar /> <article id="main"> <slot /> </article> + <Footer /> </Layout> diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index a5315be..f5799ed 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,4 @@ --- -import Footer from '$components/Footer.astro'; -import Navbar from '$components/Navbar/Navbar.astro'; import locales, { defaultLocale } from '$i18n/locales'; import translate from '$i18n/translate'; import tFeed from '$i18n/translations/pages/rss.xml'; @@ -55,8 +53,6 @@ function qualifiedLocalisedPath(newLocale: Locale) { </head> <body id="top"> <a class="btn skip-to-content" href="#main">Skip to content</a> - <Navbar /> <slot /> - <Footer /> </body> </html> diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro index bc7a095..8416ab3 100644 --- a/src/layouts/Page.astro +++ b/src/layouts/Page.astro @@ -1,4 +1,6 @@ --- +import Footer from '$components/Footer.astro'; +import Navbar from '$components/Navbar/Navbar.astro'; import Layout from './Layout.astro'; interface Props { @@ -9,7 +11,9 @@ const { title } = Astro.props; --- <Layout title={title}> + <Navbar /> <main id="main"> <slot /> </main> + <Footer /> </Layout> |
