Fixes and improvments to nav, card collection and sitemap page

This commit is contained in:
Alicia Sykes committed 2025-10-06 07:01:21 +01:00
1 parent c53708b8f4
commit dc9006da63
5 files changed
+58 -21

No files matched your search

+21 -16
View File
@@ -81,22 +81,27 @@
switch ($navbarDisplay) {
case 'bookmarked':
items = $bookmarks.map((bookmark) => ({
href: bookmark.href,
label: bookmark.label,
icon: bookmark.icon,
description: bookmark.description,
}));
items = $bookmarks
.filter((bookmark) => bookmark.label)
.map((bookmark) => ({
href: bookmark.href,
label: bookmark.label,
icon: bookmark.icon,
description: bookmark.description,
}));
// Show most recent bookmarks first
return items.reverse();
case 'frequent':
items = $frequentlyUsedTools.slice(0, 8).map((tool) => ({
href: tool.href,
label: tool.label || 'Untitled Tool',
icon: tool.icon,
description: tool.description,
}));
items = $frequentlyUsedTools
.filter((tool) => tool.label)
.slice(0, 8)
.map((tool) => ({
href: tool.href,
label: tool.label || 'Untitled Tool',
icon: tool.icon,
description: tool.description,
}));
// Already sorted by frequency, no need to reverse
return items;
@@ -106,7 +111,7 @@
case 'default':
default:
// Keep default navigation items in their original order
return TOP_NAV;
return TOP_NAV.filter((item) => item.label);
}
})();
@@ -158,8 +163,8 @@
<div class="primary-dropdown">
<div class="primary-content">
{#each getSubPages(item.href) as subItem ('href' in subItem ? subItem.href : subItem.title)}
{#if 'href' in subItem}
<!-- Direct nav item -->
{#if 'href' in subItem && subItem.label}
<!-- Direct nav item with label -->
<a
href={subItem.href}
class="dropdown-link {isActive(currentPath, subItem.href) ? 'active' : ''}"
@@ -214,7 +219,7 @@
on:mouseleave={hideSubDropdown}
>
<div class="secondary-content">
{#each subItem.items as groupItem (groupItem.href)}
{#each subItem.items.filter((i) => i.label) as groupItem (groupItem.href)}
<a
href={groupItem.href}
class="dropdown-link {isActive(currentPath, groupItem.href) ? 'active' : ''}"
+4 -1
View File
@@ -9,7 +9,10 @@
export let idPrefix: string = 'main-';
// Remove duplicates based on href, keeping the first occurrence
$: uniqueTools = tools.filter((tool, index, array) => array.findIndex((t) => t.href === tool.href) === index);
// Also filter out items without a label
$: uniqueTools = tools
.filter((tool) => tool.label)
.filter((tool, index, array) => array.findIndex((t) => t.href === tool.href) === index);
</script>
{#if uniqueTools.length === 0 && searchQuery}
+9
View File
@@ -239,5 +239,14 @@ export const iconMap: Record<string, string> = {
cookie: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M128.9 311.2L143.4 394C145.5 406.1 151.4 417.2 160.2 425.7L220.5 484.1C229.3 492.6 240.5 498.1 252.5 499.8L335.5 511.5C347.5 513.2 359.8 511 370.6 505.3L444.6 465.8C455.3 460 464 451 469.4 440L506.1 364.5C508.3 360 509.8 355.4 510.8 350.6C459.8 333.1 419.4 292.9 401.7 241.9C345.6 226.7 300.7 184.4 281.7 130C277.4 131.1 273.3 132.8 269.3 134.9L195.3 174.4C184.7 180 176 189 170.6 200L133.9 275.6C128.5 286.6 126.8 299.1 128.9 311.2zM272 400C272 417.7 257.7 432 240 432C222.3 432 208 417.7 208 400C208 382.3 222.3 368 240 368C257.7 368 272 382.3 272 400zM304 240C304 257.7 289.7 272 272 272C254.3 272 240 257.7 240 240C240 222.3 254.3 208 272 208C289.7 208 304 222.3 304 240zM432 368C432 385.7 417.7 400 400 400C382.3 400 368 385.7 368 368C368 350.3 382.3 336 400 336C417.7 336 432 350.3 432 368z"/><path d="M245.9 547.3C223.8 544.2 203.2 534.1 187.2 518.6L126.8 460.2C110.8 444.6 100 424.3 96.2 402.3L81.6 319.5C77.7 297.4 80.9 274.7 90.7 254.6L127.4 179C137.2 158.9 153.1 142.4 172.8 131.8L246.8 92.3C266.5 81.8 289.1 77.8 311.2 80.9C316.6 81.7 320.7 86.1 321.5 91.5C329.9 146.2 373 189.6 427.7 198.3C435.4 199.5 441.6 205.4 443.4 212.9C455 263.2 496.3 302.1 547.9 310.3C553.2 311.1 557.6 315.1 558.5 320.4C562.4 342.5 559.2 365.2 549.4 385.3L512.6 461C502.8 481.1 486.9 497.6 467.2 508.2L393.2 547.7C373.5 558.2 350.9 562.2 328.8 559.1L245.8 547.4zM269.4 134.8L195.4 174.3C184.7 180 176 189 170.6 200L133.9 275.6C128.5 286.6 126.8 299.1 128.9 311.2L143.4 394C145.5 406.1 151.4 417.2 160.2 425.7L220.5 484.1C229.3 492.6 240.5 498.1 252.5 499.8L335.5 511.5C347.5 513.2 359.8 511 370.6 505.3L444.6 465.8C455.3 460 464 451 469.4 440L506.1 364.5C508.3 360 509.8 355.4 510.8 350.6C459.8 333.1 419.4 292.9 401.7 241.9C345.6 226.7 300.7 184.4 281.7 130C277.4 131.1 273.3 132.8 269.3 134.9zM272 208C289.7 208 304 222.3 304 240C304 257.7 289.7 272 272 272C254.3 272 240 257.7 240 240C240 222.3 254.3 208 272 208zM240 368C257.7 368 272 382.3 272 400C272 417.7 257.7 432 240 432C222.3 432 208 417.7 208 400C208 382.3 222.3 368 240 368zM368 368C368 350.3 382.3 336 400 336C417.7 336 432 350.3 432 368C432 385.7 417.7 400 400 400C382.3 400 368 385.7 368 368z"/></svg>`,
archive: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 144L112 208L528 208L528 144L112 144zM144 256L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 256L144 256zM224 328C224 314.7 234.7 304 248 304L392 304C405.3 304 416 314.7 416 328C416 341.3 405.3 352 392 352L248 352C234.7 352 224 341.3 224 328z"/><path d="M528 144L528 208L112 208L112 144L528 144zM64 208C64 228.9 77.4 246.7 96 253.3L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 253.3C562.6 246.7 576 228.9 576 208L576 144C576 117.5 554.5 96 528 96L112 96C85.5 96 64 117.5 64 144L64 208zM144 480L144 256L496 256L496 480C496 488.8 488.8 496 480 496L160 496C151.2 496 144 488.8 144 480zM248 304C234.7 304 224 314.7 224 328C224 341.3 234.7 352 248 352L392 352C405.3 352 416 341.3 416 328C416 314.7 405.3 304 392 304L248 304z"/></svg>`,
compress: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M164.4 240L240.5 240L240.5 163.9L164.4 240zM164.4 400L240.5 476.1L240.5 400L164.4 400zM400.5 163.9L400.5 240L476.6 240L400.5 163.9zM400.5 400L400.5 476.1L476.6 400L400.5 400z"/><path d="M71.5 71C62.1 80.4 62.1 95.6 71.5 104.9L151.5 184.9L105.8 230.6C99.8 236.6 96.4 244.7 96.4 253.2L96.4 255.9C96.4 273.6 110.7 287.9 128.4 287.9L256.4 287.9C274.1 287.9 288.4 273.6 288.4 255.9L288.4 127.9C288.4 110.2 274.1 95.9 256.4 95.9L253.7 95.9C245.2 95.9 237.1 99.3 231.1 105.3L185.5 151L105.5 71C96.1 61.7 80.9 61.7 71.5 71zM569.5 105C578.9 95.6 578.9 80.4 569.5 71.1C560.1 61.8 544.9 61.7 535.6 71.1L455.6 151.1L409.9 105.4C403.9 99.4 395.8 96 387.3 96L384.6 96C366.9 96 352.6 110.3 352.6 128L352.6 256C352.6 273.7 366.9 288 384.6 288L512.6 288C530.3 288 544.6 273.7 544.6 256L544.6 253.3C544.6 244.8 541.2 236.7 535.2 230.7L489.5 185L569.5 105zM569.5 535.1L489.5 455.1L535.2 409.4C541.2 403.4 544.6 395.3 544.6 386.8L544.6 384.1C544.6 366.4 530.3 352.1 512.6 352.1L384.6 352.1C366.9 352.1 352.6 366.4 352.6 384.1L352.6 512.1C352.6 529.8 366.9 544.1 384.6 544.1L387.3 544.1C395.8 544.1 403.9 540.7 409.9 534.7L455.6 489L535.6 569C545 578.4 560.2 578.4 569.5 569C578.8 559.6 578.9 544.4 569.5 535.1zM71.5 535C62.1 544.4 62.1 559.6 71.5 568.9C80.9 578.2 96.1 578.3 105.4 568.9L185.4 488.9L231.1 534.6C237.1 540.6 245.2 544 253.7 544L256.4 544C274.1 544 288.4 529.7 288.4 512L288.4 384C288.4 366.3 274.1 352 256.4 352L128.4 352C110.7 352 96.4 366.3 96.4 384L96.4 386.7C96.4 395.2 99.8 403.3 105.8 409.3L151.5 455L71.5 535zM476.6 240L400.5 240L400.5 163.9L476.6 240zM400.5 476.1L400.5 400L476.6 400L400.5 476.1zM164.4 240L240.5 163.9L240.5 240L164.4 240zM240.5 476.1L164.4 400L240.5 400L240.5 476.1z"/></svg>`,
'ref-common-subnets': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M400 144L400 208L464 208L464 144L400 144zM400 368L400 496L528 496L528 368L400 368z"/><path d="M400 208L400 144L464 144L464 208L400 208zM352 208C352 234.5 373.5 256 400 256L464 256C490.5 256 512 234.5 512 208L512 144C512 117.5 490.5 96 464 96L400 96C373.5 96 352 117.5 352 144L352 208zM400 496L400 368L528 368L528 496L400 496zM352 496C352 522.5 373.5 544 400 544L528 544C554.5 544 576 522.5 576 496L576 368C576 341.5 554.5 320 528 320L400 320C373.5 320 352 341.5 352 368L352 496zM209 103C199.6 93.6 184.4 93.6 175.1 103L87 191C77.6 200.4 77.6 215.6 87 224.9C96.4 234.2 111.6 234.3 120.9 224.9L167.9 177.9L167.9 520C167.9 533.3 178.6 544 191.9 544C205.2 544 215.9 533.3 215.9 520L215.9 177.9L262.9 224.9C272.3 234.3 287.5 234.3 296.8 224.9C306.1 215.5 306.2 200.3 296.8 191L209 103z"/></svg>`,
'ref-network-classes': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M297.5 449L209.5 537C200.1 546.4 184.9 546.4 175.6 537L87.6 449C78.2 439.6 78.2 424.4 87.6 415.1C97 405.8 112.2 405.7 121.5 415.1L168.5 462.1L168.5 120C168.5 106.7 179.2 96 192.5 96C205.8 96 216.5 106.7 216.5 120L216.5 462.1L263.5 415.1C272.9 405.7 288.1 405.7 297.4 415.1C306.7 424.5 306.8 439.7 297.4 449zM470 109.3L550 269.3C555.9 281.2 551.1 295.6 539.3 301.5C527.5 307.4 513 302.6 507 290.7L493.4 263.5C491.8 263.8 490.2 264 488.5 264L403.3 264L389.9 290.7C384 302.6 369.6 307.4 357.7 301.4C345.8 295.4 341 281.1 347 269.2L427 109.2C431.1 101.1 439.4 95.9 448.5 95.9C457.6 95.9 465.9 101 470 109.2zM448.5 173.7L427.3 216L469.6 216L448.4 173.7zM352.5 376C352.5 362.7 363.2 352 376.5 352L520.5 352C530.2 352 539 357.8 542.7 366.8C546.4 375.8 544.4 386.1 537.5 393L434.5 496L520.6 496C533.9 496 544.6 506.7 544.6 520C544.6 533.3 533.9 544 520.6 544L376.6 544C366.9 544 358.1 538.2 354.4 529.2C350.7 520.2 352.7 509.9 359.6 503L462.6 400L376.5 400C363.2 400 352.5 389.3 352.5 376z"/></svg>`,
'ref-reserved-ranges': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M136.9 224L288.5 124.7L302.1 133.6C293.3 154 288.5 176.4 288.5 200C288.5 208.1 289.1 216.2 290.2 224L136.9 224zM144.5 272L208.5 272L208.5 432L144.5 432L144.5 272zM256.5 272L304.7 272C309.2 281.4 314.5 290.3 320.5 298.7L320.5 432L256.5 432L256.5 272zM368.5 343.1C387.6 354.9 409.3 362.9 432.5 366.3L432.5 432L368.5 432L368.5 343.1z"/><path d="M301.7 75.9L327.3 92.7C317 105 308.5 118.7 302.1 133.6L288.5 124.7L136.9 224L290.2 224C292.6 240.9 297.6 257.1 304.7 272L256.5 272L256.5 432L320.5 432L320.5 298.7C333.4 316.5 349.7 331.6 368.5 343.2L368.5 432.1L432.5 432.1L432.5 366.4C440.3 367.5 448.3 368.1 456.5 368.1C464.7 368.1 472.7 367.5 480.5 366.4L480.5 432.1L488.5 432.1C501.8 432.1 512.5 442.8 512.5 456.1C512.5 469.4 501.8 480.1 488.5 480.1L88.5 480.1C75.2 480.1 64.5 469.4 64.5 456.1C64.5 442.8 75.2 432.1 88.5 432.1L96.5 432.1L96.5 272.1L56.5 272.1C45.9 272.1 36.5 265.1 33.5 255C30.5 244.9 34.5 233.9 43.3 228.1L275.3 76.1C283.3 70.9 293.6 70.9 301.6 76.1zM144.5 432L208.5 432L208.5 272L144.5 272L144.5 432zM56.5 528L520.5 528C533.8 528 544.5 538.7 544.5 552C544.5 565.3 533.8 576 520.5 576L56.5 576C43.2 576 32.5 565.3 32.5 552C32.5 538.7 43.2 528 56.5 528zM456.5 272C496.3 272 528.5 239.8 528.5 200C528.5 160.2 496.3 128 456.5 128C416.7 128 384.5 160.2 384.5 200C384.5 239.8 416.7 272 456.5 272zM456.5 320C390.2 320 336.5 266.3 336.5 200C336.5 133.7 390.2 80 456.5 80C522.8 80 576.5 133.7 576.5 200C576.5 224.5 569.2 247.3 556.6 266.3L617.5 327.2C626.9 336.6 626.9 351.8 617.5 361.1C608.1 370.4 592.9 370.5 583.6 361.1L522.7 300.2C503.7 312.7 481 320 456.6 320z"/></svg>`,
'terminal': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144 160L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 160C496 151.2 488.8 144 480 144L160 144C151.2 144 144 151.2 144 160zM199 223C208.4 213.6 223.6 213.6 232.9 223L312.9 303C322.3 312.4 322.3 327.6 312.9 336.9L232.9 416.9C223.5 426.3 208.3 426.3 199 416.9C189.7 407.5 189.6 392.3 199 383L262 320L199 257C189.6 247.6 189.6 232.4 199 223.1zM288 424C288 410.7 298.7 400 312 400L424 400C437.3 400 448 410.7 448 424C448 437.3 437.3 448 424 448L312 448C298.7 448 288 437.3 288 424z"/><path d="M480 144C488.8 144 496 151.2 496 160L496 480C496 488.8 488.8 496 480 496L160 496C151.2 496 144 488.8 144 480L144 160C144 151.2 151.2 144 160 144L480 144zM160 96C124.7 96 96 124.7 96 160L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 160C544 124.7 515.3 96 480 96L160 96zM199 223C189.6 232.4 189.6 247.6 199 256.9L262 319.9L199 382.9C189.6 392.3 189.6 407.5 199 416.8C208.4 426.1 223.6 426.2 232.9 416.8L312.9 336.8C322.3 327.4 322.3 312.2 312.9 302.9L232.9 222.9C223.5 213.5 208.3 213.5 199 222.9zM312 400C298.7 400 288 410.7 288 424C288 437.3 298.7 448 312 448L424 448C437.3 448 448 437.3 448 424C448 410.7 437.3 400 424 400L312 400z"/></svg>`,
'file-x': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M176 128L176 142.2L464 430.2L464 272L376 272C336.2 272 304 239.8 304 200L304 112L192 112C183.2 112 176 119.2 176 128z"/><path d="M73 39.1C63.6 29.7 48.4 29.7 39.1 39.1C29.8 48.5 29.7 63.7 39 73.1L567 601.1C576.4 610.5 591.6 610.5 600.9 601.1C610.2 591.7 610.3 576.5 600.9 567.2L511.9 478.2L511.9 250.6C511.9 233.6 505.2 217.3 493.2 205.3L370.7 82.7C358.7 70.7 342.5 64 325.5 64L192 64C166.5 64 144.6 78.9 134.2 100.4L73 39.1zM176 142.1L176 128C176 119.2 183.2 112 192 112L304 112L304 200C304 239.8 336.2 272 376 272L464 272L464 430.2L176 142.2zM176 512L176 277.8L128 229.8L128 512C128 547.3 156.7 576 192 576L448 576C455.8 576 463.3 574.6 470.2 572L426.2 528L192 528C183.2 528 176 520.8 176 512zM444.1 224L376 224C362.7 224 352 213.3 352 200L352 131.9L444.1 224z"/></svg>`,
'folder': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 160L112 448C112 456.8 119.2 464 128 464L512 464C520.8 464 528 456.8 528 448L528 208C528 199.2 520.8 192 512 192L362.7 192C345.4 192 328.5 186.4 314.7 176L276.3 147.2C273.5 145.1 270.2 144 266.7 144L128 144C119.2 144 112 151.2 112 160z"/><path d="M128 464L512 464C520.8 464 528 456.8 528 448L528 208C528 199.2 520.8 192 512 192L362.7 192C345.4 192 328.5 186.4 314.7 176L276.3 147.2C273.5 145.1 270.2 144 266.7 144L128 144C119.2 144 112 151.2 112 160L112 448C112 456.8 119.2 464 128 464zM512 512L128 512C92.7 512 64 483.3 64 448L64 160C64 124.7 92.7 96 128 96L266.7 96C280.5 96 294 100.5 305.1 108.8L343.5 137.6C349 141.8 355.8 144 362.7 144L512 144C547.3 144 576 172.7 576 208L576 448C576 483.3 547.3 512 512 512z"/></svg>`,
'package': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M128 240.8L128 410.4C128 424.9 135.9 438.3 148.6 445.4L296 527.3L296 334.2L128 240.9zM146.2 196L320 292.5L367 266.4L194.3 169.3L146.2 196zM274.8 124.6L447.5 221.7L493.8 196L339.4 110.2C327.3 103.5 312.6 103.5 300.5 110.2L274.8 124.6zM344 334.1L344 527.2L491.4 445.3C504.1 438.2 512 424.9 512 410.3L512 240.7L480 258.5L480 352.7C480 364.3 473.8 374.9 463.7 380.6L423.9 403C413.2 409 400.1 401.3 400.1 389.1L400.1 303L344.1 334.1z"/><path d="M296 527.2L148.6 445.3C135.9 438.2 128 424.9 128 410.3L128 240.7L296 334L296 527.1zM367 266.4L320 292.5L146.2 196L194.3 169.3L367 266.4zM274.8 124.6L300.6 110.3C312.7 103.6 327.4 103.6 339.5 110.3L493.9 196.1L447.6 221.8L274.9 124.7zM400 303L400 389.1C400 401.3 413.2 409 423.8 403L463.6 380.6C473.7 374.9 479.9 364.3 479.9 352.7L479.9 258.5L511.9 240.7L511.9 410.3C511.9 424.8 504 438.2 491.3 445.3L344 527.2L344 334.1L400 303zM277.2 571.7C303.8 586.5 336.1 586.5 362.7 571.7L514.7 487.3C542.6 471.8 560 442.3 560 410.4L560 225C560 195.9 544.2 169.2 518.8 155.1L362.7 68.3C336.1 53.5 303.8 53.5 277.2 68.3L121.1 155C95.8 169.1 80 195.9 80 224.9L80 410.3C80 442.3 97.3 471.7 125.3 487.2L277.3 571.6z"/></svg>`,
'tag': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M128.1 152C128.1 138.7 138.8 128 152.1 128L308.2 128C314.6 128 320.7 130.5 325.2 135L533.2 343C539.1 348.9 541.3 357.1 539.8 364.7C538.3 368.8 535.9 372.7 532.6 376L452.9 457.2L377 533.1C367.6 542.5 352.4 542.5 343.1 533.1L135.1 325.1C130.6 320.6 128.1 314.5 128.1 308.1L128.1 152zM176.1 208C176.1 225.7 190.4 240 208.1 240C225.8 240 240.1 225.7 240.1 208C240.1 190.3 225.8 176 208.1 176C190.4 176 176.1 190.3 176.1 208z"/><path d="M128.1 152C128.1 138.7 138.8 128 152.1 128L308.2 128C314.6 128 320.7 130.5 325.2 135L533.2 343C542.6 352.4 542.6 367.6 533.2 376.9L377.1 533.1C367.7 542.5 352.5 542.5 343.2 533.1L135.2 325.1C130.7 320.6 128.2 314.5 128.2 308.1L128.1 152zM152.1 80C112.3 80 80.1 112.2 80.1 152L80.1 308.1C80.1 327.2 87.7 345.5 101.2 359L309.2 567C337.3 595.1 382.9 595.1 411 567L567.1 410.9C595.2 382.8 595.2 337.2 567.1 309.1L359.1 101.1C345.6 87.6 327.3 80 308.2 80L152.1 80zM208.1 240C225.8 240 240.1 225.7 240.1 208C240.1 190.3 225.8 176 208.1 176C190.4 176 176.1 190.3 176.1 208C176.1 225.7 190.4 240 208.1 240z"/></svg>`,
'monitor': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 160L112 336L528 336L528 160C528 151.2 520.8 144 512 144L128 144C119.2 144 112 151.2 112 160zM284.3 528L355.6 528L347.6 480L292.3 480L284.3 528z"/><path d="M512 144C520.8 144 528 151.2 528 160L528 336L112 336L112 160C112 151.2 119.2 144 128 144L512 144zM528 384L528 416C528 424.8 520.8 432 512 432L128 432C119.2 432 112 424.8 112 416L112 384L528 384zM128 96C92.7 96 64 124.7 64 160L64 416C64 451.3 92.7 480 128 480L243.7 480L235.7 528L184 528C170.7 528 160 538.7 160 552C160 565.3 170.7 576 184 576L456 576C469.3 576 480 565.3 480 552C480 538.7 469.3 528 456 528L404.3 528L396.3 480L512 480C547.3 480 576 451.3 576 416L576 160C576 124.7 547.3 96 512 96L128 96zM284.3 528L292.3 480L347.6 480L355.6 528L284.3 528z"/></svg>`,
// '': ``,
};
+10 -3
View File
@@ -1271,6 +1271,13 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
icon: 'tls-cipher-presets',
keywords: ['tls', 'cipher', 'presets', 'modern', 'intermediate', 'legacy', 'security', 'suites', 'probe'],
},
{
href: makePath('/diagnostics/tls/banner'),
label: 'Service Banner Grabber',
description: 'Retrieve service banners from SSH, SMTP, HTTP, FTP, and other network services',
icon: 'terminal',
keywords: ['banner', 'service', 'ssh', 'smtp', 'ftp', 'http', 'telnet', 'fingerprinting', 'reconnaissance'],
},
],
},
{
@@ -1903,10 +1910,10 @@ function extractAllNavItems(navStructure: (NavItem | NavGroup)[]): NavItem[] {
for (const item of navStructure) {
if ('items' in item) {
// It's a NavGroup (might have href too, but we only want its items)
items.push(...item.items);
// It's a NavGroup - recursively extract items from its children
items.push(...extractAllNavItems(item.items));
} else if ('href' in item && 'label' in item) {
// It's a NavItem (has href and label)
// It's a NavItem (has href and label, but no items)
items.push(item as NavItem);
}
}
+14 -1
View File
@@ -1,11 +1,13 @@
<script lang="ts">
import { TOP_NAV, aboutPages, SUB_NAV, STANDALONE_PAGES, type NavItem, type NavGroup } from '$lib/constants/nav';
import { resolve } from '$app/paths';
import Icon from '$lib/components/global/Icon.svelte';
interface TreeNode {
label: string;
href: string | null;
description?: string;
icon?: string;
children: TreeNode[];
}
@@ -13,6 +15,7 @@
label: 'label' in item ? item.label : item.title,
href: 'href' in item ? item.href : null,
description: item.description,
icon: 'icon' in item ? item.icon : undefined,
children: [],
});
@@ -64,6 +67,7 @@
{@const title = node.description || node.label}
{@const ariaLabel = node.description ? `${node.label}: ${node.description}` : node.label}
{#if node.href}
{#if node.icon} <Icon name={node.icon} size="xs" /> {/if}
<a href={node.href} {title} aria-label={ariaLabel}>{node.label}</a>
{:else}
<span class={node.children.length ? 'section-title' : 'group-title'} {title} aria-label={ariaLabel}>
@@ -154,6 +158,15 @@
li {
margin: var(--spacing-xs) 0;
padding-left: var(--spacing-sm);
:global(.icon) {
opacity: 0.75;
transition: all ease-in-out 0.2s;
}
&:hover > :global(.icon) {
opacity: 1;
transform: scale(1.1);
}
}
}
}
@@ -161,7 +174,7 @@
a {
color: var(--color-link);
text-decoration: none;
padding: 0 var(--spacing-sm);
// padding: 0 var(--spacing-sm);
display: inline-block;
transition: all 0.2s;
border-radius: var(--radius-sm);