diff --git a/src/lib/components/global/ToolCard.svelte b/src/lib/components/global/ToolCard.svelte index d26debe..7db2a65 100644 --- a/src/lib/components/global/ToolCard.svelte +++ b/src/lib/components/global/ToolCard.svelte @@ -455,7 +455,7 @@ display: flex; flex-direction: column; align-items: center; - gap: var(--spacing-xs); + gap: var(--spacing-sm); width: 100%; position: relative; z-index: 1; diff --git a/src/lib/components/home/HomepageBookmarks.svelte b/src/lib/components/home/HomepageBookmarks.svelte index 35e7442..7b8071d 100644 --- a/src/lib/components/home/HomepageBookmarks.svelte +++ b/src/lib/components/home/HomepageBookmarks.svelte @@ -1,38 +1,293 @@ - +
+
+
+
+ {#if activeView === 'bookmarks'} + +

Bookmarked Tools

+ {bookmarkCount} + {:else if activeView === 'most-used'} + +

Most Used

+ {mostUsedCount} + {:else if activeView === 'recent'} + +

Recent

+ {recentCount} + {/if} +
- -{#if bookmarkCount > 0} -
- +
+ + + +
+
+ +
+ {#if activeView === 'bookmarks'} + {#if bookmarkCount > 0} + + {:else} +
+
+ +
+

No bookmarks yet

+

Hover over any tool card and click the bookmark icon to save your favorites

+
+ {/if} + {:else if activeView === 'most-used'} + {#if mostUsedCount > 0} + + {:else} +
+
+ +
+

No usage data yet

+

Start using tools to see your most frequently used ones here

+
+ {/if} + {:else if activeView === 'recent'} + {#if recentCount > 0} + + {:else} +
+
+ +
+

No recent tools

+

Recently visited tools will appear here

+
+ {/if} + {/if} +
-{/if} - -{#if bookmarkCount === 0 || showAll} - -{/if} + + {#if hasItems()} +
+ +
+ {/if} + + + {#if !hasItems() || showAll} +
+ +
+ {/if} +
diff --git a/src/lib/components/home/HomepageCategories.svelte b/src/lib/components/home/HomepageCategories.svelte index f7e8a10..1843e7e 100644 --- a/src/lib/components/home/HomepageCategories.svelte +++ b/src/lib/components/home/HomepageCategories.svelte @@ -15,6 +15,14 @@ let { toolPages, referencePages }: Props = $props(); + // Get featured tools (up to 12) + const featuredTools = $derived( + toolPages + .filter((tool) => tool.featured === true) + // .sort(() => Math.random() - 0.5) + .slice(0, 6), + ); + // Category configuration - easily extensible for future customization interface CategorySection { id: string; @@ -109,7 +117,7 @@ {#if searchQuery.trim() === ''}
- + {#if $bookmarks.length > 0}
@@ -128,6 +136,15 @@ searchQuery="" />
+ {:else if featuredTools.length > 0} +
+
+ +

Featured

+ {featuredTools.length} +
+ +
{/if} @@ -286,10 +303,10 @@ flex-direction: column; gap: var(--spacing-md); background: var(--bg-tertiary); - background: radial-gradient( - color-mix(in srgb, var(--bg-tertiary), transparent 30%), - color-mix(in srgb, var(--bg-tertiary), var(--bg-primary) 60%) - ); + // background: radial-gradient( + // color-mix(in srgb, var(--bg-tertiary), transparent 30%), + // color-mix(in srgb, var(--bg-tertiary), var(--bg-primary) 60%) + // ); padding: var(--spacing-md); border-radius: var(--radius-md); border: 1px solid var(--border-primary); @@ -370,6 +387,7 @@ border: none; box-shadow: none; grid-column: 1 / -1; + max-height: none; } // Usage row: 2/3 and 1/3 split diff --git a/src/lib/constants/icon-map.ts b/src/lib/constants/icon-map.ts index dbbf850..07148d7 100644 --- a/src/lib/constants/icon-map.ts +++ b/src/lib/constants/icon-map.ts @@ -285,6 +285,7 @@ export const iconMap: Record = { mailbox: ``, mustache: ``, 'frequently-used': ``, + star: ``, // 'template': ``, // 'list-check': ``, share: ``, diff --git a/src/lib/constants/nav.ts b/src/lib/constants/nav.ts index e9e91e3..cb51642 100644 --- a/src/lib/constants/nav.ts +++ b/src/lib/constants/nav.ts @@ -12,6 +12,7 @@ export type NavItem = { description?: string; icon?: string; keywords?: string[]; + featured?: boolean; }; export type NavGroup = { @@ -199,6 +200,7 @@ export const SUB_NAV: Record = { label: 'IPv4 Subnet Calculator', description: 'Calculate subnet masks, network addresses, broadcast addresses, and host ranges', icon: 'subnet-calculator', + featured: true, keywords: [ 'subnet', 'calculator', @@ -263,6 +265,7 @@ export const SUB_NAV: Record = { label: 'CIDR → Mask', description: 'Convert CIDR notation (e.g. /24) to subnet mask format (255.255.255.0)', icon: 'cidr-convertor', + featured: true, keywords: ['cidr', 'convert', 'converter', 'mask', 'subnet', 'notation', '/24', '255.255.255.0'], }, { @@ -425,6 +428,7 @@ export const SUB_NAV: Record = { label: 'Contains (A ⊆ B)', description: 'Check if one IP set contains another', icon: 'containment', + featured: true, keywords: [ 'set', 'operations', @@ -733,6 +737,7 @@ export const SUB_NAV: Record = { label: 'MAC Address Converter', description: 'Convert MAC addresses between formats and identify manufacturer from OUI database', icon: 'mac-lookup', + featured: true, keywords: [ 'mac', 'address', @@ -1242,6 +1247,7 @@ export const SUB_NAV: Record = { label: 'DNS Query Performance', description: 'Compare DNS resolver speeds across multiple providers to find the fastest for your location', icon: 'zap', + featured: true, keywords: [ 'dns', 'performance', @@ -1421,6 +1427,7 @@ export const SUB_NAV: Record = { description: 'Analyze TLS/SSL handshake timing breakdown with detailed phase information and certificate exchange', icon: 'handshake', + featured: true, keywords: [ 'tls', 'handshake', @@ -1439,6 +1446,7 @@ export const SUB_NAV: Record = { label: 'CT Log Search', description: 'Search Certificate Transparency logs to discover all certificates issued for a domain', icon: 'certificate', + featured: true, keywords: [ 'ct', 'certificate', diff --git a/src/lib/stores/toolUsage.ts b/src/lib/stores/toolUsage.ts index 49772d4..591fe4e 100644 --- a/src/lib/stores/toolUsage.ts +++ b/src/lib/stores/toolUsage.ts @@ -14,7 +14,7 @@ export interface ToolUsage { const STORAGE_KEY = 'networking-toolbox-tool-usage'; const thresholdVisits = 4; -const maxItems = 6; +const maxItems = 12; function createToolUsageStore() { const { subscribe, set, update } = writable({}); diff --git a/src/routes/search/+page.svelte b/src/routes/search/+page.svelte new file mode 100644 index 0000000..41117db --- /dev/null +++ b/src/routes/search/+page.svelte @@ -0,0 +1,5 @@ + + +