feat: Finished all blog posts layout page
This commit is contained in:
@ -9,13 +9,32 @@
|
|||||||
grid-column-gap: 2rem;
|
grid-column-gap: 2rem;
|
||||||
grid-row-gap: 2rem;
|
grid-row-gap: 2rem;
|
||||||
}
|
}
|
||||||
|
.posts > a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: rgba(var(--black), .76);
|
||||||
|
}
|
||||||
.posts > div {
|
.posts > div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.post-card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 1rem;
|
||||||
|
box-shadow: 0 2px 4px rgba(var(--black), .21);
|
||||||
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
.post-card:hover {
|
||||||
|
transform: translate(-4px, -4px); /* Up and left by 4px */
|
||||||
|
box-shadow: 0 8px 16px rgba(var(--black), 0.3); /* deeper shadow for “lifted” look */
|
||||||
|
}
|
||||||
.post-card > img {
|
.post-card > img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
|
border-top-left-radius: 1rem;
|
||||||
|
border-top-right-radius: 1rem;
|
||||||
|
}
|
||||||
|
.post-card .post-body {
|
||||||
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 1
|
title: Example post 1
|
||||||
date: 2025-08-01
|
date: 2025-08-01
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
First post! Content change
|
First post! Content change
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 10
|
title: Example post 10
|
||||||
date: 2025-08-10
|
date: 2025-08-10
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 3
|
title: Example post 3
|
||||||
date: 2025-08-11
|
date: 2025-08-11
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 12
|
title: Example post 12
|
||||||
date: 2025-08-12
|
date: 2025-08-12
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 2 - for Paz
|
title: Example post 2 - for Paz
|
||||||
date: 2025-08-02
|
date: 2025-08-02
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 3
|
title: Example post 3
|
||||||
date: 2025-08-03
|
date: 2025-08-03
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 4
|
title: Example post 4
|
||||||
date: 2025-08-04
|
date: 2025-08-04
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 5
|
title: Example post 5
|
||||||
date: 2025-08-05
|
date: 2025-08-05
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 6
|
title: Example post 6
|
||||||
date: 2025-08-06
|
date: 2025-08-06
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 7
|
title: Example post 7
|
||||||
date: 2025-08-07
|
date: 2025-08-07
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 8
|
title: Example post 8
|
||||||
date: 2025-08-08
|
date: 2025-08-08
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: Example post 9
|
title: Example post 9
|
||||||
date: 2025-08-09
|
date: 2025-08-09
|
||||||
thumbnail: https://dummyimage.com/1280x720/fff/aaa
|
thumbnail: https://dummyimage.com/1280x720/ccc/fff
|
||||||
---
|
---
|
||||||
|
|
||||||
Second post!
|
Second post!
|
||||||
@ -18,6 +18,7 @@ css: posts.css
|
|||||||
</div>
|
</div>
|
||||||
<div class="container posts">
|
<div class="container posts">
|
||||||
{% for post in pagination.items %}
|
{% for post in pagination.items %}
|
||||||
|
<a href="{{ post.url }}">
|
||||||
<div class="post-card">
|
<div class="post-card">
|
||||||
{% if post.data.thumbnail %}
|
{% if post.data.thumbnail %}
|
||||||
<img src="{{ post.data.thumbnail }}" alt="{{ post.data.title }}" />
|
<img src="{{ post.data.thumbnail }}" alt="{{ post.data.title }}" />
|
||||||
@ -29,6 +30,7 @@ css: posts.css
|
|||||||
<!-- <p>Views {} | Likes {}</p> -->
|
<!-- <p>Views {} | Likes {}</p> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user