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;
gap: 64px;
width: 100%;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}
</style>

View file

@ -30,10 +30,9 @@ const localeDate = formatLocalizedDateString(post.date);
<span>Lesezeit: {post.time2read} min</span>
</div>
<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>
<h7>{post.subtitle}</h7>
<p class="description">{post.description}</p>
</div>
</div>
@ -84,9 +83,9 @@ const localeDate = formatLocalizedDateString(post.date);
.top-info {
justify-content: space-between;
margin: 16px 0;
font-size: 1.125rem;
color: lightslategray;
color: grey;
padding: 8px 0 0 0;
font-size: 1.2rem;
}
#new {
@ -101,19 +100,37 @@ const localeDate = formatLocalizedDateString(post.date);
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) {
.wide-container {
flex-direction: column;
gap: 0;
min-width: auto;
padding: 32px;
}
.text-col, .image-col {
.text-col,
.image-col {
width: 100%;
}
.image-col img {
position: static;
}
.top-info {
font-size: 1.1rem;
}
}
</style>

View file

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

View file

@ -13,9 +13,11 @@ const [mostRecentPost, ...sortedPosts] = allPostsSorted;
<Main>
<PostPreviewLarge post={mostRecentPost.data} />
<div id="last-articles">
<h2>Letzte Artikel</h2>
<PostGrid posts={sortedPosts} />
<div id="background">
<div id="last-articles">
<h2>Letzte Artikel</h2>
<PostGrid posts={sortedPosts} />
</div>
</div>
</Main>
@ -31,4 +33,17 @@ const [mostRecentPost, ...sortedPosts] = allPostsSorted;
h2 {
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>