largePreview done
This commit is contained in:
parent
440f0c40e5
commit
1db2fbca86
1 changed files with 35 additions and 24 deletions
|
|
@ -11,27 +11,29 @@ interface Props {
|
||||||
const { post } = Astro.props;
|
const { post } = Astro.props;
|
||||||
|
|
||||||
const img = findImageByPath(post.image.path);
|
const img = findImageByPath(post.image.path);
|
||||||
const localeDate = formatLocalizedDateString(post.date)
|
const localeDate = formatLocalizedDateString(post.date);
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="wide-container">
|
<div class="wide-container">
|
||||||
<div class="image-col col rounded">
|
<div class="image-col rounded">
|
||||||
<a href={`/blog/${post.slug}`}>
|
<a href={`/blog/${post.slug}`}>
|
||||||
<Image src={img} alt={post.image.alt} layout="constrained" />
|
<Image src={img} alt={post.image.alt} layout="constrained" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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">
|
<a href={`/blog/${post.slug}`} class="headline-link">
|
||||||
<h2 class="headline">{post.title}</h2>
|
<h2 class="headline">{post.title}</h2>
|
||||||
</a>
|
</a>
|
||||||
<h7>{post.subtitle}</h7>
|
<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>
|
<p class="description">{post.description}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -40,23 +42,24 @@ const localeDate = formatLocalizedDateString(post.date)
|
||||||
.wide-container {
|
.wide-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
padding: 0 32px;
|
padding: 64px;
|
||||||
min-width: 80%;
|
width: 100%;
|
||||||
max-width: 90%;
|
background-image: linear-gradient(
|
||||||
margin-bottom: 64px;
|
to bottom,
|
||||||
}
|
var(--primary-dark),
|
||||||
|
var(--primary-color)
|
||||||
|
);
|
||||||
|
|
||||||
.col {
|
* {
|
||||||
width: 50%;
|
color: white;
|
||||||
box-sizing: border-box;
|
}
|
||||||
min-width: 0;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-col {
|
.text-col {
|
||||||
|
width: 40%;
|
||||||
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: center;
|
||||||
margin: 32px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
|
@ -64,17 +67,19 @@ const localeDate = formatLocalizedDateString(post.date)
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-col {
|
.image-col {
|
||||||
|
width: 60%;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-col img {
|
.image-col img {
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
max-height: 250px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
|
border: 2px solid white;
|
||||||
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-info {
|
.top-info {
|
||||||
|
|
@ -84,6 +89,12 @@ const localeDate = formatLocalizedDateString(post.date)
|
||||||
color: lightslategray;
|
color: lightslategray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#new {
|
||||||
|
color: var(--accent-color);
|
||||||
|
margin-right: 12px;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
.vertical-line {
|
.vertical-line {
|
||||||
color: #789;
|
color: #789;
|
||||||
border-right-width: 2px;
|
border-right-width: 2px;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue