feat: Finished all blog posts layout page

This commit is contained in:
2025-08-22 22:47:43 -04:00
parent 4195aa8d8f
commit abb4861389
14 changed files with 43 additions and 22 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -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!

View File

@ -18,17 +18,19 @@ css: posts.css
</div> </div>
<div class="container posts"> <div class="container posts">
{% for post in pagination.items %} {% for post in pagination.items %}
<div class="post-card"> <a href="{{ post.url }}">
{% if post.data.thumbnail %} <div class="post-card">
<img src="{{ post.data.thumbnail }}" alt="{{ post.data.title }}" /> {% if post.data.thumbnail %}
{% endif %} <img src="{{ post.data.thumbnail }}" alt="{{ post.data.title }}" />
<div class="post-body"> {% endif %}
<p class="post-date">{{ post.date | date: "%B %-d, %Y" }}</p> <div class="post-body">
<h1>{{ post.data.title }}</h1> <p class="post-date">{{ post.date | date: "%B %-d, %Y" }}</p>
<p>{{ post.data.context }}</p> <h1>{{ post.data.title }}</h1>
<!-- <p>Views {} | Likes {}</p> --> <p>{{ post.data.context }}</p>
<!-- <p>Views {} | Likes {}</p> -->
</div>
</div> </div>
</div> </a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>