mirror of
https://github.com/lockfale/OSINT-Framework.git
synced 2026-08-25 15:22:25 +02:00
Adds a debounced text search input above the D3 tree that filters all ~1,000+ tool nodes by name and description. Results appear as a flat list with breadcrumb paths; clearing the input hides the panel. - No build step required: vanilla JS, no new dependencies - Sanitizes HTML output (escapeHtml/escapeAttr) and validates URLs (http/https only) - Dark and light mode compatible via existing CSS variables - Results capped at 50 to keep rendering fast Co-Authored-By: Paperclip <noreply@paperclip.ing>
180 lines
3.4 KiB
CSS
180 lines
3.4 KiB
CSS
/* === Color tokens === */
|
|
:root {
|
|
--color-bg: #1a1a1a;
|
|
--color-surface: #2d2d2d;
|
|
--color-text-primary: #e0e0e0;
|
|
--color-text-secondary: #999;
|
|
--color-node-stroke: steelblue;
|
|
--color-node-fill-branch: #3a3a3a;
|
|
--color-node-fill-leaf: #1a1a1a;
|
|
--color-link: #555;
|
|
--color-noscript-bg: #2a1a00;
|
|
--color-noscript-border: #7a4a00;
|
|
--color-legend: #e0e0e0;
|
|
--color-header: #e0e0e0;
|
|
}
|
|
|
|
body.light-mode {
|
|
--color-bg: #ffffff;
|
|
--color-surface: #f5f5f5;
|
|
--color-text-primary: #000000;
|
|
--color-text-secondary: #767676;
|
|
--color-node-stroke: steelblue;
|
|
--color-node-fill-branch: lightsteelblue;
|
|
--color-node-fill-leaf: #ffffff;
|
|
--color-link: #ccc;
|
|
--color-noscript-bg: rgb(255, 228, 196);
|
|
--color-noscript-border: rgb(255, 204, 153);
|
|
--color-legend: #000000;
|
|
--color-header: #000000;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--color-bg);
|
|
color: var(--color-text-primary);
|
|
font-size: 14px;
|
|
font-family: "Helvetica Neue", Helvetica;
|
|
}
|
|
|
|
noscript p {
|
|
text-align: center;
|
|
background-color: var(--color-noscript-bg);
|
|
color: var(--color-text-primary);
|
|
margin: 0 auto;
|
|
width: 80vw;
|
|
padding: 25px 0;
|
|
margin-top: 80px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--color-noscript-border);
|
|
margin-bottom: 20px;
|
|
display: flex-wrap;
|
|
}
|
|
|
|
#body {
|
|
margin: 0 auto;
|
|
position: relative;
|
|
}
|
|
|
|
#header {
|
|
font-size: 40px;
|
|
font-weight: bold;
|
|
top: 20px;
|
|
text-align: center;
|
|
color: var(--color-header);
|
|
}
|
|
|
|
.legend {
|
|
position: absolute;
|
|
top: 0px;
|
|
right: 0;
|
|
width: 330px;
|
|
font-size: 11px;
|
|
color: var(--color-legend);
|
|
}
|
|
|
|
.legend a {
|
|
color: var(--color-node-stroke);
|
|
}
|
|
|
|
.node {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.node circle {
|
|
cursor: pointer;
|
|
fill: var(--color-node-fill-leaf);
|
|
stroke: var(--color-node-stroke);
|
|
stroke-width: 1.5px;
|
|
}
|
|
|
|
.node text {
|
|
font-size: 12px;
|
|
fill: var(--color-text-primary);
|
|
}
|
|
|
|
path.link {
|
|
fill: none;
|
|
stroke: var(--color-link);
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
h3 {
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
a {
|
|
color: var(--color-node-stroke);
|
|
}
|
|
|
|
/* Search */
|
|
#search-container {
|
|
text-align: center;
|
|
padding: 8px 0 4px;
|
|
}
|
|
|
|
#search-input {
|
|
width: 400px;
|
|
max-width: 90vw;
|
|
padding: 8px 12px;
|
|
font-size: 14px;
|
|
font-family: "Helvetica Neue", Helvetica;
|
|
background: var(--color-surface);
|
|
color: var(--color-text-primary);
|
|
border: 1px solid var(--color-link);
|
|
border-radius: 4px;
|
|
outline: none;
|
|
}
|
|
|
|
#search-input:focus {
|
|
border-color: var(--color-node-stroke);
|
|
}
|
|
|
|
#search-results {
|
|
margin: 8px auto 0;
|
|
width: 600px;
|
|
max-width: 90vw;
|
|
text-align: left;
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-link);
|
|
border-radius: 4px;
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
display: none;
|
|
}
|
|
|
|
#search-results.visible {
|
|
display: block;
|
|
}
|
|
|
|
.search-result-item {
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--color-link);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.search-result-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.search-result-item a {
|
|
font-weight: bold;
|
|
color: var(--color-node-stroke);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.search-result-item a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.search-result-path {
|
|
color: var(--color-text-secondary);
|
|
font-size: 11px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.search-no-results {
|
|
padding: 12px;
|
|
color: var(--color-text-secondary);
|
|
text-align: center;
|
|
}
|