From 1376a56766a883be8380243a80238644cf1651b1 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 17 Jul 2024 20:55:58 +0100 Subject: [PATCH] Dev (#33) * fixed css fuckup Signed-off-by: Ash Entwisle * tweaked css Signed-off-by: Ash Entwisle * tweaked css Signed-off-by: Ash Entwisle * updated exec names Signed-off-by: Ash Entwisle * fixed blogpost sort (#30) Signed-off-by: Ash Entwisle * Hotfix/done goofery (#32) * fixed blogpost sort Signed-off-by: Ash Entwisle * forgor to change the path of my pfp lol Signed-off-by: Ash Entwisle --------- Signed-off-by: Ash Entwisle * Revert "Bugfix/blogpost sort (#28)" (#29) This reverts commit 58f452c9bb2ad3651190738cdde46450fa181787. --------- Signed-off-by: Ash Entwisle --- src/pages/blog.astro | 58 +++++++++++++++++++----------------- src/pages/former-execs.astro | 12 ++++---- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 3923c3f..f2c4cf0 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -3,7 +3,6 @@ import Center from "../components/base/Center.astro"; import Icon from "../components/base/Icon.astro"; import Boilerplate from "../layouts/Boilerplate.astro"; - const rawPosts = await Astro.glob("./posts/*.mdx"); const search = Astro.url.searchParams.get("q") || ""; @@ -13,15 +12,14 @@ const posts = rawPosts return { url: post.url ?? "/", data: post.frontmatter, - } + }; }); const filteredPosts = posts.filter((post) => { - return post.data.title.toLowerCase() - .includes(search.toLowerCase()) - || - post.data.description.toLowerCase() - .includes(search.toLowerCase()); + return ( + post.data.title.toLowerCase().includes(search.toLowerCase()) || + post.data.description.toLowerCase().includes(search.toLowerCase()) + ); }); // sort posts in decscending order of date @@ -29,10 +27,6 @@ filteredPosts.sort((a, b) => { return a.data.date < b.data.date ? 1 : -1; }); - - - - const keywords = [ "hull", "computer", @@ -62,10 +56,15 @@ const keywords = [