From b1cc6aef5d01b59daf64d12a8e9264324540d8b7 Mon Sep 17 00:00:00 2001 From: Nikhil M Warrier Date: Tue, 3 Mar 2026 08:27:28 +0530 Subject: Hide prev/next buttons, make PostNavigation more generic --- src/components/EventNavigation.astro | 54 ------------------------------------ src/components/PostNavigation.astro | 12 ++++---- src/pages/blog/[...id].astro | 4 ++- src/pages/events/[...id].astro | 9 +++--- 4 files changed, 14 insertions(+), 65 deletions(-) delete mode 100644 src/components/EventNavigation.astro (limited to 'src') diff --git a/src/components/EventNavigation.astro b/src/components/EventNavigation.astro deleted file mode 100644 index f1b76ce..0000000 --- a/src/components/EventNavigation.astro +++ /dev/null @@ -1,54 +0,0 @@ ---- -import Link from '@/components/Link.astro' -import { buttonVariants } from '@/components/ui/button' -import { cn } from '@/lib/utils' -import { Icon } from 'astro-icon/components' - -const { newerEvent, olderEvent } = Astro.props ---- - - diff --git a/src/components/PostNavigation.astro b/src/components/PostNavigation.astro index 8dc2db5..bca228a 100644 --- a/src/components/PostNavigation.astro +++ b/src/components/PostNavigation.astro @@ -4,7 +4,7 @@ import { buttonVariants } from '@/components/ui/button' import { cn } from '@/lib/utils' import { Icon } from 'astro-icon/components' -const { newerPost, olderPost, parentPost } = Astro.props +const { newerPost, olderPost, parentPost, baseURL } = Astro.props const isSubpost = !!parentPost --- @@ -15,11 +15,11 @@ const isSubpost = !!parentPost )} > @@ -43,7 +43,7 @@ const isSubpost = !!parentPost { isSubpost && ( diff --git a/src/pages/blog/[...id].astro b/src/pages/blog/[...id].astro index 5cc9eab..d4588e3 100644 --- a/src/pages/blog/[...id].astro +++ b/src/pages/blog/[...id].astro @@ -213,6 +213,7 @@ const tocSections = await getTOCSections(currentPostId) @@ -241,6 +242,7 @@ const tocSections = await getTOCSections(currentPostId) @@ -296,4 +298,4 @@ const tocSections = await getTOCSections(currentPostId) document.addEventListener('astro:page-load', ensureKatexStyles) document.addEventListener('astro:after-swap', ensureKatexStyles) - \ No newline at end of file + diff --git a/src/pages/events/[...id].astro b/src/pages/events/[...id].astro index 590a5c6..4c9665e 100644 --- a/src/pages/events/[...id].astro +++ b/src/pages/events/[...id].astro @@ -1,6 +1,6 @@ --- import Breadcrumbs from '@/components/Breadcrumbs.astro' -import EventNavigation from '@/components/EventNavigation.astro' +import PostNavigation from '@/components/PostNavigation.astro' import TOCHeader from '@/components/TOCHeader.astro' import TOCSidebar from '@/components/TOCSidebar.astro' import { badgeVariants } from '@/components/ui/badge' @@ -116,9 +116,10 @@ const tocSections = await getTOCSections(currentEventId) - -- cgit v1.2.3