From 65932fcd04e582330129ee8eda7c778c62d86b2c Mon Sep 17 00:00:00 2001 From: secondl1ght Date: Thu, 16 May 2024 23:44:14 -0600 Subject: [PATCH] add breadcrumbs to area routes --- src/components/Breadcrumbs.svelte | 20 +++++++++++++++++++ src/lib/comp.ts | 1 + src/routes/communities/add/+page.svelte | 7 +++++++ .../communities/leaderboard/+page.svelte | 15 +++++++++++++- src/routes/community/[area]/+page.svelte | 10 ++++++++-- src/routes/countries/leaderboard/+page.svelte | 15 +++++++++++++- src/routes/country/[area]/+page.svelte | 10 ++++++++-- 7 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 src/components/Breadcrumbs.svelte diff --git a/src/components/Breadcrumbs.svelte b/src/components/Breadcrumbs.svelte new file mode 100644 index 00000000..c262ae28 --- /dev/null +++ b/src/components/Breadcrumbs.svelte @@ -0,0 +1,20 @@ + + +
+ {#each routes as route, index} + + {route.name} + + {#if index !== routes.length - 1} + + {/if} + {/each} +
diff --git a/src/lib/comp.ts b/src/lib/comp.ts index 554b8ebe..66a8115b 100644 --- a/src/lib/comp.ts +++ b/src/lib/comp.ts @@ -17,6 +17,7 @@ export { default as AreaStats } from '../components/AreaStats.svelte'; export { default as AreaTickets } from '../components/AreaTickets.svelte'; export { default as BadgeCard } from '../components/BadgeCard.svelte'; export { default as Boost } from '../components/Boost.svelte'; +export { default as Breadcrumbs } from '../components/Breadcrumbs.svelte'; export { default as CloseButton } from '../components/CloseButton.svelte'; export { default as CommunityCard } from '../components/CommunityCard.svelte'; export { default as CommunitySection } from '../components/CommunitySection.svelte'; diff --git a/src/routes/communities/add/+page.svelte b/src/routes/communities/add/+page.svelte index dfac2af8..37e99031 100644 --- a/src/routes/communities/add/+page.svelte +++ b/src/routes/communities/add/+page.svelte @@ -1,6 +1,7 @@ @@ -13,6 +25,7 @@
+
diff --git a/src/routes/community/[area]/+page.svelte b/src/routes/community/[area]/+page.svelte index 0b45c0ac..923e0ccd 100644 --- a/src/routes/community/[area]/+page.svelte +++ b/src/routes/community/[area]/+page.svelte @@ -1,10 +1,15 @@ @@ -16,6 +21,7 @@
+
diff --git a/src/routes/countries/leaderboard/+page.svelte b/src/routes/countries/leaderboard/+page.svelte index d661e79b..d071ed08 100644 --- a/src/routes/countries/leaderboard/+page.svelte +++ b/src/routes/countries/leaderboard/+page.svelte @@ -1,7 +1,19 @@ @@ -13,6 +25,7 @@
+
diff --git a/src/routes/country/[area]/+page.svelte b/src/routes/country/[area]/+page.svelte index 3b8b0c27..933b3b00 100644 --- a/src/routes/country/[area]/+page.svelte +++ b/src/routes/country/[area]/+page.svelte @@ -1,10 +1,15 @@ @@ -16,6 +21,7 @@
+