From 4b1557888e6026765d5eaa9a278151119d398adc Mon Sep 17 00:00:00 2001 From: Aleksei Fedorov Date: Sat, 6 Sep 2025 14:08:37 +0000 Subject: [PATCH] feat: optimize CSS structure and add missing definitions - Remove unused CSS classes (.pulse, @keyframes pulse) - Add missing CSS definitions for JavaScript-used classes: * Connection styles: .connection-box, .connection-text, .connection-details * Syscall styles: .syscall-box, .syscall-text * File label styles: .file-label, .file-label-bg * Tooltip styles: .tooltip * Bezier curve styles: .bezier-curve, .file-endpoint * Semicircle menu styles: .semicircle-menu, .menu-item, .menu-icon, .individual-menu-bar, .individual-menu-label - Improve responsive design with media queries for new classes - Ensure consistent font usage across all components - Organize CSS by functionality for better maintainability --- static/css/main.css | 132 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 123 insertions(+), 9 deletions(-) diff --git a/static/css/main.css b/static/css/main.css index af3c417..1d6a947 100755 --- a/static/css/main.css +++ b/static/css/main.css @@ -79,24 +79,138 @@ svg { stroke-width: 0.7; } -/* Animations */ -@keyframes pulse { - 0% { opacity: 0.6; } - 50% { opacity: 1; } - 100% { opacity: 0.6; } +/* Connection styles */ +.connection-box { + fill: rgba(255, 255, 255, 0.04); + stroke: #aaa; + stroke-width: 0.5; + rx: 4; +} + +.connection-text { + font-size: 12px; + fill: #444; + font-family: 'Share Tech Mono', monospace; +} + +.connection-details { + font-size: 10px; + fill: #666; + font-family: 'Share Tech Mono', monospace; +} + +/* Syscall styles */ +.syscall-box { + fill: rgba(255, 255, 255, 0.04); + stroke: #aaa; + stroke-width: 0.5; +} + +.syscall-text { + font-size: 12px; + fill: #444; + font-family: 'Share Tech Mono', monospace; +} + +/* File label styles */ +.file-label { + font-size: 11px; + fill: #333; + font-family: 'Share Tech Mono', monospace; + text-anchor: start; +} + +.file-label-bg { + fill: rgba(255, 255, 255, 0.8); + stroke: #ccc; + stroke-width: 0.5; + rx: 2; +} + +/* Tooltip styles */ +.tooltip { + position: absolute; + background: rgba(0, 0, 0, 0.9); + color: white; + padding: 8px; + border-radius: 4px; + font-size: 12px; + pointer-events: none; + z-index: 1000; + max-width: 300px; +} + +/* Bezier curve styles */ +.bezier-curve { + fill: none; + stroke: rgba(100, 100, 100, 0.2); + stroke-width: 0.7; } -.pulse { - animation: pulse 2s infinite; +.file-endpoint { + fill: #555; + stroke: #222; + stroke-width: 0.5; +} + +/* Semicircle menu styles */ +.semicircle-menu { + fill: rgba(255, 255, 255, 0.04); + stroke: #aaa; + stroke-width: 0.5; +} + +.menu-item { + fill: rgba(255, 255, 255, 0.04); + stroke: #aaa; + stroke-width: 0.5; + cursor: pointer; +} + +.menu-item:hover { + fill: rgba(255, 255, 255, 0.08); +} + +.menu-icon { + fill: #444; + font-family: 'Share Tech Mono', monospace; + font-size: 12px; + text-anchor: middle; + dominant-baseline: central; +} + +.individual-menu-bar { + fill: rgba(255, 255, 255, 0.04); + stroke: #aaa; + stroke-width: 0.5; +} + +.individual-menu-label { + fill: #444; + font-family: 'Share Tech Mono', monospace; + font-size: 11px; + text-anchor: start; + dominant-baseline: central; } +/* Animations - removed unused pulse animation */ + /* Responsiveness */ @media (max-width: 768px) { - .socket-text { + .socket-text, .connection-text, .syscall-text { + font-size: 10px; + } + + .feature-text, .connection-details { + font-size: 9px; + } + + .file-label, .menu-icon, .individual-menu-label { font-size: 10px; } - .feature-text { + .tooltip { font-size: 10px; + max-width: 250px; } }