somewhat there

This commit is contained in:
ebby 2026-10-05 09:48:56 +02:00
parent 572a62eda2
commit 8d9cdc92d5
3 changed files with 87 additions and 34 deletions

View file

@ -7,6 +7,7 @@ const postSchema = z.object({
title: z.string(), title: z.string(),
subtitle: z.string(), subtitle: z.string(),
description: z.string(), description: z.string(),
introduction: z.string(),
image: z.object({ image: z.object({
path: z.string(), path: z.string(),
alt: z.string() alt: z.string()

View file

@ -17,26 +17,30 @@ const localeDate = formatLocalizedDateString(postData.date);
--- ---
<Main> <Main>
<article class="markdown-content"> <div id="background">
<Image <div id="article-header">
id="titleImg" <Image id="titleImg" src={titleImg} alt={postData.image.alt} />
src={titleImg} <div>
alt={postData.image.alt} <div class="info">
class="rounded" <span>{localeDate} | </span>
/> <span>Autor: {postData.author} | </span>
<h1 class="headline">{postData.title}</h1> <span>Lesezeit: {postData.time2read}</span>
<div class="bottom-info"> </div>
<span>Autor: {postData.author}</span> <h1>{postData.title}</h1>
<span>{localeDate}</span> <h3>{postData.subtitle}</h3>
</div>
<span>{postData.introduction}</span>
</div> </div>
<slot /> <article class="markdown-content">
<NavBack client:visible /> <slot />
<p class="disclaimer"> <NavBack client:visible />
Disclaimer: Dieser Artikel ist ausschließlich privat und wird nicht durch <p class="disclaimer">
Produktplatzierung, Affiliate-Links oder ähnliches Unterstützt. Links Disclaimer: Dieser Artikel ist ausschließlich privat und wird nicht
dienen allein dem Zweck der Information. durch Produktplatzierung, Affiliate-Links oder ähnliches Unterstützt.
</p> Links dienen allein dem Zweck der Information.
</article> </p>
</article>
</div>
<div id="image-backdrop" hidden> <div id="image-backdrop" hidden>
<img id="image-preview" class="rounded" src="" alt="" /> <img id="image-preview" class="rounded" src="" alt="" />
@ -46,11 +50,39 @@ const localeDate = formatLocalizedDateString(postData.date);
<script is:inline src="/scripts/image-modal.js"></script> <script is:inline src="/scripts/image-modal.js"></script>
<style> <style>
#background {
background-image: linear-gradient(
to bottom,
var(--primary-dark),
var(--primary-color)
);
width: 100%;
height: 100%;
padding: 0 20%;
}
#article-header {
background-color: white;
max-width: 900px;
padding: 0 64px;
font-size: 1.5rem;
line-height: 1.6;
}
article { article {
max-width: 900px; max-width: 900px;
padding: 0 clamp(8px, 32px, 64px); padding: 0 64px;
hyphens: auto; hyphens: auto;
text-align: justify; text-align: justify;
background-color: white;
}
#titleImg {
display: block;
width: 100%;
height: 300px;
object-fit: cover;
object-position: center;
} }
.markdown-content { .markdown-content {
@ -62,21 +94,23 @@ const localeDate = formatLocalizedDateString(postData.date);
} }
} }
#titleImg { .info {
width: 100%; padding-top: 16px;
height: 300px; font-size: medium;
object-fit: cover;
object-position: center;
} }
.bottom-info { h1 {
display: flex; margin-bottom: 0;
justify-content: space-between; }
margin-top: 16px;
h3 {
margin-top: 0;
font-weight: lighter;
} }
.disclaimer { .disclaimer {
margin: 32px 0 64px 0; padding: 64px 0 16px 0;
margin: 0;
font-size: smaller; font-size: smaller;
} }
@ -106,11 +140,30 @@ const localeDate = formatLocalizedDateString(postData.date);
cursor: pointer; cursor: pointer;
} }
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {
.markdown-content { .markdown-content {
font-size: 1.25rem; font-size: 1.25rem;
line-height: 1.4; line-height: 1.4;
} }
#background {
background-image: none;
padding: 0;
}
#article-header {
display: flex;
flex-direction: column-reverse;
background-image: linear-gradient(
to bottom,
var(--primary-dark),
var(--primary-color)
);
color: white;
}
h1 {
margin: 0;
}
} }
</style> </style>

View file

@ -2,6 +2,7 @@
title: Spanien title: Spanien
subtitle: ¡Nos encanta España! subtitle: ¡Nos encanta España!
description: Seitdem wir Spanisch lernen haben wir eine besondere Verbindung zu diesem Land. Die Vorfreude ist groß und die Aussicht hier mit einem Boot ins Abenteuer zu starten ist wunderschön. description: Seitdem wir Spanisch lernen haben wir eine besondere Verbindung zu diesem Land. Die Vorfreude ist groß und die Aussicht hier mit einem Boot ins Abenteuer zu starten ist wunderschön.
introduction: England war wie England nun mal ist. Die Städte sind nicht meins und wohnen würde ich da auch nicht gerne. In dörflichen Regionen haben die kleinen Häuser noch einen gewissen Charme. Zusammen gepresst und zubetoniert macht es mich traurig. Umso besser, dass wir gleich etwa 2000km weiter südlich sind.
image: image:
path: titelbild_spanien.webp path: titelbild_spanien.webp
alt: Chiara und Tim mit strahlenden Gesichter. Es ist wieder warm! alt: Chiara und Tim mit strahlenden Gesichter. Es ist wieder warm!
@ -14,9 +15,7 @@ import BlogLink from '../../components/blog/BlogLink.astro'
import SingleImage from '../../components/blog/SingleImage.astro' import SingleImage from '../../components/blog/SingleImage.astro'
import DoubleImage from '../../components/blog/DoubleImage.astro' import DoubleImage from '../../components/blog/DoubleImage.astro'
England war wie England nun mal ist. Die Städte sind nicht meins und wohnen würde ich da auch nicht gerne.
In dörflichen Regionen haben die kleinen Häuser noch einen gewissen Charme. Zusammen gepresst
und zubetoniert macht es mich traurig. Umso besser, dass wir gleich etwa 2000km weiter südlich sind.
--- ---
<br /> <br />