From 5f215b14c2149d71a9e9953163be7ecd234cd379 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 8 Dec 2025 16:01:34 +0200 Subject: [PATCH] feat(breadcrumb): start implementing interactive breadcrumbs --- apps/client/src/widgets/Breadcrumb.css | 9 +++++++++ apps/client/src/widgets/Breadcrumb.tsx | 21 +++++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/apps/client/src/widgets/Breadcrumb.css b/apps/client/src/widgets/Breadcrumb.css index fe081ee3f..1993e57ca 100644 --- a/apps/client/src/widgets/Breadcrumb.css +++ b/apps/client/src/widgets/Breadcrumb.css @@ -1,4 +1,13 @@ .component.breadcrumb { contain: none; margin: 0 10px; + display: flex; + align-items: center; + font-size: 0.9em; + gap: 0.25em; + + a { + color: inherit; + text-decoration: none; + } } diff --git a/apps/client/src/widgets/Breadcrumb.tsx b/apps/client/src/widgets/Breadcrumb.tsx index 24a859eac..dc1b07233 100644 --- a/apps/client/src/widgets/Breadcrumb.tsx +++ b/apps/client/src/widgets/Breadcrumb.tsx @@ -1,7 +1,8 @@ +import { Fragment } from "preact/jsx-runtime"; import "./Breadcrumb.css"; +import ActionButton from "./react/ActionButton"; import { useNoteContext } from "./react/hooks"; import NoteLink from "./react/NoteLink"; -import { joinElements } from "./react/react_utils"; export default function Breadcrumb() { const { noteContext } = useNoteContext(); @@ -9,9 +10,12 @@ export default function Breadcrumb() { return (
- {joinElements(notePath.map(item => ( - - )), <> › )} + {notePath.map(item => ( + + + + + ))}
) } @@ -25,6 +29,15 @@ function BreadcrumbItem({ notePath }: { notePath: string }) { ) } +function BreadcrumbSeparator({ notePath }: { notePath: string}) { + return ( + + ) +} + function buildNotePaths(notePathArray: string[] | undefined) { if (!notePathArray) return [];