diff --git a/src/lib/components/MainLayout.svelte b/src/lib/components/MainLayout.svelte index 1d2716f27..ec22ce064 100644 --- a/src/lib/components/MainLayout.svelte +++ b/src/lib/components/MainLayout.svelte @@ -7,15 +7,14 @@ import Button from "./common/Button.svelte"; import Flex from "./common/Flex.svelte"; - import Logo from "./common/Logo.svelte"; import SignedIn from "./common/SignedIn.svelte"; import UserMenu from "./accounts/UserMenu.svelte"; import OrgMenu from "./accounts/OrgMenu.svelte"; import { SIGN_IN_URL } from "@/config/config"; + import Breadcrumbs from "./common/Breadcrumbs.svelte"; export let modal: boolean = false; - export let basement: "left" | "right" | null = null; let panel: "navigation" | "action" | null = null; @@ -29,18 +28,13 @@ }; } - function closeBasement() { - if (basement !== null) { - basement = null; - } - } - function closeModal() { modal = false; } const me = getContext>("me"); const org = getContext>("org"); + const breadcrumbs = getContext("breadcrumbs") ?? [];
@@ -52,8 +46,7 @@
{/if} - - + @@ -166,16 +159,6 @@ overflow-y: auto; } - .logo { - height: 1.5rem; - width: auto; - padding: 0 0.5rem; - } - - .breadcrumbs { - flex: 1 0 0; - } - .navigation { border-right: 1px solid var(--gray-2, #d8dee2); } diff --git a/src/lib/components/common/Breadcrumbs.svelte b/src/lib/components/common/Breadcrumbs.svelte new file mode 100644 index 000000000..eda4f98bd --- /dev/null +++ b/src/lib/components/common/Breadcrumbs.svelte @@ -0,0 +1,63 @@ + + + + + diff --git a/src/lib/components/common/stories/Breadcrumbs.stories.svelte b/src/lib/components/common/stories/Breadcrumbs.stories.svelte new file mode 100644 index 000000000..c1c45a182 --- /dev/null +++ b/src/lib/components/common/stories/Breadcrumbs.stories.svelte @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + +

DocumentCloud

+
+
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 02758e22c..da81879ec 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -17,6 +17,7 @@ // update context so other components can access and update setContext("me", me); setContext("org", org); + setContext("breadcrumbs", []); diff --git a/src/routes/app/+layout.svelte b/src/routes/app/+layout.svelte index cee03b703..96f5edeb9 100644 --- a/src/routes/app/+layout.svelte +++ b/src/routes/app/+layout.svelte @@ -13,10 +13,13 @@ import AddOns from "./sidebar/AddOns.svelte"; import Documents from "./sidebar/Documents.svelte"; import Projects from "./sidebar/Projects.svelte"; + import { setContext } from "svelte"; export let data: { pinnedAddons: Promise>; }; + + setContext("breadcrumbs", [{ href: "/app", label: "Documents" }]); diff --git a/src/routes/app/add-ons/+layout.svelte b/src/routes/app/add-ons/+layout.svelte new file mode 100644 index 000000000..37b14d460 --- /dev/null +++ b/src/routes/app/add-ons/+layout.svelte @@ -0,0 +1,7 @@ + + + diff --git a/src/routes/app/sidebar/AddOns.svelte b/src/routes/app/sidebar/AddOns.svelte index c0b0b7f79..f63162fd1 100644 --- a/src/routes/app/sidebar/AddOns.svelte +++ b/src/routes/app/sidebar/AddOns.svelte @@ -1,7 +1,7 @@