correctly use markdown for other pages
create layout for markdown posts adjust BasicLayout and index.astro as well
This commit is contained in:
parent
a26c9230ff
commit
0fbc96c533
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
import "../styles/global.css";
|
||||||
import Header from "../components/Header.astro";
|
import Header from "../components/Header.astro";
|
||||||
import Navigation from "../components/Navigation.astro";
|
import Navigation from "../components/Navigation.astro";
|
||||||
import Footer from "../components/Footer.astro";
|
import Footer from "../components/Footer.astro";
|
||||||
@ -7,6 +8,8 @@ import Footer from "../components/Footer.astro";
|
|||||||
<Header />
|
<Header />
|
||||||
<Navigation />
|
<Navigation />
|
||||||
<main>
|
<main>
|
||||||
|
<section>
|
||||||
<slot />
|
<slot />
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
22
src/layouts/MarkdownLayout.astro
Normal file
22
src/layouts/MarkdownLayout.astro
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
import "../styles/global.css";
|
||||||
|
import Header from "../components/Header.astro";
|
||||||
|
import Navigation from "../components/Navigation.astro";
|
||||||
|
import Footer from "../components/Footer.astro";
|
||||||
|
|
||||||
|
const { frontmatter } = Astro.props;
|
||||||
|
---
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>{frontmatter.title}</title>
|
||||||
|
</head>
|
||||||
|
<Header />
|
||||||
|
<Navigation />
|
||||||
|
<main>
|
||||||
|
<section>
|
||||||
|
<slot />
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<Footer />
|
@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
import BasicLayout from "../layouts/BasicLayout.astro";
|
import BasicLayout from "../layouts/BasicLayout.astro";
|
||||||
|
|
||||||
import "../styles/global.css";
|
|
||||||
|
|
||||||
const pageTitle = "emma's place";
|
const pageTitle = "emma's place";
|
||||||
const backgroundColor = "#ffd4de";
|
const backgroundColor = "#ffd4de";
|
||||||
const backgroundColorNightMode = "#240046";
|
const backgroundColorNightMode = "#240046";
|
||||||
@ -48,7 +46,6 @@ const emmaNews = [
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<BasicLayout>
|
<BasicLayout>
|
||||||
<section>
|
|
||||||
<h1>welcome to {pageTitle}</h1>
|
<h1>welcome to {pageTitle}</h1>
|
||||||
<p>
|
<p>
|
||||||
you're at emma's place. coffee or tea of your choice are
|
you're at emma's place. coffee or tea of your choice are
|
||||||
@ -71,7 +68,6 @@ const emmaNews = [
|
|||||||
<ul>
|
<ul>
|
||||||
{emmaNews.map((news) => <li>{news}</li>)}
|
{emmaNews.map((news) => <li>{news}</li>)}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
|
||||||
</BasicLayout>
|
</BasicLayout>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user