Compare commits

...

3 Commits

Author SHA1 Message Date
4195aa8d8f chore: Progress sync for the night
All checks were successful
Deploy Blog to Folder / deploy (push) Successful in 4s
2025-08-21 01:08:50 -04:00
32bff9eaf9 chore: Moved reusable CSS classes to shared stylesheet 2025-08-21 01:08:31 -04:00
41d4174a09 fix: Fixed timezone date parsing issue 2025-08-21 01:07:35 -04:00
17 changed files with 109 additions and 33 deletions

View File

@ -3,6 +3,14 @@ import filtersPlugin from "./src/_config/filters.js";
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
export default async function(eleventyConfig) {
eleventyConfig.addDateParsing(function(dateValue) {
if (dateValue != null && typeof(dateValue) === 'object') {
dateValue = new Date(dateValue.getFullYear(), dateValue.getMonth(), dateValue.getDate() + 1);
}
return dateValue; // fallback
});
eleventyConfig.addPassthroughCopy(
{'./public/': '/'}
);

View File

@ -21,18 +21,6 @@
.content > p:not(:first-child) {
margin-top: 2rem;
}
.alternating-background-container > :nth-child(2n-1) {
background-color: var(--primary-alternating-color);
}
.alternating-background-container > :nth-child(2n) {
background-color: var(--secondary-alternating-color);
}
.alternating-background-container > div {
padding: 2rem 0;
}
.alternating-primary-brown {
--primary-alternating-color: rgba(var(--brown), .21);
}
@media (min-width: 992px) {
.title {

25
public/css/posts.css Normal file
View File

@ -0,0 +1,25 @@
.mb-2 {
margin-bottom: 2rem;
}
.posts {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
grid-column-gap: 2rem;
grid-row-gap: 2rem;
}
.posts > div {
width: 100%;
}
.post-card > img {
width: 100%;
object-fit: cover;
object-position: center;
}
@media (min-width: 992px) {
.posts {
grid-template-columns: repeat(2, 1fr);
}
}

View File

@ -61,6 +61,14 @@ footer {
margin-right: auto;
}
.title {
font-size: 3rem;
font-weight: 400;
}
.text-center {
text-align: center;
}
.h-100 {
height: 100%;
}
@ -153,6 +161,19 @@ footer {
max-width: 100px;
}
.alternating-background-container > :nth-child(2n-1) {
background-color: var(--primary-alternating-color);
}
.alternating-background-container > :nth-child(2n) {
background-color: var(--secondary-alternating-color);
}
.alternating-background-container > div {
padding: 2rem 0;
}
.alternating-primary-brown {
--primary-alternating-color: rgba(var(--brown), .21);
}
.mobile-nav {
display: flex;
flex-direction: column;

View File

@ -1,5 +1,7 @@
---
title: Example post 11111
title: Example post 1
date: 2025-08-01
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
First post! Content change

View File

@ -1,5 +1,7 @@
---
title: Example post 10
date: 2025-08-10
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 3
date: 2025-08-11
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 12
date: 2025-08-12
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 2 - for Paz
date: 2025-08-02
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 3
date: 2025-08-03
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 4
date: 2025-08-04
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 5
date: 2025-08-05
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 6
date: 2025-08-06
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 7
date: 2025-08-07
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 8
date: 2025-08-08
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -1,5 +1,7 @@
---
title: Example post 9
date: 2025-08-09
thumbnail: https://dummyimage.com/1280x720/fff/aaa
---
Second post!

View File

@ -7,24 +7,33 @@ pagination:
permalink: "/posts{% if pagination.pageNumber != 0 %}/{{ pagination.pageNumber }}{% endif %}/"
layout: layout.liquid
title: Posts
css: posts.css
---
<div class="container">
<h1>All Posts</h1>
<div class="alternating-background-container alternating-primary-brown">
<div>
<div class="contaier">
<h1 class="title text-center">All Posts</h1>
</div>
<div class="container">
<ul>
</div>
<div class="container posts">
{% for post in pagination.items %}
<li>
<a href="{{ post.url }}">{{ post.data.title }}</a> {{ post.date | date: "%B %-d, %Y" }}
</li>
{% endfor %}
</ul>
<div class="post-card">
{% if post.data.thumbnail %}
<img src="{{ post.data.thumbnail }}" alt="{{ post.data.title }}" />
{% endif %}
<div class="post-body">
<p class="post-date">{{ post.date | date: "%B %-d, %Y" }}</p>
<h1>{{ post.data.title }}</h1>
<p>{{ post.data.context }}</p>
<!-- <p>Views {} | Likes {}</p> -->
</div>
<div class="pagination">
</div>
{% endfor %}
</div>
</div>
<div class="container">
<div class="pagination mb-2">
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">← Previous</a>
{% endif %}
@ -35,3 +44,4 @@ title: Posts
<a href="{{ pagination.href.next }}">Next →</a>
{% endif %}
</div>
</div>