design works
This commit is contained in:
parent
fd081f1c6f
commit
b1349a7892
6 changed files with 78 additions and 52 deletions
|
|
@ -18,10 +18,9 @@ const { posts } = Astro.props;
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.post-grid {
|
.post-grid {
|
||||||
padding: 24px 24px;
|
display: grid;
|
||||||
display: flex;
|
gap: 64px;
|
||||||
gap: 32px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ const localeDate = formatLocalizedDateString(post.date);
|
||||||
.wide-container {
|
.wide-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
padding: 64px;
|
padding: 48px 64px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
|
|
@ -56,7 +56,7 @@ const localeDate = formatLocalizedDateString(post.date);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-col {
|
.text-col {
|
||||||
width: 40%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
@ -67,7 +67,7 @@ const localeDate = formatLocalizedDateString(post.date);
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-col {
|
.image-col {
|
||||||
width: 60%;
|
width: 50%;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +75,7 @@ const localeDate = formatLocalizedDateString(post.date);
|
||||||
.image-col img {
|
.image-col img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: 250px;
|
max-height: 300px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
border: 2px solid white;
|
border: 2px solid white;
|
||||||
|
|
|
||||||
|
|
@ -9,44 +9,57 @@ 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);
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={`/blog/${post.slug}`} class="no-link-link">
|
<a href={`/blog/${post.slug}`} class="no-link-link">
|
||||||
<div class="frame rounded">
|
<div class="frame rounded">
|
||||||
<img src={img.src} alt={post.image.alt} class="rounded" />
|
<img src={img.src} alt={post.image.alt} class="rounded" />
|
||||||
<h2 class="headline">{post.title}</h2>
|
<div id="info">
|
||||||
<h7 class="subtitle">{post.subtitle}</h7>
|
|
||||||
<p>Lesezeit: {post.time2read} min</p>
|
|
||||||
<p class="description">{post.description}</p>
|
|
||||||
<div class="bottom-info">
|
|
||||||
<span>Author: {post.author}</span>
|
|
||||||
<span>{localeDate}</span>
|
<span>{localeDate}</span>
|
||||||
|
<span> | </span>
|
||||||
|
<span>Author: {post.author}</span>
|
||||||
|
<span> | </span>
|
||||||
|
<span>Lesezeit: {post.time2read} min</span>
|
||||||
</div>
|
</div>
|
||||||
|
<h1 class="headline">{post.title}</h1>
|
||||||
|
<h2 class="subtitle">{post.subtitle}</h2>
|
||||||
|
<p class="description">{post.description}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.frame {
|
.frame {
|
||||||
flex: 220px; auto 0 0;
|
|
||||||
padding: 8px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 1px solid black;
|
|
||||||
width: 240px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 150px;
|
height: 200px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-info {
|
#info {
|
||||||
display: flex;
|
padding: 8px 0 0 0;
|
||||||
justify-content: space-between;
|
font-size: 1.2rem;
|
||||||
margin-top: auto;
|
* {
|
||||||
|
color: grey;
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
|
||||||
|
.headline,
|
||||||
|
.subtitle {
|
||||||
|
color: var(--primary-color);
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 8px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin: 8px 0 0 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
title: Luxusurlaub in den Bergen - Hike & Bike im Wipptal
|
title: Luxusurlaub in den Bergen
|
||||||
subtitle: Das ist jetzt also unser Leben. Luxushotels, 3-Gänge-Menüs und die schönsten Umgebungen.
|
subtitle: Hike & Bike im Wipptal
|
||||||
description: Was könnte ein besser Kontrast zum Zelturlaub an der Ostsee sein, als eine Woche in einem luxuriösen Hotel, mitten in den Alpen? Und wenn ihr jetzt denkt, dass wir unsere Abfindung verschleudern...das ganze hat uns nur 80€ p.P. gekostet ;). Wie das funktioniert erfahrt ihr im Artikel.
|
description: Was könnte ein besser Kontrast zum Zelturlaub an der Ostsee sein, als eine Woche in einem luxuriösen Hotel, mitten in den Alpen? Und wenn ihr jetzt denkt, dass wir unsere Abfindung verschleudern...das ganze hat uns nur 80€ p.P. gekostet ;). Wie das funktioniert erfahrt ihr im Artikel.
|
||||||
introduction: Was könnte ein besser Kontrast zum Zelturlaub an der Ostsee sein, als eine Woche in einem luxuriösen Hotel, mitten in den Alpen? Und wenn ihr jetzt denkt, dass wir unsere Abfindung verschleudern...das ganze hat uns nur 80€ p.P. gekostet ;) Wie das funktioniert erfahrt ihr im Artikel.
|
introduction: Was könnte ein besser Kontrast zum Zelturlaub an der Ostsee sein, als eine Woche in einem luxuriösen Hotel, mitten in den Alpen? Und wenn ihr jetzt denkt, dass wir unsere Abfindung verschleudern...das ganze hat uns nur 80€ p.P. gekostet ;) Wie das funktioniert erfahrt ihr im Artikel.
|
||||||
image:
|
image:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "\"Habt ihr jetzt schon ein Boot?\""
|
title: Die Frage der Fragen
|
||||||
subtitle: Von uns, vom Boot, von euch
|
subtitle: "\"Habt ihr jetzt schon ein Boot?\""
|
||||||
description: "Die titelgebende Frage haben wir in den letzten Tagen unglaublich oft gehört. Deshalb möchten wir euch zeigen, was für uns in nächster Zeit ansteht. Anfangen will ich in der Vergangenheit und Enden in der Zukunft..."
|
description: "Die titelgebende Frage haben wir in den letzten Tagen unglaublich oft gehört. Deshalb möchten wir euch zeigen, was für uns in nächster Zeit ansteht. Anfangen will ich in der Vergangenheit und Enden in der Zukunft..."
|
||||||
introduction: Die titelgebende Frage haben wir in den letzten Tagen unglaublich oft gehört. Deshalb möchten wir euch zeigen, was für uns in nächster Zeit ansteht. Anfangen will ich in der Vergangenheit und enden in der Zukunft. In einem nächsten Artikel kommen wir sicher nochmal 'Zurück in die Zukunft' und beschreiben, was auf den zukünftigen Etappen passiert ist. Jetzt muss ich aber erst mal los. Das Boarding für den Flug nach Sofia beginnt!
|
introduction: Die titelgebende Frage haben wir in den letzten Tagen unglaublich oft gehört. Deshalb möchten wir euch zeigen, was für uns in nächster Zeit ansteht. Anfangen will ich in der Vergangenheit und enden in der Zukunft. In einem nächsten Artikel kommen wir sicher nochmal 'Zurück in die Zukunft' und beschreiben, was auf den zukünftigen Etappen passiert ist. Jetzt muss ich aber erst mal los. Das Boarding für den Flug nach Sofia beginnt!
|
||||||
image:
|
image:
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,31 @@ import PostPreviewLarge from "../components/PostPreviewLarge.astro";
|
||||||
import PostGrid from "../components/PostGrid.astro";
|
import PostGrid from "../components/PostGrid.astro";
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
|
|
||||||
const allPostsSorted = (await getCollection('posts')).sort(
|
const allPostsSorted = (await getCollection("posts")).sort(
|
||||||
(postA, postB) =>
|
(postA, postB) => postB.data.date.getTime() - postA.data.date.getTime(),
|
||||||
postB.data.date.getTime() - postA.data.date.getTime()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const [mostRecentPost, ...sortedPosts] = allPostsSorted;
|
const [mostRecentPost, ...sortedPosts] = allPostsSorted;
|
||||||
---
|
---
|
||||||
|
|
||||||
<Main>
|
<Main>
|
||||||
<PostPreviewLarge
|
<PostPreviewLarge post={mostRecentPost.data} />
|
||||||
post={mostRecentPost.data}
|
<div id="last-articles">
|
||||||
/>
|
<h2>Letzte Artikel</h2>
|
||||||
<PostGrid posts={sortedPosts} />
|
<PostGrid posts={sortedPosts} />
|
||||||
|
</div>
|
||||||
</Main>
|
</Main>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#last-articles {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0 64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin: 24px 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue