feat: dropdown descriptions beneath nav items

This commit is contained in:
jae 2026-04-04 04:06:49 +00:00
parent db2c814c38
commit b2153deedc
3 changed files with 53 additions and 19 deletions

View file

@ -6,19 +6,23 @@
"children": [ "children": [
{ {
"label": "OPERATOR PROFILE", "label": "OPERATOR PROFILE",
"url": "/hq/profile" "url": "/hq/profile",
"description": "Personal dossier & credentials"
}, },
{ {
"label": "SITE BRIEFING", "label": "SITE BRIEFING",
"url": "/hq/briefing" "url": "/hq/briefing",
"description": "Mission overview & site intel"
}, },
{ {
"label": "TELEMETRY", "label": "TELEMETRY",
"url": "/hq/telemetry" "url": "/hq/telemetry",
"description": "System metrics & performance data"
}, },
{ {
"label": "MAINTENANCE LOG", "label": "MAINTENANCE LOG",
"url": "/hq/logs" "url": "/hq/logs",
"description": "Operational logs & diagnostics"
} }
] ]
}, },
@ -29,15 +33,18 @@
"children": [ "children": [
{ {
"label": "DISPATCHES", "label": "DISPATCHES",
"url": "/transmissions/dispatches" "url": "/transmissions/dispatches",
"description": "Field reports & updates"
}, },
{ {
"label": "SITREP", "label": "SITREP",
"url": "/transmissions/sitrep" "url": "/transmissions/sitrep",
"description": "Situation reports & status"
}, },
{ {
"label": "RADAR", "label": "RADAR",
"url": "/transmissions/radar" "url": "/transmissions/radar",
"description": "Incoming signals & activity feed"
} }
] ]
}, },
@ -48,19 +55,23 @@
"children": [ "children": [
{ {
"label": "DEPLOYMENTS", "label": "DEPLOYMENTS",
"url": "/armoury/deployments" "url": "/armoury/deployments",
"description": "Active projects & builds"
}, },
{ {
"label": "LAB", "label": "LAB",
"url": "/armoury/lab" "url": "/armoury/lab",
"description": "Experimental prototypes"
}, },
{ {
"label": "FIELD MANUALS", "label": "FIELD MANUALS",
"url": "/armoury/fieldmanuals" "url": "/armoury/fieldmanuals",
"description": "Technical documentation & guides"
}, },
{ {
"label": "DEBRIEF", "label": "DEBRIEF",
"url": "/armoury/debrief" "url": "/armoury/debrief",
"description": "Post-mission analysis & reviews"
} }
] ]
}, },
@ -71,19 +82,23 @@
"children": [ "children": [
{ {
"label": "CONTRABAND", "label": "CONTRABAND",
"url": "/depot/contraband" "url": "/depot/contraband",
"description": "16,000+ free resources catalogued"
}, },
{ {
"label": "PROPAGANDA", "label": "PROPAGANDA",
"url": "/depot/propaganda" "url": "/depot/propaganda",
"description": "Classified documents & briefings"
}, },
{ {
"label": "EXFIL", "label": "EXFIL",
"url": "/depot/exfil" "url": "/depot/exfil",
"description": "Extraction tools & downloads"
}, },
{ {
"label": "RECON", "label": "RECON",
"url": "/depot/recon" "url": "/depot/recon",
"description": "135,000+ curated intel across 28 sectors"
} }
] ]
}, },
@ -94,15 +109,18 @@
"children": [ "children": [
{ {
"label": "OPEN CHANNELS", "label": "OPEN CHANNELS",
"url": "/comms/openchannels" "url": "/comms/openchannels",
"description": "Public communication links"
}, },
{ {
"label": "ENCRYPTED LINE", "label": "ENCRYPTED LINE",
"url": "/comms/encryptedline" "url": "/comms/encryptedline",
"description": "Secure direct contact"
}, },
{ {
"label": "BACKUP RELAY", "label": "BACKUP RELAY",
"url": "/comms/backuprelay" "url": "/comms/backuprelay",
"description": "Alternative contact methods"
} }
] ]
} }

View file

@ -271,6 +271,21 @@ a:hover { color: #fff; text-shadow: none; }
transform: rotate(180deg); transform: rotate(180deg);
} }
.dropdown-desc {
display: block;
font-size: 0.55rem;
color: rgba(255, 255, 255, 0.3);
letter-spacing: 0.5px;
font-family: var(--font-mono);
margin-top: 0.15rem;
text-transform: none;
font-weight: 300;
transition: color 0.2s;
}
.dropdown li a:hover .dropdown-desc {
color: rgba(255, 255, 255, 0.5);
}
.dropdown li a:hover::before { opacity: 1; } .dropdown li a:hover::before { opacity: 1; }
/* Nav Status */ /* Nav Status */

View file

@ -71,7 +71,8 @@
const childIsAnchor = childUrl.startsWith('#') || childUrl.startsWith('/#'); const childIsAnchor = childUrl.startsWith('#') || childUrl.startsWith('/#');
const childHref = childIsAnchor && path !== '/' ? '/' + childUrl.replace(/^\//, '') : childUrl; const childHref = childIsAnchor && path !== '/' ? '/' + childUrl.replace(/^\//, '') : childUrl;
html += `<li><a href="${childHref}" class="dropdown-link${childActiveClass}">${childLabel}</a></li>`; const childDesc = child.description || '';
html += `<li><a href="${childHref}" class="dropdown-link${childActiveClass}">${childLabel}${childDesc ? `<span class="dropdown-desc">${childDesc}</span>` : ''}</a></li>`;
}); });
html += `</ul>`; html += `</ul>`;
} }