diff --git a/src/lib/components/global/BookmarksGrid.svelte b/src/lib/components/global/BookmarksGrid.svelte
new file mode 100644
index 0000000..8219403
--- /dev/null
+++ b/src/lib/components/global/BookmarksGrid.svelte
@@ -0,0 +1,205 @@
+
+
+{#if $bookmarks.length > 0}
+
+
+ {#if !hideOther}
+
+ {/if}
+
+
+
+
+
+{:else if !hideOther}
+
+
+
+
+
No bookmarks yet
+
Hover over any tool card and click the bookmark icon to save your favorites
+
+{/if}
+
+
diff --git a/src/lib/components/global/GlobalSearch.svelte b/src/lib/components/global/GlobalSearch.svelte
index f469ba7..c49e8ef 100644
--- a/src/lib/components/global/GlobalSearch.svelte
+++ b/src/lib/components/global/GlobalSearch.svelte
@@ -5,6 +5,7 @@
import Icon from './Icon.svelte';
import { ALL_PAGES } from '$lib/constants/nav';
import type { NavItem } from '$lib/constants/nav';
+ import { bookmarks } from '$lib/stores/bookmarks';
let isOpen = $state(false);
let query = $state('');
@@ -116,6 +117,7 @@
});
onMount(() => {
+ bookmarks.init();
document.addEventListener('keydown', handleGlobalKeydown);
return () => document.removeEventListener('keydown', handleGlobalKeydown);
});
@@ -159,16 +161,19 @@
onmouseenter={() => selectedIndex = index}
>
-
{result.label}
+
+
+ {result.label}
+
{#if result.description}
{result.description}
{/if}
- {result.href}
{#if index === selectedIndex}
-
+
{/if}
+ {result.href}
{/each}
@@ -189,12 +194,40 @@
Use ↑↓ to navigate, Enter to select
+
+ {#if $bookmarks.length > 0}
+
+
+
+ {#each $bookmarks.slice(0, 6) as bookmark, index}
+
+ {/each}
+
+
+ {/if}
{/if}
{/if}
diff --git a/src/lib/stores/bookmarks.ts b/src/lib/stores/bookmarks.ts
new file mode 100644
index 0000000..7ce432d
--- /dev/null
+++ b/src/lib/stores/bookmarks.ts
@@ -0,0 +1,69 @@
+import { writable } from 'svelte/store';
+import { browser } from '$app/environment';
+
+export interface BookmarkedTool {
+ href: string;
+ label: string;
+ description: string;
+ icon: string;
+}
+
+const STORAGE_KEY = 'bookmarked-tools';
+
+function createBookmarksStore() {
+ const { subscribe, set, update } = writable([]);
+
+ return {
+ subscribe,
+ init: () => {
+ if (browser) {
+ const stored = localStorage.getItem(STORAGE_KEY);
+ if (stored) {
+ try {
+ set(JSON.parse(stored));
+ } catch {
+ set([]);
+ }
+ }
+ }
+ },
+ add: (tool: BookmarkedTool) => {
+ update(bookmarks => {
+ if (!bookmarks.find(b => b.href === tool.href)) {
+ const newBookmarks = [...bookmarks, tool];
+ if (browser) {
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(newBookmarks));
+ }
+ return newBookmarks;
+ }
+ return bookmarks;
+ });
+ },
+ remove: (href: string) => {
+ update(bookmarks => {
+ const newBookmarks = bookmarks.filter(b => b.href !== href);
+ if (browser) {
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(newBookmarks));
+ }
+ return newBookmarks;
+ });
+ },
+ toggle: (tool: BookmarkedTool) => {
+ update(bookmarks => {
+ const existing = bookmarks.find(b => b.href === tool.href);
+ const newBookmarks = existing
+ ? bookmarks.filter(b => b.href !== tool.href)
+ : [...bookmarks, tool];
+ if (browser) {
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(newBookmarks));
+ }
+ return newBookmarks;
+ });
+ },
+ isBookmarked: (href: string, bookmarks: BookmarkedTool[]) => {
+ return bookmarks.some(b => b.href === href);
+ }
+ };
+}
+
+export const bookmarks = createBookmarksStore();
\ No newline at end of file
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index d66a566..1b90218 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -4,6 +4,7 @@
import { ALL_PAGES, SUB_NAV, type NavItem, type NavGroup } from '$lib/constants/nav';
import ToolsGrid from '$lib/components/global/ToolsGrid.svelte';
import SearchFilter from '$lib/components/furniture/SearchFilter.svelte';
+ import BookmarksGrid from '$lib/components/global/BookmarksGrid.svelte';
// Helper function to extract nav items from mixed structure
function extractNavItems(items: (NavItem | NavGroup)[]): NavItem[] {
@@ -70,6 +71,10 @@
{#if searchQuery.trim() === ''}
+
+
+
+
diff --git a/src/routes/bookmarks/+page.svelte b/src/routes/bookmarks/+page.svelte
new file mode 100644
index 0000000..eca54b6
--- /dev/null
+++ b/src/routes/bookmarks/+page.svelte
@@ -0,0 +1,67 @@
+
+
+
+ {pages.home.title}
+
+
+
+
+
+
+
+
+
+
+
+{#if bookmarkCount > 0}
+
+
+
+{/if}
+
+
+{#if bookmarkCount === 0 || showAll}
+
+{/if}
+
+
+