Added PageComponents

This commit is contained in:
2026-09-30 16:20:40 +02:00
parent c6023cf857
commit e57e2da09d
37 changed files with 1408 additions and 62 deletions

View File

@@ -1,8 +1,12 @@
---
import { Font } from 'astro:assets'
import type { Article } from '@/lib/site/types'
import '@/styles/global.css'
import SiteFooter from '@/components/site/SiteFooter.astro'
import SiteHeader from '@/components/site/SiteHeader.astro'
import { resolveImage } from '@/lib/images/resolve'
interface Props {
@@ -10,9 +14,10 @@ interface Props {
description?: string
image?: string
noindex?: boolean
article?: Article
}
const { title, description, image, noindex } = Astro.props
const { title, description, image, noindex, article } = Astro.props
const canonical = new URL(Astro.url.pathname, Astro.site)
const preview = image ? resolveImage(image) : undefined
const previewUrl = preview ? new URL(preview.src, Astro.site) : undefined
@@ -47,6 +52,10 @@ const previewUrl = preview ? new URL(preview.src, Astro.site) : undefined
</style>
</head>
<body class="ui">
<slot />
<SiteHeader article={article} />
<main>
<slot />
</main>
<SiteFooter />
</body>
</html>