mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
feat: add intro to page layout
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import TextLink from './TextLink.astro';
|
import TextLink from './TextLink.astro';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
alignment: 'center' | 'left';
|
||||||
author?: string;
|
author?: string;
|
||||||
class?: string;
|
class?: string;
|
||||||
lang?: string;
|
lang?: string;
|
||||||
@@ -11,10 +12,27 @@ interface Props {
|
|||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { author, class: className, lang = 'en', source, sourceUrl, text, ...props } = Astro.props;
|
const {
|
||||||
|
alignment = 'center',
|
||||||
|
author,
|
||||||
|
class: className,
|
||||||
|
lang = 'en',
|
||||||
|
source,
|
||||||
|
sourceUrl,
|
||||||
|
text,
|
||||||
|
...props
|
||||||
|
} = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<blockquote lang={lang} class:list={['pullquote p-9 text-center mbe-10', className]} {...props}>
|
<blockquote
|
||||||
|
lang={lang}
|
||||||
|
class:list={[
|
||||||
|
'pullquote p-9 mbe-10',
|
||||||
|
{ 'text-center': alignment === 'center', 'text-left': alignment === 'left' },
|
||||||
|
className,
|
||||||
|
]}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
<p set:html={text} />
|
<p set:html={text} />
|
||||||
{
|
{
|
||||||
(author || source) && (
|
(author || source) && (
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
// Cspell:words astro frontmatter
|
// Cspell:words astro frontmatter
|
||||||
import PageTitle from '../components/PageTitle.astro';
|
import Pullquote from '../components/Pullquote.astro';
|
||||||
import Image from '../components/Image.astro';
|
import Image from '../components/Image.astro';
|
||||||
|
import PageTitle from '../components/PageTitle.astro';
|
||||||
|
|
||||||
import GridLayout from './GridLayout.astro';
|
import GridLayout from './GridLayout.astro';
|
||||||
|
|
||||||
@@ -30,6 +31,13 @@ const gridVariant = frontmatter.grid || grid;
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
<slot name="before-content" />
|
<slot name="before-content" />
|
||||||
|
{
|
||||||
|
frontmatter.intro && (
|
||||||
|
<div class="mbe-10" {...animation}>
|
||||||
|
<Pullquote alignment="left" text={frontmatter.intro} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
<slot />
|
<slot />
|
||||||
<slot name="after-content" />
|
<slot name="after-content" />
|
||||||
</GridLayout>
|
</GridLayout>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
layout: ../layouts/PageLayout.astro
|
layout: ../layouts/PageLayout.astro
|
||||||
title: Now
|
title: Now
|
||||||
description: This is my Now page, listing the things I currently do.
|
description: This is my Now page, listing the things I currently do.
|
||||||
|
intro: This is my Now page, a website with the content of what I am focused on at this point in my life.
|
||||||
backLink: /
|
backLink: /
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user