✨ add SectionContainer for all pages & layouts
This commit is contained in:
parent
693dbbda16
commit
964d609197
6 changed files with 142 additions and 175 deletions
|
@ -1,34 +1,26 @@
|
|||
---
|
||||
import type { CollectionEntry } from 'astro:content';
|
||||
import BaseHead from '../components/BaseHead.astro';
|
||||
import Header from '../components/Header.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import FormattedDate from '../components/FormattedDate.astro';
|
||||
import SectionContainer from '../components/SectionContainer.astro';
|
||||
|
||||
type Props = CollectionEntry<'blog'>['data'];
|
||||
|
||||
const { title, description, pubDate } = Astro.props;
|
||||
---
|
||||
<head>
|
||||
<BaseHead title={title} description={description} />
|
||||
</head>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<BaseHead title={title} description={description} />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="flex flex-col">
|
||||
<Header />
|
||||
<main class="flex flex-col items-center mx-auto mt-8">
|
||||
<article class="flex flex-col mx-auto mb-32">
|
||||
<h1 class="text-4xl font-extrabold">{title}</h1>
|
||||
<p class="italic">{description}</p>
|
||||
<FormattedDate date={pubDate}/>
|
||||
<div class="flex flex-col items-left w-full max-w-prose blog">
|
||||
<slot />
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<SectionContainer>
|
||||
<main class="mb-auto break-words mt-4">
|
||||
<article>
|
||||
<h1 class="text-4xl font-extrabold">{title}</h1>
|
||||
<p class="italic">{description}</p>
|
||||
<FormattedDate date={pubDate}/>
|
||||
<div class="blog">
|
||||
<slot />
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
</SectionContainer>
|
Loading…
Add table
Add a link
Reference in a new issue