diff --git a/src/lib/components/DropdownNavMenu.svelte b/src/lib/components/DropdownNavMenu.svelte
new file mode 100644
index 00000000..530b8582
--- /dev/null
+++ b/src/lib/components/DropdownNavMenu.svelte
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte
index fdf6d9da..0fcdcdaa 100644
--- a/src/lib/components/Navbar.svelte
+++ b/src/lib/components/Navbar.svelte
@@ -10,6 +10,8 @@
import { env } from '$lib/util/env';
import { dismissPromotion, getActivePromotion } from '$lib/util/promos/promo';
import { stateStore } from '$lib/util/state';
+ import type { ComponentProps } from 'svelte';
+ import DropdownNavMenu from './DropdownNavMenu.svelte';
import Privacy from './Privacy.svelte';
import Theme from './Theme.svelte';
@@ -21,42 +23,28 @@
isMenuOpen = !isMenuOpen;
}
- interface Link {
- href: string;
- title?: string;
- icon?: string;
- img?: string;
- }
+ type Links = ComponentProps['links'];
- let links: Link[] = [
+ const githubLinks: Links = [
+ { title: 'Mermaid JS', href: 'https://github.com/mermaid-js/mermaid' },
{
- title: 'Documentation',
- href: 'https://mermaid.js.org/intro/getting-started.html'
+ title: 'Mermaid Live Editor',
+ href: 'https://github.com/mermaid-js/mermaid-live-editor'
},
{
- title: 'Tutorial',
- href: 'https://mermaid.js.org/ecosystem/tutorials.html'
- },
- {
- title: 'Mermaid',
- href: 'https://github.com/mermaid-js/mermaid'
- },
- {
- title: 'CLI',
+ title: 'Mermaid CLI',
href: 'https://github.com/mermaid-js/mermaid-cli'
- },
- {
- href: 'https://github.com/mermaid-js/mermaid-live-editor',
- icon: 'fab fa-github fa-lg'
}
];
- if (isEnabledMermaidChartLinks) {
- links.push({
- href: 'https://mermaidchart.com',
- img: './mermaidchart-logo.svg'
- });
- }
+ const documentationLinks: Links = [
+ { title: 'Getting started', href: 'https://mermaid.js.org/intro/getting-started.html' },
+ { title: 'Tutorials', href: 'https://mermaid.js.org/ecosystem/tutorials.html' },
+ {
+ title: 'Integrations',
+ href: 'https://mermaid.js.org/ecosystem/integrations-community.html'
+ }
+ ];
let activePromotion = $state(getActivePromotion());
@@ -94,7 +82,7 @@
{/if}
-
+
@@ -186,13 +176,4 @@
background: #661ae6;
display: flex;
}
-
- .navbar {
- z-index: 10000;
- }
-
- img {
- width: 1.5rem;
- height: 1.5rem;
- }