From 935535a4984b96fb3ee2ebdee7990210bc919815 Mon Sep 17 00:00:00 2001 From: Carter McBride <18412686+carterworks@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:55:46 -0600 Subject: [PATCH] Show all feed items as a list --- src/pages/index.astro | 61 +++++++++++++++++++++++++++++-------------- tailwind.config.js | 11 -------- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index d860263..ee0fc5b 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -5,7 +5,9 @@ const feedItems = await getAllFeedItems(); const categories = Array.from( new Set(feedItems.contents.map((item) => item.category)), ).sort(); -const categoriesSelectorCss = categories.map((c => ` +const categoriesSelectorCss = categories + .map( + (c) => ` #category-picker:has(#${c}:checked) ~ main ul { > .${c}-item { display: block; @@ -13,11 +15,13 @@ const categoriesSelectorCss = categories.map((c => ` > *:not(.${c}-item) { display: none; } -}`)).join("\n") +}`, + ) + .join("\n"); --- - +
@@ -25,36 +29,53 @@ const categoriesSelectorCss = categories.map((c => `{feedItems.contents.length} item(s) | {feedItems.errors.length} error(s)