CSS Anpassungen im Header und Preview

This commit is contained in:
Chiara 2026-08-18 14:48:08 +02:00
parent 69418f4bce
commit c3e2518900
4 changed files with 51 additions and 40 deletions

View file

@ -7,8 +7,8 @@
<!-- <a class="nav-link" href="/about">Über uns</a> --> <!-- <a class="nav-link" href="/about">Über uns</a> -->
</div> </div>
<div class="nav-right"> <div class="nav-right">
<a class="nav-link" href="/impressum">Impressum</a> <a class="nav-link" href="/impressum" style="#789">Impressum</a>
<a class="nav-link" href="/privacy-policy">Datenschutz</a> <a class="nav-link" href="/privacy-policy" style="#789">Datenschutz</a>
</div> </div>
</nav> </nav>
</header> </header>
@ -19,10 +19,10 @@
} }
header { header {
padding: 24px; padding: 32px;
display: flex; display: flex;
align-items: center; align-items: center;
background-color: var(--primary-color); background-color: #fff;
} }
#name { #name {
@ -31,9 +31,8 @@
} }
.vertical-line { .vertical-line {
border-right: 3px solid var(--primary-text); color: var(--primary-text);
padding-left: 16px; border-right-width: 3px;
height: 2rem;
} }
nav { nav {
@ -44,15 +43,11 @@
} }
a { a {
font-size: 1.5rem;
padding-left: 16px; padding-left: 16px;
color: var(--primary-text); color: var(--primary-text);
width: fit-content; width: fit-content;
} }
.nav-left {
}
.nav-right { .nav-right {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -60,7 +55,4 @@
} }
.nav-right > a {
font-size: 1rem;
}
</style> </style>

View file

@ -13,22 +13,22 @@ const { post, url } = Astro.props;
const img = findImageByPath(post.image.path); const img = findImageByPath(post.image.path);
--- ---
<a href={url} class="no-link-link">
<div class="wide-container"> <div class="wide-container">
<div class="image-col col rounded"> <div class="image-col col rounded">
<Image src={img} alt={post.image.alt} layout="constrained" /> <Image src={img} alt={post.image.alt} layout="constrained" />
</div> </div>
<div class="text-col col"> <div class="text-col col">
<div class="top-info"> <a href={url} class="headline-link">
<span>Autor: {post.author}</span>
<span>{post.date}</span>
</div>
<h2 class="headline">{post.title}</h2> <h2 class="headline">{post.title}</h2>
<h7 class="subtitle">{post.subtitle}</h7> </a>
<div class="top-info">
<span>{post.date}</span>
<span class="vertical-line"></span>
<span>Autor: {post.author}</span>
</div>
<p class="description">{post.description}</p> <p class="description">{post.description}</p>
</div> </div>
</div> </div>
</a>
<style> <style>
.wide-container { .wide-container {
@ -69,9 +69,16 @@ const img = findImageByPath(post.image.path);
} }
.top-info { .top-info {
display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 16px; margin: 16px 0;
font-size: 1.125rem;
color: lightslategray;
}
.vertical-line{
color: #789;
border-right-width: 2px;
margin-right: 16px;
} }
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {

View file

@ -1,8 +1,7 @@
--- ---
layout: ../../layouts/BlogPostLayout.astro layout: ../../layouts/BlogPostLayout.astro
title: Ostseeurlaub title: Ostseeurlaub - Finden wir ein Boot? Suchen wir überhaupt oder faulenzen wir nur?
subtitle: Finden wir ein Boot? Suchen wir überhaupt oder faulenzen wir nur? description: Ostseeurlaub bedeutet für mich viele Kindheitserinnerungen. Besonders diese Woche war vollgepackt davon. Hier meine Reiseempfehlung...
description: Ostseeurlaub bedeutet für mich ganz viele Kindheitserinnerungen. Besonders diese Woche war vollgepackt davon. Hier meine Reiseempfehlung...
image: image:
path: ostsee.jpg path: ostsee.jpg
alt: Chiara und Tim vor einem Strand alt: Chiara und Tim vor einem Strand

View file

@ -1,12 +1,12 @@
:root { :root {
--primary-color: rgb(32, 33, 79); --primary-color: #416A79;
--primary-text: rgb(215, 213, 213); --primary-text: #454545;
} }
* { * {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
box-sizing: border-box; box-sizing: border-box;
font-size: 110%; /*font-size: 110%;*/
} }
html, body { html, body {
@ -23,6 +23,7 @@ body {
} }
.nav-link { .nav-link {
font-size: 1.2rem;
text-decoration: none; text-decoration: none;
color: black; color: black;
} }
@ -39,7 +40,13 @@ body {
.headline { .headline {
margin-top: 8px; margin-top: 8px;
margin-bottom: 0; margin-bottom: 0;
font-weight: bold; font-weight: normal;
font-size: 28px;
}
.headline-link{
color: var(--primary-color);
text-decoration: none;
} }
.subtitle { .subtitle {
@ -47,9 +54,15 @@ body {
} }
.description { .description {
font-weight: bold; font-size: 1.125rem;
} }
.rounded { .rounded {
border-radius: 8px; border-radius: 8px;
} }
.vertical-line {
border-right-style: solid;
padding-left: 16px;
height: 2rem;
}