Refactor src/layouts folder
This commit is contained in:
22
src/layouts/BaseLayout.astro
Normal file
22
src/layouts/BaseLayout.astro
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
import "~/assets/styles/base.css";
|
||||
|
||||
import MetaTags from "~/components/core/MetaTags.astro";
|
||||
import BasicScripts from "~/components/core/BasicScripts.astro";
|
||||
|
||||
const { meta = {} } = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<MetaTags {...meta} />
|
||||
</head>
|
||||
|
||||
<body
|
||||
class="antialiased text-gray-900 dark:text-slate-300 tracking-tight bg-white dark:bg-slate-900"
|
||||
>
|
||||
<slot />
|
||||
<BasicScripts />
|
||||
</body>
|
||||
</html>
|
@ -1,27 +0,0 @@
|
||||
---
|
||||
import "~/assets/styles/base.css";
|
||||
|
||||
import Header from "~/components/astro/headers/BasicHeader.astro";
|
||||
import Footer from "~/components/astro/footers/BasicFooter.astro";
|
||||
import MetaTags from "~/components/astro/utils/MetaTags.astro";
|
||||
import BasicScripts from "~/components/astro/utils/BasicScripts.astro";
|
||||
|
||||
const { title, description, image } = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<MetaTags title={title} description={description} image={image} />
|
||||
</head>
|
||||
|
||||
<body
|
||||
class="antialiased text-gray-900 dark:text-slate-300 tracking-tight bg-white dark:bg-slate-900 font-ibm-plex-sans"
|
||||
>
|
||||
<Header />
|
||||
<slot />
|
||||
<Footer />
|
||||
|
||||
<BasicScripts />
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
import "~/assets/styles/base.css";
|
||||
|
||||
import MetaTags from "~/components/astro/utils/MetaTags.astro";
|
||||
import BasicScripts from "~/components/astro/utils/BasicScripts.astro";
|
||||
|
||||
const { title, description, image } = Astro.props;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<MetaTags title={title} description={description} image={image} />
|
||||
</head>
|
||||
|
||||
<body
|
||||
class="antialiased text-gray-900 dark:text-slate-300 tracking-tight bg-white dark:bg-slate-900 font-ibm-plex-sans"
|
||||
>
|
||||
<slot />
|
||||
|
||||
<BasicScripts />
|
||||
</body>
|
||||
</html>
|
14
src/layouts/PageLayout.astro
Normal file
14
src/layouts/PageLayout.astro
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
import Layout from "~/layouts/BaseLayout.astro";
|
||||
|
||||
import Header from "~/components/widgets/Header.astro";
|
||||
import Footer from "~/components/widgets/Footer.astro";
|
||||
|
||||
const { meta } = Astro.props;
|
||||
---
|
||||
|
||||
<Layout meta={meta}>
|
||||
<Header />
|
||||
<slot />
|
||||
<Footer />
|
||||
</Layout>
|
Reference in New Issue
Block a user