feat: add an all page with cards to link to it
All checks were successful
test-build / guarddog (push) Successful in 27s
renovate / renovate (push) Successful in 41s
test-build / build (push) Successful in 3m17s

This commit is contained in:
2026-03-08 21:38:54 -05:00
parent ae57c60935
commit 7327795d39
12 changed files with 368 additions and 4 deletions

View File

@@ -65,11 +65,66 @@ const categoriesPosts = posts
/>
<section class="max-w-340 2xl:max-w-full mb-10 px-4 sm:px-6 lg:px-8 py-8 mx-auto mt-10">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="columns-1 sm:columns-2 lg:columns-3 gap-6">
{categoriesPosts.map((b) =>
<BlogCard post={b} />
<div class="break-inside-avoid mb-6">
<BlogCard post={b} />
</div>
)}
</div>
</section>
</BaseLayout>
<script>
// Add smooth reveal animations for content after loading
document.addEventListener('astro:page-load', () => {
const animateContent = () => {
// Animate group 1
const smoothReveal = document.querySelectorAll('.smooth-reveal');
smoothReveal.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
50 + index * 100
);
});
// Animate group 2
const smoothReveal2 = document.querySelectorAll('.smooth-reveal-2');
smoothReveal2.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
200 + index * 150
);
});
// Animate topic cards with staggered delay
const smoothRevealCards = document.querySelectorAll('.smooth-reveal-cards');
smoothRevealCards.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
500 + index * 100
);
});
// Animate with just fade in with staggered delay
const smoothRevealFade = document.querySelectorAll('.smooth-reveal-fade');
smoothRevealFade.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal-fade');
},
100 + index * 250
);
});
};
animateContent();
});
</script>

View File

@@ -3,6 +3,7 @@ import { readSingleton } from '@directus/sdk';
import HeroSection from '@components/sections/HeroSection.astro';
import CategorySection from '@components/sections/CategorySection.astro';
import AllCategoriesSection from '@components/sections/AllCategoriesSection.astro';
import BaseLayout from '@layouts/BaseLayout.astro';
import directus from '@lib/directus';
@@ -40,6 +41,8 @@ const global = await directus.request(readSingleton('site_global'));
<CategorySection />
<AllCategoriesSection />
</BaseLayout>
<script>