From e4eef33c2a7fc8f1e282bc2cf2882ab9d8f90963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20H=C3=B6lting?= <87192362+moritz-hoelting@users.noreply.github.com> Date: Thu, 19 Mar 2026 09:35:24 +0100 Subject: [PATCH] fix wrong icons being used for mobile drawer & do not show empty table of contents --- src/components/ArticleContent.astro | 32 ++++++++++++++--------------- src/components/Drawer.astro | 25 ++++++++++++---------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/components/ArticleContent.astro b/src/components/ArticleContent.astro index 49ac5b1..c8c6658 100644 --- a/src/components/ArticleContent.astro +++ b/src/components/ArticleContent.astro @@ -13,22 +13,22 @@ const { Content, headings } = await render(entry);
- + { + headings.length > 0 && ( + + ) + } diff --git a/src/components/Drawer.astro b/src/components/Drawer.astro index 2921a92..894bdeb 100644 --- a/src/components/Drawer.astro +++ b/src/components/Drawer.astro @@ -1,6 +1,7 @@ --- import { SITE, LINKS } from "@/consts"; import { cn } from "@/lib/utils"; +import { Icon } from "astro-icon/components"; const { pathname } = Astro.url; const subpath = pathname.match(/[^/]+/g); --- @@ -36,35 +37,37 @@ const subpath = pathname.match(/[^/]+/g); href="/search/" aria-label={`Search blog posts and projects on ${SITE.TITLE}`} class={cn( - "size-9 rounded-full p-2 items-center justify-center text-center bg-transparent hover:bg-black/5 dark:hover:bg-white/20 stroke-current hover:stroke-black hover:dark:stroke-white border border-black/10 dark:border-white/25 transition-colors duration-300 ease-in-out", + "size-9 rounded-full p-2 flex items-center justify-center text-center bg-transparent hover:bg-black/5 dark:hover:bg-white/20 stroke-current hover:stroke-black hover:dark:stroke-white border border-black/10 dark:border-white/25 transition-colors duration-300 ease-in-out", pathname === "/search/" || "/" + subpath?.[0] === "search" ? "pointer-events-none bg-black dark:bg-white text-white dark:text-black" : "", )} > -
+ -
+