styling done

This commit is contained in:
ebby 2026-10-05 15:26:31 +02:00
parent b1349a7892
commit a6a0b7ab26
4 changed files with 44 additions and 12 deletions

View file

@ -21,6 +21,6 @@ const { posts } = Astro.props;
display: grid; display: grid;
gap: 64px; gap: 64px;
width: 100%; width: 100%;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
} }
</style> </style>

View file

@ -30,10 +30,9 @@ const localeDate = formatLocalizedDateString(post.date);
<span>Lesezeit: {post.time2read} min</span> <span>Lesezeit: {post.time2read} min</span>
</div> </div>
<a href={`/blog/${post.slug}`} class="headline-link"> <a href={`/blog/${post.slug}`} class="headline-link">
<h2 class="headline">{post.title}</h2> <h1 id="headline">{post.title}</h1>
<h2 id="subtitle">{post.subtitle}</h2>
</a> </a>
<h7>{post.subtitle}</h7>
<p class="description">{post.description}</p> <p class="description">{post.description}</p>
</div> </div>
</div> </div>
@ -84,9 +83,9 @@ const localeDate = formatLocalizedDateString(post.date);
.top-info { .top-info {
justify-content: space-between; justify-content: space-between;
margin: 16px 0; color: grey;
font-size: 1.125rem; padding: 8px 0 0 0;
color: lightslategray; font-size: 1.2rem;
} }
#new { #new {
@ -101,19 +100,37 @@ const localeDate = formatLocalizedDateString(post.date);
margin-right: 16px; margin-right: 16px;
} }
#headline,
#subtitle {
font-weight: bold;
margin: 8px 0 0 0;
}
.description {
font-size: 1.2rem;
line-height: 1.4;
margin: 8px 0 0 0;
}
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {
.wide-container { .wide-container {
flex-direction: column; flex-direction: column;
gap: 0; gap: 0;
min-width: auto; min-width: auto;
padding: 32px;
} }
.text-col, .image-col { .text-col,
.image-col {
width: 100%; width: 100%;
} }
.image-col img { .image-col img {
position: static; position: static;
} }
.top-info {
font-size: 1.1rem;
}
} }
</style> </style>

View file

@ -181,7 +181,7 @@ const localeDate = formatLocalizedDateString(postData.date);
font-size: 1.25rem; font-size: 1.25rem;
line-height: 1.4; line-height: 1.4;
background-color: white; background-color: white;
border-radius: 48px; border-radius: 48px 48px 0 0;
} }
#hr-knast { #hr-knast {

View file

@ -13,10 +13,12 @@ const [mostRecentPost, ...sortedPosts] = allPostsSorted;
<Main> <Main>
<PostPreviewLarge post={mostRecentPost.data} /> <PostPreviewLarge post={mostRecentPost.data} />
<div id="background">
<div id="last-articles"> <div id="last-articles">
<h2>Letzte Artikel</h2> <h2>Letzte Artikel</h2>
<PostGrid posts={sortedPosts} /> <PostGrid posts={sortedPosts} />
</div> </div>
</div>
</Main> </Main>
<style> <style>
@ -31,4 +33,17 @@ const [mostRecentPost, ...sortedPosts] = allPostsSorted;
h2 { h2 {
margin: 24px 0; margin: 24px 0;
} }
@media only screen and (max-width: 800px) {
#last-articles {
align-items: center;
background-color: white;
border-radius: 48px 48px 0 0;
padding: 0 32px;
}
#background {
background-color: var(--primary-color);
}
}
</style> </style>