Compare commits

..

5 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
42fb4ae576 chore: Added temp example posts 2025-08-20 21:56:05 -04:00
a2576e1cfd chore: Re-organized posts 2025-08-20 21:55:44 -04:00
20 changed files with 178 additions and 26 deletions

View File

@ -3,6 +3,14 @@ import filtersPlugin from "./src/_config/filters.js";
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */ /** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
export default async function(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( eleventyConfig.addPassthroughCopy(
{'./public/': '/'} {'./public/': '/'}
); );

View File

@ -21,18 +21,6 @@
.content > p:not(:first-child) { .content > p:not(:first-child) {
margin-top: 2rem; 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) { @media (min-width: 992px) {
.title { .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; margin-right: auto;
} }
.title {
font-size: 3rem;
font-weight: 400;
}
.text-center {
text-align: center;
}
.h-100 { .h-100 {
height: 100%; height: 100%;
} }
@ -153,6 +161,19 @@ footer {
max-width: 100px; 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 { .mobile-nav {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

7
src/post/post-1.md Normal file
View File

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

7
src/post/post-10.md Normal file
View File

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

7
src/post/post-11.md Normal file
View File

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

7
src/post/post-12.md Normal file
View File

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

7
src/post/post-2.md Normal file
View File

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

7
src/post/post-3.md Normal file
View File

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

7
src/post/post-4.md Normal file
View File

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

7
src/post/post-5.md Normal file
View File

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

7
src/post/post-6.md Normal file
View File

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

7
src/post/post-7.md Normal file
View File

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

7
src/post/post-8.md Normal file
View File

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

7
src/post/post-9.md Normal file
View File

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

View File

@ -1,11 +1,47 @@
--- ---
pagination:
data: collections.posts
size: 10
alias: post
reverse: true
permalink: "/posts{% if pagination.pageNumber != 0 %}/{{ pagination.pageNumber }}{% endif %}/"
layout: layout.liquid layout: layout.liquid
title: Posts title: Posts
css: posts.css
--- ---
<div class="container"> <div class="alternating-background-container alternating-primary-brown">
{% for post in collections.post %} <div>
<h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2> <div class="contaier">
<p>{{ post.content }}</p> <h1 class="title text-center">All Posts</h1>
</div>
</div>
<div class="container posts">
{% for post in pagination.items %}
<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>
{% endfor %} {% endfor %}
</div>
</div>
<div class="container">
<div class="pagination mb-2">
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">← Previous</a>
{% endif %}
Page {{ pagination.pageNumber | plus: 1 }} of {{ pagination.pages | size }}
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">Next →</a>
{% endif %}
</div>
</div> </div>

View File

@ -1,5 +0,0 @@
---
title: Example post 11111
---
First post! Content change

View File

@ -1,5 +0,0 @@
---
title: Example post 2 - for Paz
---
Second post!