From f44012353de1c7e837af2a26daef56ba3849e7de Mon Sep 17 00:00:00 2001 From: ebby Date: Mon, 5 Oct 2026 12:33:03 +0200 Subject: [PATCH] order and background on mobile --- blog/src/layouts/BlogPostLayout.astro | 117 ++++++++++++++++++-------- blog/src/pages/blog/7_Spanien.mdx | 2 +- 2 files changed, 81 insertions(+), 38 deletions(-) diff --git a/blog/src/layouts/BlogPostLayout.astro b/blog/src/layouts/BlogPostLayout.astro index 109deb9..adc6269 100644 --- a/blog/src/layouts/BlogPostLayout.astro +++ b/blog/src/layouts/BlogPostLayout.astro @@ -18,18 +18,16 @@ const localeDate = formatLocalizedDateString(postData.date);
-
- {postData.image.alt} -
-
- {localeDate} | - Autor: {postData.author} | - Lesezeit: {postData.time2read} -
-

{postData.title}

-

{postData.subtitle}

+
@@ -61,12 +59,16 @@ const localeDate = formatLocalizedDateString(postData.date); padding: 0 20%; } - #article-header { + #header { + display: flex; + flex-direction: column; background-color: white; - max-width: 900px; - padding: 0 64px; - font-size: 1.5rem; - line-height: 1.6; + padding-bottom: 16px; + } + + hr { + margin: 0; + padding: 0; } article { @@ -77,12 +79,51 @@ const localeDate = formatLocalizedDateString(postData.date); background-color: white; } - #titleImg { + #title-img { display: block; width: 100%; height: 300px; object-fit: cover; object-position: center; + order: 1; + } + + #header .info, + #header #introduction { + font-size: 1.5rem; + line-height: 1.6; + } + + #header #title { + font-size: 2.5rem; + padding: 0 64px; + } + + #header #subtitle { + font-size: 1.8rem; + padding: 0 64px; + } + + .info { + padding: 32px 64px 0 64px; + font-size: medium; + order: 2; + } + + #title { + margin-bottom: 0; + order: 3; + } + + #subtitle { + margin-top: 0; + font-weight: lighter; + order: 4; + } + + #introduction { + padding: 32px 64px 0 64px; + order: 5; } .markdown-content { @@ -93,21 +134,6 @@ const localeDate = formatLocalizedDateString(postData.date); cursor: zoom-in; } } - - .info { - padding-top: 16px; - font-size: medium; - } - - h1 { - margin-bottom: 0; - } - - h3 { - margin-top: 0; - font-weight: lighter; - } - .disclaimer { padding: 64px 0 16px 0; margin: 0; @@ -151,19 +177,36 @@ const localeDate = formatLocalizedDateString(postData.date); padding: 0; } - #article-header { - display: flex; - flex-direction: column-reverse; + #header { background-image: linear-gradient( to bottom, var(--primary-dark), var(--primary-color) ); - color: white; + * { + color: white; + } } - h1 { + .info { + order: 1; + } + + #title-img { + order: 4; + } + + #title { margin: 0; + order: 2; + } + + #subtitle { + order: 3; + } + + #introduction { + order: 5; } } diff --git a/blog/src/pages/blog/7_Spanien.mdx b/blog/src/pages/blog/7_Spanien.mdx index fa24192..29cf2fb 100644 --- a/blog/src/pages/blog/7_Spanien.mdx +++ b/blog/src/pages/blog/7_Spanien.mdx @@ -16,7 +16,7 @@ import SingleImage from '../../components/blog/SingleImage.astro' import DoubleImage from '../../components/blog/DoubleImage.astro' - +
---
## Zurück im warmen