Compare commits

..

2 commits

Author SHA1 Message Date
fd081f1c6f large preview mobile 2026-10-05 14:25:57 +02:00
1db2fbca86 largePreview done 2026-10-05 14:24:22 +02:00

View file

@ -11,27 +11,29 @@ interface Props {
const { post } = Astro.props;
const img = findImageByPath(post.image.path);
const localeDate = formatLocalizedDateString(post.date)
const localeDate = formatLocalizedDateString(post.date);
---
<div class="wide-container">
<div class="image-col col rounded">
<div class="image-col rounded">
<a href={`/blog/${post.slug}`}>
<Image src={img} alt={post.image.alt} layout="constrained" />
</a>
</div>
<div class="text-col col">
<div class="text-col">
<div class="top-info">
<span id="new">NEU!</span>
<span>{localeDate}</span>
<span> | </span>
<span>Autor: {post.author}</span>
<span> | </span>
<span>Lesezeit: {post.time2read} min</span>
</div>
<a href={`/blog/${post.slug}`} class="headline-link">
<h2 class="headline">{post.title}</h2>
</a>
<h7>{post.subtitle}</h7>
<div class="top-info">
<span>{localeDate}</span>
<span class="vertical-line"></span>
<span>Autor: {post.author}</span>
<span class="vertical-line"></span>
<span>Lesezeit: {post.time2read} min</span>
</div>
<p class="description">{post.description}</p>
</div>
</div>
@ -40,23 +42,24 @@ const localeDate = formatLocalizedDateString(post.date)
.wide-container {
display: flex;
gap: 32px;
padding: 0 32px;
min-width: 80%;
max-width: 90%;
margin-bottom: 64px;
}
padding: 64px;
width: 100%;
background-image: linear-gradient(
to bottom,
var(--primary-dark),
var(--primary-color)
);
.col {
width: 50%;
box-sizing: border-box;
min-width: 0;
min-height: 0;
* {
color: white;
}
}
.text-col {
width: 40%;
display: flex;
flex-direction: column;
justify-content: flex-start;
margin: 32px 0;
justify-content: center;
}
h2 {
@ -64,17 +67,19 @@ const localeDate = formatLocalizedDateString(post.date)
}
.image-col {
width: 60%;
position: relative;
overflow: hidden;
}
.image-col img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
max-height: 250px;
object-fit: cover;
object-position: center;
border: 2px solid white;
border-radius: 12px;
}
.top-info {
@ -84,6 +89,12 @@ const localeDate = formatLocalizedDateString(post.date)
color: lightslategray;
}
#new {
color: var(--accent-color);
margin-right: 12px;
font-weight: bolder;
}
.vertical-line {
color: #789;
border-right-width: 2px;
@ -97,7 +108,7 @@ const localeDate = formatLocalizedDateString(post.date)
min-width: auto;
}
.col {
.text-col, .image-col {
width: 100%;
}