From f0b541cfdc2e155298ba998d323393c67928fb24 Mon Sep 17 00:00:00 2001 From: Laker Turner Date: Sun, 30 Mar 2025 21:12:05 +0100 Subject: [PATCH] chchchchch changez --- astro.config.mjs | 2 +- src/components/lists/BlogPostList.astro | 12 +++--- src/components/lists/NoteList.astro | 2 +- src/components/ui/Footer.astro | 11 ++++- src/components/ui/Header.astro | 19 +-------- src/components/ui/Navigation.astro | 7 ++-- src/components/ui/Notif.astro | 10 ++++- src/components/ui/Prose.astro | 2 +- src/components/ui/Strapline.astro | 2 +- src/components/util/Head.astro | 56 ++++++++++++------------- src/content.config.ts | 4 +- src/content/bio.md | 2 +- src/content/blog/meow.md | 1 + src/content/blog/now1.md | 6 ++- src/data/flavourtext.json | 15 +++++++ src/layouts/Page.astro | 2 +- src/lib/fun.ts | 34 ++++++--------- src/lib/metadata.ts | 21 ++++------ src/pages/blog/index.astro | 6 +-- src/pages/blog/tags/[tag].astro | 44 +++++++++++++++++++ src/pages/blog/tags/index.astro | 7 +++- src/pages/index.astro | 2 +- src/pages/now.astro | 24 ++++------- src/site.config.ts | 13 ++++-- 24 files changed, 175 insertions(+), 129 deletions(-) create mode 100644 src/data/flavourtext.json create mode 100644 src/pages/blog/tags/[tag].astro diff --git a/astro.config.mjs b/astro.config.mjs index e8a5d3f..63230de 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,6 +1,6 @@ // @ts-check import { defineConfig } from 'astro/config'; - +import config from '~/site.config' import tailwindcss from '@tailwindcss/vite'; // https://astro.build/config diff --git a/src/components/lists/BlogPostList.astro b/src/components/lists/BlogPostList.astro index 7c52d9b..5a7e619 100644 --- a/src/components/lists/BlogPostList.astro +++ b/src/components/lists/BlogPostList.astro @@ -4,12 +4,11 @@ import { getCollection } from "astro:content"; import { getPublishedAndSortedPosts } from "~/lib/blog"; interface Props { - collection: string; limit?: number; } -const { collection, limit } = Astro.props; -const items = getPublishedAndSortedPosts(await getCollection(collection)); +const { limit } = Astro.props; +const items = getPublishedAndSortedPosts(await getCollection("blog")); const limitedItems = limit ? items.slice(0, limit) : items; const getPostIcon = (item: { data: { icon?: string } }) => { @@ -26,16 +25,17 @@ const getPostIcon = (item: { data: { icon?: string } }) => {
  • - +

    {item.data.title}

    - + + {(item.data.tags ?? []).map((tag) => ( - {tag} + {tag} ))}

    diff --git a/src/components/lists/NoteList.astro b/src/components/lists/NoteList.astro index 6c69c7b..2e86f7e 100644 --- a/src/components/lists/NoteList.astro +++ b/src/components/lists/NoteList.astro @@ -24,7 +24,7 @@ const renderedItems = await Promise.all(
      { renderedItems.map((item) => ( -
    • +
    • diff --git a/src/components/ui/Footer.astro b/src/components/ui/Footer.astro index 2018981..24b2692 100644 --- a/src/components/ui/Footer.astro +++ b/src/components/ui/Footer.astro @@ -1,5 +1,5 @@ --- - +import { isBirthday } from "~/lib/fun"; --- diff --git a/src/components/ui/Header.astro b/src/components/ui/Header.astro index 4f2508a..ea7500b 100644 --- a/src/components/ui/Header.astro +++ b/src/components/ui/Header.astro @@ -1,30 +1,13 @@ --- import Navigation from "./Navigation.astro"; import conf from "~/site.config"; -import { isBlog } from "~/lib/metadata"; -let headertext = conf.siteName; +let headertext = conf.site.title; let headerurl = "/"; -let headerarrow = false; - -if (isBlog(Astro.url.pathname)) { - headertext = "Everything And The Girl"; - headerurl = "/blog"; - headerarrow = true; -} ---

      - { - headerarrow && ( - - - - - - ) - } {headertext}

      diff --git a/src/components/ui/Navigation.astro b/src/components/ui/Navigation.astro index 792de62..d00397d 100644 --- a/src/components/ui/Navigation.astro +++ b/src/components/ui/Navigation.astro @@ -23,7 +23,7 @@ const headerLinks = [ { label: "Blog", href: "/blog", - icon: "fa-solid fa-blog", + icon: "fa-solid fa-star", }, { label: "Contact", @@ -36,12 +36,11 @@ const headerLinks = [