mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-04 04:25:28 +00:00
feat: add page layout and grid layout
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
---
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import { Title } from '../components/Title';
|
||||
|
||||
const { frontmatter } = Astro.props;
|
||||
import GridLayout from './GridLayout.astro';
|
||||
|
||||
export interface Props {
|
||||
class?: string;
|
||||
grid?: 'wide' | 'narrow';
|
||||
}
|
||||
|
||||
const { frontmatter, class: className, grid = 'wide' } = Astro.props;
|
||||
const gridVariant = frontmatter.grid || grid;
|
||||
---
|
||||
|
||||
<BaseLayout title={frontmatter.title}>
|
||||
<GridLayout grid={gridVariant} class={className} {frontmatter}>
|
||||
<Title>{frontmatter.title}</Title>
|
||||
<slot />
|
||||
</BaseLayout>
|
||||
</GridLayout>
|
||||
|
||||
Reference in New Issue
Block a user