From 9211aa6359bd35d34e1604f04e840215df31c0c4 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 10:54:54 +0200 Subject: [PATCH 01/26] feat: add website assets from PR #169 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ultra-granular split for Sourcery compatibility (30k chars < 150k limit): - favicon.ico: Professional website favicon - css/comprehensive-demo.css: Advanced demo styling with CSS variables Part 3/4 of website files from feat/clean-demo-website. Completes the website assets for visual branding and styling. Original work attribution: PR #169 feat/clean-demo-website 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- website/css/comprehensive-demo.css | 1252 ++++++++++++++++++++++++++++ website/favicon.ico | 6 + 2 files changed, 1258 insertions(+) create mode 100644 website/css/comprehensive-demo.css create mode 100644 website/favicon.ico diff --git a/website/css/comprehensive-demo.css b/website/css/comprehensive-demo.css new file mode 100644 index 000000000..3d642f408 --- /dev/null +++ b/website/css/comprehensive-demo.css @@ -0,0 +1,1252 @@ +/* Comprehensive Demo Styles - Extracted from HTML for better maintainability */ + +/* CSS Variables */ +:root { + --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%); + --secondary-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); + --dark-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%); + --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c084fc 100%); + + --primary-color: #8b5cf6; + --secondary-color: #a855f7; + --accent-color: #c084fc; + --dark-color: #0f0f23; + --darker-color: #0a0a1a; + --light-accent: #e9d5ff; + --glass-bg: rgba(139, 92, 246, 0.1); + --glass-border: rgba(139, 92, 246, 0.2); + --error-color: #ef4444; + --success-color: #10b981; + + --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); + --shadow-glow: 0 10px 40px rgba(139, 92, 246, 0.3); + --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3); +} + +/* Material Icons styling */ +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-feature-settings: 'liga'; + -webkit-font-smoothing: antialiased; + vertical-align: middle; +} + +/* Info icon styling */ +.info-icon { + font-size: 16px !important; + color: #6b7280; + margin-left: 6px; + cursor: help; + opacity: 0.7; + transition: var(--transition-smooth); + vertical-align: middle; +} + +.info-icon:hover { + color: var(--primary-color); + opacity: 1; + transform: scale(1.1); +} + +/* Text input styling */ +#textInput { + min-height: 240px !important; + font-size: 16px; + line-height: 1.5; + resize: vertical; +} + +/* Base Styles */ +body.comprehensive-demo { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + line-height: 1.6; + color: #e2e8f0; + background: var(--dark-gradient); + background-attachment: fixed; + min-height: 100vh; + padding-top: 80px; /* Account for fixed navbar */ +} + +/* Result sections */ +.result-section-hidden { + display: none !important; +} + +.result-section-visible { + display: block; + animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1); +} + +/* Ensure all text is visible - scoped to comprehensive demo */ +.comprehensive-demo .text-muted { + color: #cbd5e1 !important; +} + +/* Scoped to demo container only */ +.demo-container .text-dark { + color: #e2e8f0; +} + +/* Feature card text improvements */ +.feature-card .text-muted { + color: #cbd5e1 !important; +} + +.feature-card h5, .feature-card h6 { + color: #f1f5f9 !important; +} + +.feature-card small { + color: #cbd5e1 !important; +} + +/* Scoped form controls to demo container */ +.demo-container .form-control { + color: #e2e8f0; + background-color: rgba(255, 255, 255, 0.1); + border-color: rgba(139, 92, 246, 0.3); +} + +.demo-container .form-control:focus { + color: #e2e8f0; + background-color: rgba(255, 255, 255, 0.15); + border-color: var(--primary-color); + box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25); +} + +.comprehensive-demo .form-control::placeholder { + color: #94a3b8 !important; +} + +/* Hero Section */ +.hero-section::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: + radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%), + radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 50%), + radial-gradient(circle at 40% 80%, rgba(192, 132, 252, 0.2) 0%, transparent 50%); + animation: float 6s ease-in-out infinite; +} + +.hero-content { + position: relative; + z-index: 2; +} + +/* Demo Container - Full Width Professional Design */ +.demo-container { + background: var(--glass-bg); + backdrop-filter: blur(20px); + border: 1px solid var(--glass-border); + border-radius: 20px; + box-shadow: var(--shadow-glass); + padding: 3rem; + margin: 2rem 0; + width: 100%; + position: relative; + z-index: 1; + color: #e2e8f0; +} + +/* Feature Cards */ +.feature-card { + background: var(--glass-bg); + backdrop-filter: blur(15px); + border: 1px solid var(--glass-border); + border-radius: 20px; + box-shadow: var(--shadow-glass); + transition: var(--transition-bounce); + color: #e2e8f0; + height: 100%; +} + +.feature-card:hover { + transform: translateY(-5px) scale(1.02); + box-shadow: var(--shadow-glow); +} + +.feature-card.active { + background: var(--primary-gradient); + border-color: var(--accent-color); + color: white; + transform: translateY(-5px) scale(1.05); + box-shadow: var(--shadow-glow); +} + +/* Navigation */ +.comprehensive-demo .navbar { + background: rgba(15, 15, 35, 0.95); + backdrop-filter: blur(20px); + border-bottom: 1px solid var(--glass-border); +} + +.comprehensive-demo .navbar-brand, .comprehensive-demo .navbar .nav-link { + color: #e2e8f0; +} + +/* Buttons */ +.comprehensive-demo .btn-primary { + background: var(--primary-gradient); + border: none; + border-radius: 12px; + padding: 12px 30px; + font-weight: 600; + transition: var(--transition-bounce); + box-shadow: var(--shadow-glow); +} + +.comprehensive-demo .btn-primary:hover { + transform: translateY(-2px) scale(1.05); + box-shadow: 0 15px 50px rgba(139, 92, 246, 0.4); +} + +.comprehensive-demo .btn:focus-visible { + outline: 3px solid #667eea; + outline-offset: 2px; +} + +/* Form Controls - consolidated with scoped rules above */ + +/* Focus styles consolidated with scoped rules above */ + +.demo-container .form-control::placeholder { + color: #94a3b8; +} + +/* Loading States */ +.loading-spinner { + display: none; + color: #e2e8f0; +} + +.loading-spinner.show { + display: block; +} + +/* Result Sections */ +.result-section { + display: none; +} + +/* Ensure icons are visible in results */ +.feature-card h5 i { + font-size: 1.2rem; + margin-right: 8px; +} + +/* Processing Information Icons */ +.processing-info i { + font-size: 1.5rem !important; + margin-bottom: 8px; +} + +.result-section.show { + display: block; + animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1); +} + +/* Animations */ +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(40px) scale(0.95); + } + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +@keyframes float { + 0%, 100% { transform: translateY(0px) rotate(0deg); } + 33% { transform: translateY(-20px) rotate(1deg); } + 66% { transform: translateY(-10px) rotate(-1deg); } +} + +.floating-card { + animation: float 6s ease-in-out infinite; +} + +/* Text Effects */ +.gradient-text { + background: var(--primary-gradient); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +/* Emotion Badges */ +.emotion-badge { + display: block; + padding: 8px 16px; + margin: 4px 0; + border-radius: 20px; + font-size: 0.9rem; + font-weight: 500; + transition: var(--transition-smooth); + text-align: center; + width: 100%; + box-sizing: border-box; +} + +.emotion-badge:hover { + transform: scale(1.05); +} + +/* Emotion Badges Container */ +#emotionBadges { + display: flex; + flex-direction: column; + gap: 8px; + margin-bottom: 20px; +} + +/* Audio Visualizer */ +.audio-visualizer { + width: 100%; + height: 60px; + background: var(--glass-bg); + border-radius: 10px; + display: flex; + align-items: center; + justify-content: center; + margin: 10px 0; +} + +.audio-bar { + width: 4px; + height: 20px; + background: var(--primary-color); + margin: 0 2px; + border-radius: 2px; + animation: audioPulse 0.5s ease-in-out infinite alternate; +} + +@keyframes audioPulse { + 0% { height: 20px; } + 100% { height: 40px; } +} + +/* Reduce motion for users who prefer it */ +@media (prefers-reduced-motion: reduce) { + .step.active .step-circle, + .spinner { + animation: none !important; + } + .btn:hover { + transform: none !important; + box-shadow: none !important; + } +} + +/* Progress Steps */ +.progress-step { + display: flex; + align-items: center; +} + +/* Vertical Progress Pipeline */ +.progress-pipeline-vertical { + display: flex; + flex-direction: column; + align-items: center; + gap: 12px; /* Reduced from 20px for tighter spacing */ + padding: 25px 15px; /* Reduced padding */ + background: var(--glass-bg); + border-radius: 20px; + border: 1px solid rgba(255, 255, 255, 0.1); + min-height: 450px; /* Reduced height */ + justify-content: center; + width: 100%; +} + +.progress-step-vertical { + display: flex; + flex-direction: row; + align-items: center; + text-align: left; + padding: 16px 20px; /* Increased padding for better touch targets */ + border-radius: 15px; + transition: var(--transition-smooth); + min-width: 160px; /* Increased width */ + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + margin-bottom: 4px; /* Reduced margin */ + width: 100%; /* Full width for better appearance */ +} + +.progress-step-vertical .step-icon-small { + width: 24px !important; /* Increased from 18px */ + height: 24px !important; /* Increased from 18px */ + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 16px; /* Increased margin */ + margin-bottom: 0; + font-size: 0.8rem !important; /* Increased from 0.6rem */ + transition: var(--transition-smooth); + background: rgba(255, 255, 255, 0.1) !important; + color: #e2e8f0 !important; + border: 1px solid rgba(255, 255, 255, 0.2); + flex-shrink: 0; +} + +.progress-step-vertical .step-label { + font-size: 0.9rem; /* Increased from 0.7rem */ + font-weight: 600; + color: #e2e8f0; + transition: var(--transition-smooth); + text-align: left; /* Changed from center to left for better alignment */ + flex: 1; /* Take remaining space */ +} + +.progress-step-vertical.active .step-icon-small { + background: var(--primary-gradient) !important; + color: white !important; + box-shadow: var(--shadow-glow); +} + +.progress-step-vertical.completed .step-icon-small { + background: var(--success-color) !important; + color: white !important; +} + +.progress-step-vertical.error .step-icon-small { + background: var(--error-color) !important; + color: white !important; +} + +.pipeline-arrow-vertical { + font-size: 1.2rem; /* Slightly smaller */ + color: #94a3b8; /* Better color */ + margin: 2px 0; /* Reduced margin */ + opacity: 0.7; /* Subtle appearance */ + transition: var(--transition-smooth); +} + +.progress-step.completed { + background: rgba(16, 185, 129, 0.1); + border: 1px solid rgba(16, 185, 129, 0.3); +} + +.progress-step.active { + background: var(--primary-gradient); + color: white; +} + +.step-icon { + width: 30px; + height: 30px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 15px; + font-size: 14px; +} + +.step-icon.completed { + background: #10b981; + color: white; +} + +.step-icon.active { + background: white; + color: var(--primary-color); +} + +.step-icon.pending { + background: rgba(139, 92, 246, 0.2); + color: #94a3b8; +} + +/* Progress Pipeline - New Compact Horizontal Design */ +.progress-pipeline { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; + padding: 1.5rem; + background: var(--glass-bg); + border-radius: 15px; + border: 1px solid var(--glass-border); + max-width: 700px; + margin: 0 auto; +} + +/* Horizontal Progress Pipeline for Title Flow */ +.progress-pipeline-horizontal { + display: flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + padding: 0.5rem 1rem; + background: rgba(139, 92, 246, 0.05); + border-radius: 25px; + border: 1px solid rgba(139, 92, 246, 0.1); + backdrop-filter: blur(5px); + box-shadow: none; + opacity: 0.7; + transition: all 0.3s ease; +} + +.progress-pipeline-horizontal:hover { + opacity: 1; + background: rgba(139, 92, 246, 0.08); +} + +/* Dynamic Layout States */ +#inputLayout { + transition: all 0.5s ease-in-out; +} + +#resultsLayout { + transition: all 0.5s ease-in-out; +} + +#titleWithFlow { + transition: all 0.3s ease-in-out; +} + +/* Enhanced Feature Cards with Better Background Prominence */ +.feature-card { + background: linear-gradient(135deg, + rgba(139, 92, 246, 0.15) 0%, + rgba(168, 85, 247, 0.12) 50%, + rgba(192, 132, 252, 0.1) 100%); + backdrop-filter: blur(15px); + border: 1px solid rgba(139, 92, 246, 0.25); + border-radius: 20px; + box-shadow: var(--shadow-glass); + transition: var(--transition-bounce); + color: #e2e8f0; + height: 100%; + padding: 2rem; /* Increased padding for better background-to-text ratio */ + min-height: 140px; /* Ensure minimum height for prominence */ + position: relative; +} + +/* Add subtle glow effect to feature cards */ +.feature-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(135deg, + rgba(139, 92, 246, 0.05), + rgba(168, 85, 247, 0.03), + rgba(192, 132, 252, 0.02)); + border-radius: 20px; + z-index: -1; + opacity: 0; + transition: opacity 0.3s ease; +} + +.feature-card:hover::before { + opacity: 1; +} + +/* Enhanced demo container background */ +.demo-container { + background: linear-gradient(135deg, + rgba(139, 92, 246, 0.12) 0%, + rgba(15, 15, 35, 0.95) 50%, + rgba(168, 85, 247, 0.08) 100%); + backdrop-filter: blur(20px); + border: 1px solid rgba(139, 92, 246, 0.2); + border-radius: 20px; + box-shadow: + var(--shadow-glass), + 0 0 40px rgba(139, 92, 246, 0.1); + padding: 3rem; + margin: 2rem 0; + width: 100%; + position: relative; + z-index: 1; + color: #e2e8f0; +} + +/* Enhanced Loading Step Styles */ +.process-step { + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 15px; + transition: all 0.3s ease; + text-align: center; +} + +.process-step.active { + background: rgba(139, 92, 246, 0.15); + border-color: rgba(139, 92, 246, 0.4); + transform: scale(1.02); +} + +.process-step.completed { + background: rgba(16, 185, 129, 0.15); + border-color: rgba(16, 185, 129, 0.4); +} + +.step-text { + font-weight: 600; + color: #e2e8f0; + font-size: 0.9rem; + margin-bottom: 8px; +} + +.step-status { + font-size: 0.8rem; + color: #94a3b8; + font-weight: 500; +} + +.process-step.active .step-status { + color: #a855f7; +} + +.process-step.completed .step-status { + color: #10b981; +} + +/* Processing Information Compact Styles */ +#processingInfoSidebar .feature-card { + min-height: auto; +} + +#processingInfoSidebar .bg-dark { + transition: all 0.2s ease; +} + +#processingInfoSidebar .bg-dark:hover { + background-color: rgba(0, 0, 0, 0.4) !important; + transform: translateX(2px); +} + +/* Button Consistency and Improved Spacing */ +.btn-lg { + padding: 0.75rem 1.5rem; + font-weight: 600; + border-radius: 12px; + transition: all 0.3s ease; + min-width: 120px; /* Ensure consistent button widths */ +} + +/* Debug Test Section Toggleable */ +#debugTestSection.hidden { + display: none !important; +} + +#debugTestSection .btn-sm { + padding: 0.5rem 1rem; + font-size: 0.875rem; + border-radius: 8px; + transition: all 0.2s ease; +} + +/* Enhanced Input Area Background */ +#textInput { + min-height: 240px !important; + font-size: 16px; + line-height: 1.5; + resize: vertical; + padding: 1.5rem; /* Increased padding for better appearance */ + background-color: rgba(255, 255, 255, 0.12) !important; /* More prominent background */ + border: 2px solid rgba(139, 92, 246, 0.3) !important; /* Thicker border */ +} + +#textInput:focus { + background-color: rgba(255, 255, 255, 0.18) !important; + border-color: var(--primary-color) !important; + box-shadow: 0 0 0 0.3rem rgba(139, 92, 246, 0.25) !important; + transform: scale(1.01); /* Subtle scale on focus */ +} + +.progress-step-horizontal { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + min-width: 60px; + transition: var(--transition-smooth); +} + +.progress-step-horizontal .step-icon-small { + width: 18px !important; + height: 18px !important; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 0.25rem; + font-size: 0.7rem !important; + transition: var(--transition-smooth); + background: rgba(255, 255, 255, 0.1) !important; + color: #cbd5e1 !important; + border: 1px solid rgba(255, 255, 255, 0.15); + flex-shrink: 0; +} + +.progress-step-horizontal .step-label { + font-size: 0.65rem; + font-weight: 500; + color: #94a3b8; + white-space: nowrap; + transition: var(--transition-smooth); +} + +.progress-step-horizontal.active .step-icon-small { + background: var(--primary-gradient) !important; + color: white !important; + transform: scale(1.1); +} + +.progress-step-horizontal.active .step-label { + color: var(--primary-color); + font-weight: 600; +} + +.progress-step-horizontal.completed .step-icon-small { + background: #10b981 !important; + color: white !important; +} + +.progress-step-horizontal.completed .step-label { + color: #10b981; +} + +.pipeline-arrow { + font-size: 0.8rem; + color: #64748b; + font-weight: normal; + user-select: none; + opacity: 0.6; +} + + +/* Responsive Design for Progress Pipeline */ +@media (max-width: 768px) { + .progress-pipeline { + flex-direction: column; + gap: 1.5rem; + padding: 2rem 1rem; + } + + .pipeline-arrow { + transform: rotate(90deg); + font-size: 1.5rem; + } + + .progress-step-horizontal { + min-width: 100px; + } + + .step-label { + font-size: 0.8rem; + } +} + +/* Error Messages */ +.error-message { + color: #ef4444; + font-size: 0.875rem; + margin-top: 8px; + padding: 8px 12px; + background: rgba(239, 68, 68, 0.1); + border: 1px solid rgba(239, 68, 68, 0.2); + border-radius: 8px; + display: none; +} + +.error-message.show { + display: block; + animation: fadeInUp 0.3s ease-out; +} + +/* Success Messages */ +.success-message { + color: #10b981; + font-size: 0.875rem; + margin-top: 8px; + padding: 8px 12px; + background: rgba(16, 185, 129, 0.1); + border: 1px solid rgba(16, 185, 129, 0.2); + border-radius: 8px; + display: none; +} + +.success-message.show { + display: block; + animation: fadeInUp 0.3s ease-out; +} + +/* Model Detail Cards */ +.model-detail-card { + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 8px; + padding: 12px; + margin-bottom: 10px; + transition: all 0.3s ease; +} + +.model-detail-card:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-1px); +} + +.model-detail-label { + font-size: 0.75rem; + color: #94a3b8; + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 4px; + font-weight: 600; +} + +.model-detail-value { + font-size: 1.1rem; + color: #f1f5f9; + font-weight: 700; +} + +.model-detail-text { + font-size: 0.9rem; + color: #cbd5e1; + line-height: 1.4; +} + +/* Pure HTML/CSS Chart styling - BEAUTIFUL DESIGN */ +.emotion-chart-container, .summary-chart-container { + background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); + border-radius: 16px; + padding: 25px; + margin: 20px 0; + border: 1px solid rgba(255, 255, 255, 0.2); + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); + backdrop-filter: blur(10px); + position: relative; + overflow: hidden; +} + +.emotion-chart-container::before, .summary-chart-container::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 3px; + background: linear-gradient(90deg, #8b5cf6, #a855f7, #c084fc); +} + +.chart-header { + text-align: center; + margin-bottom: 25px; +} + +.chart-title { + color: #fbbf24; + font-weight: 700; + margin-bottom: 8px; + font-size: 1.25rem; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.chart-subtitle { + color: #cbd5e1; + font-size: 0.9rem; + opacity: 0.8; +} + +.emotion-bars { + display: flex; + flex-direction: column; + gap: 20px; +} + +.emotion-bar { + margin-bottom: 20px; + animation: slideInLeft 0.8s ease-out forwards; + opacity: 0; + transform: translateX(-30px); + background: rgba(255, 255, 255, 0.03); + border-radius: 12px; + padding: 15px; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; + display: block; + visibility: visible; +} + +.emotion-bar:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); +} + +@keyframes slideInLeft { + to { + opacity: 1; + transform: translateX(0); + } +} + +.emotion-label { + display: flex; + justify-content: space-between; + margin-bottom: 12px; + align-items: center; +} + +.emotion-name { + font-weight: 700; + color: #f1f5f9; + text-transform: capitalize; + font-size: 1rem; + letter-spacing: 0.5px; +} + +.emotion-percentage { + color: #a855f7; + font-weight: 700; + font-size: 1.1rem; + background: rgba(168, 85, 247, 0.1); + padding: 4px 12px; + border-radius: 20px; + border: 1px solid rgba(168, 85, 247, 0.3); +} + +.emotion-bar-bg { + background: rgba(0, 0, 0, 0.3); + border-radius: 15px; + height: 16px; + overflow: hidden; + position: relative; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.emotion-bar-fill { + height: 100%; + border-radius: 15px; + transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); + position: relative; + overflow: hidden; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); +} + +.emotion-bar-fill::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); + animation: shimmer 3s infinite; +} + +@keyframes shimmer { + 0% { transform: translateX(-100%); } + 100% { transform: translateX(100%); } +} + +.summary-stats { + display: flex; + justify-content: space-around; + margin-bottom: 25px; + gap: 20px; +} + +.stat-item { + text-align: center; + flex: 1; + background: rgba(255, 255, 255, 0.05); + border-radius: 12px; + padding: 15px; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; +} + +.stat-item:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-2px); +} + +.stat-item.highlight { + background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1)); + border: 2px solid rgba(139, 92, 246, 0.4); + box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2); +} + +.stat-value { + font-size: 1.8rem; + font-weight: 800; + color: #fbbf24; + margin-bottom: 8px; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.stat-item.highlight .stat-value { + color: #c084fc; + font-size: 2rem; +} + +.stat-label { + font-size: 0.8rem; + color: #cbd5e1; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: 600; +} + +.summary-bars { + display: flex; + flex-direction: column; + gap: 20px; +} + +.summary-bar { + margin-bottom: 20px; + background: rgba(255, 255, 255, 0.03); + border-radius: 12px; + padding: 15px; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; +} + +.summary-bar:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-1px); +} + +.bar-label { + font-weight: 700; + color: #f1f5f9; + margin-bottom: 12px; + font-size: 1rem; +} + +.bar-bg { + background: rgba(0, 0, 0, 0.3); + border-radius: 12px; + height: 24px; + overflow: hidden; + position: relative; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.bar-fill { + height: 100%; + border-radius: 12px; + transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); + position: relative; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); +} + +.bar-fill.original { + background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd); +} + +.bar-fill.summary { + background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7); +} + +.bar-value { + text-align: right; + font-size: 0.9rem; + color: #cbd5e1; + margin-top: 8px; + font-weight: 600; +} + +.chart-footer { + text-align: center; + margin-top: 20px; + padding-top: 20px; + border-top: 1px solid rgba(255, 255, 255, 0.1); + color: #94a3b8; + font-size: 0.85rem; +} + + +/* Keyboard Focus Indicators */ +.comprehensive-demo .btn-primary:focus-visible { + outline: 3px solid #c084fc; + outline-offset: 2px; + box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.45); +} + +.demo-container .form-control:focus-visible { + outline: 2px solid var(--primary-color); + outline-offset: 2px; +} + +/* Reduced Motion Preferences */ +@media (prefers-reduced-motion: reduce) { + * { + animation: none !important; + transition: none !important; + } + .hero-section::before { + animation: none !important; + } + .floating-card { + animation: none !important; + } + .audio-bar { + animation: none !important; + } +} + +/* Responsive Design */ +@media (max-width: 1200px) { + .progress-pipeline-horizontal { + gap: 0.5rem; + padding: 0.8rem 1rem; + } + + .progress-pipeline-horizontal .step-label { + font-size: 0.7rem; + } + + #processingInfoSidebar { + margin-top: 2rem; + } +} + +@media (max-width: 768px) { + .demo-container { + padding: 30px 20px; + margin: -50px 15px 30px 15px; + } + + .hero-section { + padding: 80px 0; + } + + /* Stack title and flow vertically on mobile */ + #titleWithFlow .d-flex { + flex-direction: column; + gap: 0.75rem; + text-align: center; + } + + .progress-pipeline-horizontal { + gap: 0.25rem; + padding: 0.4rem 0.6rem; + justify-content: center; + } + + .progress-step-horizontal { + min-width: 40px; + } + + .progress-step-horizontal .step-icon-small { + width: 16px !important; + height: 16px !important; + font-size: 0.6rem !important; + } + + .progress-step-horizontal .step-label { + font-size: 0.5rem; + } + + .pipeline-arrow { + font-size: 0.7rem; + } + + /* Stack buttons vertically on mobile */ + .d-flex.gap-3.justify-content-center { + flex-direction: column; + align-items: center; + gap: 0.75rem !important; + } + + .btn-lg { + min-width: 200px; + width: 100%; + max-width: 300px; + } + + /* Full width input on mobile */ + #textInput { + min-height: 180px !important; + padding: 1rem; + } + + /* Compact processing info on mobile */ + #processingInfoSidebar .bg-dark { + padding: 0.5rem !important; + } + + #processingInfoSidebar .feature-card { + padding: 1rem; + } + + /* Results layout adjustments */ + #resultsLayout .col-lg-8, + #resultsLayout .col-lg-4 { + flex: 0 0 100%; + max-width: 100%; + } +} + +@media (max-width: 576px) { + .demo-container { + padding: 20px 15px; + margin: -50px 10px 20px 10px; + } + + .progress-pipeline-horizontal { + padding: 0.5rem; + } + + .btn-lg { + padding: 0.6rem 1rem; + font-size: 0.9rem; + } + + .feature-card { + padding: 1rem !important; + margin-bottom: 1rem; + } + + #textInput { + min-height: 160px !important; + font-size: 14px; + } +} + +/* Debug section responsive behavior */ +@media (max-width: 992px) { + #debugTestSection { + margin-top: 1rem; + } +} + +/* Enhanced transitions for responsive changes */ +@media (prefers-reduced-motion: no-preference) { + #titleWithFlow, + #inputLayout, + #resultsLayout { + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + } +} diff --git a/website/favicon.ico b/website/favicon.ico new file mode 100644 index 000000000..cb37ebb78 --- /dev/null +++ b/website/favicon.ico @@ -0,0 +1,6 @@ + +301 Moved +

301 Moved

+The document has moved +here. + From 373da35eb4ebca087127fd7e64ad96f776219602 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:24:42 +0200 Subject: [PATCH 02/26] fix: replace HTML redirect favicon.ico with proper binary icon file --- website/favicon.ico | Bin 330 -> 1042 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/website/favicon.ico b/website/favicon.ico index cb37ebb78418ccdd4261cffee1aa89c5d8c4170d..2efdef2a8f3084bc3c9ab1abca51fdf6f9a0db6b 100644 GIT binary patch literal 1042 jcmZQ%5D;KsU}R8W00R~VhVGbe|3~p?7>uTYk(mYn=tJCP literal 330 zcmYk2!Eb^v7{%`-{trzLJ1L!bS!T<^6axv4MVX1aEVUNf41~c4nfvS4!VWvWm+$5G z-bbTsoA@*egSAgf2^=YadM3X*-7_qzE66L%;8shF{uIL?zkw(yi=|M!X(g}@^4SCS z9h${i68ek#IoejeJX10nl#GPubbT~e(ft33QBI~LI#;4A4Gt;ZqSD448lY$wZWy+$ z+DAgbb1yA$(83i}Npjw6Q|sV8i9(ww+o!8INbY!9FKubI2@dfpeHo0L7sZK-&yT8x zmSxA+aJrA*!|B^@40KJwEXQCj8dP_(h#}ePAITOT_LXcTC4uiw97={UW|{rq#Q6n$ CK58@o From 97a6f632d10894c128ce544ebdc6c3edde66b37c Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:24:50 +0200 Subject: [PATCH 03/26] fix: update HTML to use modular CSS structure --- website/comprehensive-demo.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/comprehensive-demo.html b/website/comprehensive-demo.html index 010e8a3fb..56c8f1188 100644 --- a/website/comprehensive-demo.html +++ b/website/comprehensive-demo.html @@ -16,8 +16,8 @@ - - + + From ad48b66917e4ce44fe9c155dcac9f7e2c41eaff2 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:24:58 +0200 Subject: [PATCH 04/26] fix: address code review issues in comprehensive-demo.css - Consolidate duplicate CSS rules (.demo-container, .feature-card, #textInput) - Fix aggressive universal selector in prefers-reduced-motion with specific classes - Make .step-label selector more specific to avoid conflicts - Merge duplicate @media (max-width: 768px) blocks for better maintainability --- website/css/comprehensive-demo.css | 289 +++++++++++++---------------- 1 file changed, 125 insertions(+), 164 deletions(-) diff --git a/website/css/comprehensive-demo.css b/website/css/comprehensive-demo.css index 3d642f408..1073ba403 100644 --- a/website/css/comprehensive-demo.css +++ b/website/css/comprehensive-demo.css @@ -59,13 +59,7 @@ transform: scale(1.1); } -/* Text input styling */ -#textInput { - min-height: 240px !important; - font-size: 16px; - line-height: 1.5; - resize: vertical; -} +/* Text input styling - consolidated below */ /* Base Styles */ body.comprehensive-demo { @@ -78,6 +72,107 @@ body.comprehensive-demo { padding-top: 80px; /* Account for fixed navbar */ } +/* Mobile Responsive Design - Consolidated */ +@media (max-width: 768px) { + body.comprehensive-demo { + background-attachment: scroll; + } + + .progress-pipeline { + flex-direction: column; + gap: 1.5rem; + padding: 2rem 1rem; + } + + .pipeline-arrow { + transform: rotate(90deg); + font-size: 1.5rem; + } + + .progress-step-horizontal { + min-width: 100px; + } + + .progress-step-horizontal .step-label { + font-size: 0.8rem; + } + + .demo-container { + padding: 30px 20px; + margin: -50px 15px 30px 15px; + } + + .hero-section { + padding: 80px 0; + } + + /* Stack title and flow vertically on mobile */ + #titleWithFlow .d-flex { + flex-direction: column; + gap: 0.75rem; + text-align: center; + } + + .progress-pipeline-horizontal { + gap: 0.25rem; + padding: 0.4rem 0.6rem; + justify-content: center; + } + + .progress-step-horizontal { + min-width: 40px; + } + + .progress-step-horizontal .step-icon-small { + width: 16px !important; + height: 16px !important; + font-size: 0.6rem !important; + } + + .progress-step-horizontal .step-label { + font-size: 0.5rem; + } + + .pipeline-arrow { + font-size: 0.7rem; + } + + /* Stack buttons vertically on mobile */ + .d-flex.gap-3.justify-content-center { + flex-direction: column; + align-items: center; + gap: 0.75rem !important; + } + + .btn-lg { + min-width: 200px; + width: 100%; + max-width: 300px; + } + + /* Full width input on mobile */ + #textInput { + min-height: 180px !important; + padding: 1rem; + } + + /* Compact processing info on mobile */ + #processingInfoSidebar .bg-dark { + padding: 0.5rem !important; + } + + #processingInfoSidebar .feature-card { + padding: 1rem; + } + + /* Results layout adjustments */ + #resultsLayout .col-lg-8, + #resultsLayout .col-lg-4 { + flex: 0 0 100%; + max-width: 100%; + } +} + /* Result sections */ .result-section-hidden { display: none !important; @@ -149,45 +244,9 @@ body.comprehensive-demo { z-index: 2; } -/* Demo Container - Full Width Professional Design */ -.demo-container { - background: var(--glass-bg); - backdrop-filter: blur(20px); - border: 1px solid var(--glass-border); - border-radius: 20px; - box-shadow: var(--shadow-glass); - padding: 3rem; - margin: 2rem 0; - width: 100%; - position: relative; - z-index: 1; - color: #e2e8f0; -} +/* Demo Container - Consolidated */ -/* Feature Cards */ -.feature-card { - background: var(--glass-bg); - backdrop-filter: blur(15px); - border: 1px solid var(--glass-border); - border-radius: 20px; - box-shadow: var(--shadow-glass); - transition: var(--transition-bounce); - color: #e2e8f0; - height: 100%; -} - -.feature-card:hover { - transform: translateY(-5px) scale(1.02); - box-shadow: var(--shadow-glow); -} - -.feature-card.active { - background: var(--primary-gradient); - border-color: var(--accent-color); - color: white; - transform: translateY(-5px) scale(1.05); - box-shadow: var(--shadow-glow); -} +/* Feature Cards - Consolidated */ /* Navigation */ .comprehensive-demo .navbar { @@ -343,17 +402,7 @@ body.comprehensive-demo { 100% { height: 40px; } } -/* Reduce motion for users who prefer it */ -@media (prefers-reduced-motion: reduce) { - .step.active .step-circle, - .spinner { - animation: none !important; - } - .btn:hover { - transform: none !important; - box-shadow: none !important; - } -} +/* Reduced motion rules consolidated above */ /* Progress Steps */ .progress-step { @@ -742,27 +791,7 @@ body.comprehensive-demo { } -/* Responsive Design for Progress Pipeline */ -@media (max-width: 768px) { - .progress-pipeline { - flex-direction: column; - gap: 1.5rem; - padding: 2rem 1rem; - } - - .pipeline-arrow { - transform: rotate(90deg); - font-size: 1.5rem; - } - - .progress-step-horizontal { - min-width: 100px; - } - - .step-label { - font-size: 0.8rem; - } -} +/* Responsive Design for Progress Pipeline - consolidated above */ /* Error Messages */ .error-message { @@ -1099,20 +1128,27 @@ body.comprehensive-demo { outline-offset: 2px; } -/* Reduced Motion Preferences */ +/* Reduced Motion Preferences - Consolidated */ @media (prefers-reduced-motion: reduce) { - * { + .step.active .step-circle, + .spinner, + .hero-section::before, + .floating-card, + .audio-bar, + .emotion-bar-fill::after, + .feature-card, + .btn, + .btn:hover, + .progress-step-vertical, + .progress-step-horizontal, + .process-step, + .model-detail-card, + .stat-item, + .emotion-bar, + .summary-bar { animation: none !important; transition: none !important; - } - .hero-section::before { - animation: none !important; - } - .floating-card { - animation: none !important; - } - .audio-bar { - animation: none !important; + transform: none !important; } } @@ -1132,82 +1168,7 @@ body.comprehensive-demo { } } -@media (max-width: 768px) { - .demo-container { - padding: 30px 20px; - margin: -50px 15px 30px 15px; - } - - .hero-section { - padding: 80px 0; - } - - /* Stack title and flow vertically on mobile */ - #titleWithFlow .d-flex { - flex-direction: column; - gap: 0.75rem; - text-align: center; - } - - .progress-pipeline-horizontal { - gap: 0.25rem; - padding: 0.4rem 0.6rem; - justify-content: center; - } - - .progress-step-horizontal { - min-width: 40px; - } - - .progress-step-horizontal .step-icon-small { - width: 16px !important; - height: 16px !important; - font-size: 0.6rem !important; - } - - .progress-step-horizontal .step-label { - font-size: 0.5rem; - } - - .pipeline-arrow { - font-size: 0.7rem; - } - - /* Stack buttons vertically on mobile */ - .d-flex.gap-3.justify-content-center { - flex-direction: column; - align-items: center; - gap: 0.75rem !important; - } - - .btn-lg { - min-width: 200px; - width: 100%; - max-width: 300px; - } - - /* Full width input on mobile */ - #textInput { - min-height: 180px !important; - padding: 1rem; - } - - /* Compact processing info on mobile */ - #processingInfoSidebar .bg-dark { - padding: 0.5rem !important; - } - - #processingInfoSidebar .feature-card { - padding: 1rem; - } - - /* Results layout adjustments */ - #resultsLayout .col-lg-8, - #resultsLayout .col-lg-4 { - flex: 0 0 100%; - max-width: 100%; - } -} +/* Mobile responsive rules consolidated above */ @media (max-width: 576px) { .demo-container { From bdd5d578ea5929ad322233f331adbe0a7191810f Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:25:39 +0200 Subject: [PATCH 05/26] feat: add core CSS architecture files - Add variables.css with design system variables - Add base.css with typography and global styles - Add main.css as entry point for component imports --- website/css/components/base.css | 77 ++++++++++++++++++++++++++++ website/css/components/variables.css | 23 +++++++++ website/css/main.css | 15 ++++++ 3 files changed, 115 insertions(+) create mode 100644 website/css/components/base.css create mode 100644 website/css/components/variables.css create mode 100644 website/css/main.css diff --git a/website/css/components/base.css b/website/css/components/base.css new file mode 100644 index 000000000..4f8efb758 --- /dev/null +++ b/website/css/components/base.css @@ -0,0 +1,77 @@ +/* Base Styles and Typography */ +body.comprehensive-demo { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; + line-height: 1.6; + color: #e2e8f0; + background: var(--dark-gradient); + background-attachment: fixed; + min-height: 100vh; + padding-top: 80px; /* Account for fixed navbar */ +} + +/* Disable background-attachment: fixed on mobile devices for performance */ +@media (max-width: 768px) { + body.comprehensive-demo { + background-attachment: scroll; + } +} + +/* Material Icons styling */ +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-feature-settings: 'liga'; + -webkit-font-smoothing: antialiased; + vertical-align: middle; +} + +/* Info icon styling */ +.info-icon { + font-size: 16px !important; + color: #6b7280; + margin-left: 6px; + cursor: help; + opacity: 0.7; + transition: var(--transition-smooth); + vertical-align: middle; +} + +.info-icon:hover { + color: var(--primary-color); + opacity: 1; + transform: scale(1.1); +} + +/* Text Effects */ +.gradient-text { + background: var(--primary-gradient); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +/* Reduced Motion Preferences */ +@media (prefers-reduced-motion: reduce) { + * { + animation: none !important; + transition: none !important; + } + .hero-section::before { + animation: none !important; + } + .floating-card { + animation: none !important; + } + .audio-bar { + animation: none !important; + } +} diff --git a/website/css/components/variables.css b/website/css/components/variables.css new file mode 100644 index 000000000..3deb64aba --- /dev/null +++ b/website/css/components/variables.css @@ -0,0 +1,23 @@ +/* CSS Variables - Centralized Design System */ +:root { + --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%); + --secondary-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); + --dark-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%); + --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c084fc 100%); + + --primary-color: #8b5cf6; + --secondary-color: #a855f7; + --accent-color: #c084fc; + --dark-color: #0f0f23; + --darker-color: #0a0a1a; + --light-accent: #e9d5ff; + --glass-bg: rgba(139, 92, 246, 0.1); + --glass-border: rgba(139, 92, 246, 0.2); + --error-color: #ef4444; + --success-color: #10b981; + + --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); + --shadow-glow: 0 10px 40px rgba(139, 92, 246, 0.3); + --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3); +} diff --git a/website/css/main.css b/website/css/main.css new file mode 100644 index 000000000..bf13ccca0 --- /dev/null +++ b/website/css/main.css @@ -0,0 +1,15 @@ +/* Main CSS File - Imports all component stylesheets */ + +/* Import component stylesheets in logical order */ +@import url('./components/variables.css'); +@import url('./components/base.css'); +@import url('./components/navigation.css'); +@import url('./components/buttons.css'); +@import url('./components/forms.css'); +@import url('./components/containers.css'); +@import url('./components/cards.css'); +@import url('./components/progress.css'); +@import url('./components/charts.css'); +@import url('./components/messages.css'); +@import url('./components/animations.css'); +@import url('./components/responsive.css'); From b228a9e15ee14b13d41ff0fd0808d10f01cc9926 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:25:47 +0200 Subject: [PATCH 06/26] feat: add UI component CSS files - Add buttons.css for button styles and interactions - Add forms.css for form controls and input styling - Add navigation.css for navbar and menu components - Add cards.css for feature cards and content containers --- website/css/components/buttons.css | 59 +++++++++++ website/css/components/cards.css | 135 ++++++++++++++++++++++++++ website/css/components/forms.css | 45 +++++++++ website/css/components/navigation.css | 10 ++ 4 files changed, 249 insertions(+) create mode 100644 website/css/components/buttons.css create mode 100644 website/css/components/cards.css create mode 100644 website/css/components/forms.css create mode 100644 website/css/components/navigation.css diff --git a/website/css/components/buttons.css b/website/css/components/buttons.css new file mode 100644 index 000000000..72a41ea2f --- /dev/null +++ b/website/css/components/buttons.css @@ -0,0 +1,59 @@ +/* Button Styles */ +.comprehensive-demo .btn-primary { + background: var(--primary-gradient); + border: none; + border-radius: 12px; + padding: 12px 30px; + font-weight: 600; + transition: var(--transition-bounce); + box-shadow: var(--shadow-glow); +} + +.comprehensive-demo .btn-primary:hover { + transform: translateY(-2px) scale(1.05); + box-shadow: 0 15px 50px rgba(139, 92, 246, 0.4); +} + +.comprehensive-demo .btn:focus-visible { + outline: 3px solid #667eea; + outline-offset: 2px; +} + +.comprehensive-demo .btn-primary:focus-visible { + outline: 3px solid #c084fc; + outline-offset: 2px; + box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.45); +} + +/* Button Consistency and Improved Spacing */ +.btn-lg { + padding: 0.75rem 1.5rem; + font-weight: 600; + border-radius: 12px; + transition: all 0.3s ease; + min-width: 120px; /* Ensure consistent button widths */ +} + +/* Debug Test Section Toggleable */ +#debugTestSection .btn-sm { + padding: 0.5rem 1rem; + font-size: 0.875rem; + border-radius: 8px; + transition: all 0.2s ease; +} + +/* Responsive button adjustments */ +@media (max-width: 768px) { + .btn-lg { + min-width: 200px; + width: 100%; + max-width: 300px; + } +} + +@media (max-width: 576px) { + .btn-lg { + padding: 0.6rem 1rem; + font-size: 0.9rem; + } +} diff --git a/website/css/components/cards.css b/website/css/components/cards.css new file mode 100644 index 000000000..e52a92e34 --- /dev/null +++ b/website/css/components/cards.css @@ -0,0 +1,135 @@ +/* Feature Cards - Consolidated */ +.feature-card { + background: linear-gradient(135deg, + rgba(139, 92, 246, 0.15) 0%, + rgba(168, 85, 247, 0.12) 50%, + rgba(192, 132, 252, 0.1) 100%); + backdrop-filter: blur(15px); + border: 1px solid rgba(139, 92, 246, 0.25); + border-radius: 20px; + box-shadow: var(--shadow-glass); + transition: var(--transition-bounce); + color: #e2e8f0; + height: 100%; + padding: 2rem; /* Increased padding for better background-to-text ratio */ + min-height: 140px; /* Ensure minimum height for prominence */ + position: relative; +} + +.feature-card:hover { + transform: translateY(-5px) scale(1.02); + box-shadow: var(--shadow-glow); +} + +.feature-card.active { + background: var(--primary-gradient); + border-color: var(--accent-color); + color: white; + transform: translateY(-5px) scale(1.05); + box-shadow: var(--shadow-glow); +} + +/* Add subtle glow effect to feature cards */ +.feature-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(135deg, + rgba(139, 92, 246, 0.05), + rgba(168, 85, 247, 0.03), + rgba(192, 132, 252, 0.02)); + border-radius: 20px; + z-index: -1; + opacity: 0; + transition: opacity 0.3s ease; +} + +.feature-card:hover::before { + opacity: 1; +} + +/* Feature card text improvements */ +.feature-card .text-muted { + color: #cbd5e1 !important; +} + +.feature-card h5, .feature-card h6 { + color: #f1f5f9 !important; +} + +.feature-card small { + color: #cbd5e1 !important; +} + +/* Ensure icons are visible in results */ +.feature-card h5 i { + font-size: 1.2rem; + margin-right: 8px; +} + +/* Processing Information Compact Styles */ +#processingInfoSidebar .feature-card { + min-height: auto; +} + +#processingInfoSidebar .bg-dark { + transition: all 0.2s ease; +} + +#processingInfoSidebar .bg-dark:hover { + background-color: rgba(0, 0, 0, 0.4) !important; + transform: translateX(2px); +} + +/* Model Detail Cards */ +.model-detail-card { + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 8px; + padding: 12px; + margin-bottom: 10px; + transition: all 0.3s ease; +} + +.model-detail-card:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-1px); +} + +.model-detail-label { + font-size: 0.75rem; + color: #94a3b8; + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 4px; + font-weight: 600; +} + +.model-detail-value { + font-size: 1.1rem; + color: #f1f5f9; + font-weight: 700; +} + +.model-detail-text { + font-size: 0.9rem; + color: #cbd5e1; + line-height: 1.4; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + #processingInfoSidebar .feature-card { + padding: 1rem; + } +} + +@media (max-width: 576px) { + .feature-card { + padding: 1rem !important; + margin-bottom: 1rem; + } +} diff --git a/website/css/components/forms.css b/website/css/components/forms.css new file mode 100644 index 000000000..3f28cef36 --- /dev/null +++ b/website/css/components/forms.css @@ -0,0 +1,45 @@ +/* Form Controls and Input Styling */ +#textInput { + min-height: 240px !important; + font-size: 16px; + line-height: 1.5; + resize: vertical; + padding: 1.5rem; /* Increased padding for better appearance */ + background-color: rgba(255, 255, 255, 0.12) !important; /* More prominent background */ + border: 2px solid rgba(139, 92, 246, 0.3) !important; /* Thicker border */ +} + +#textInput:focus { + background-color: rgba(255, 255, 255, 0.18) !important; + border-color: var(--primary-color) !important; + box-shadow: 0 0 0 0.3rem rgba(139, 92, 246, 0.25) !important; + transform: scale(1.01); /* Subtle scale on focus */ +} + +/* Scoped form controls to demo container */ +.demo-container .form-control { + color: #e2e8f0; + background-color: rgba(255, 255, 255, 0.1); + border-color: rgba(139, 92, 246, 0.3); +} + +.demo-container .form-control:focus { + color: #e2e8f0; + background-color: rgba(255, 255, 255, 0.15); + border-color: var(--primary-color); + box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25); +} + +.comprehensive-demo .form-control::placeholder { + color: #94a3b8 !important; +} + +.demo-container .form-control::placeholder { + color: #94a3b8; +} + +/* Focus styles */ +.demo-container .form-control:focus-visible { + outline: 2px solid var(--primary-color); + outline-offset: 2px; +} diff --git a/website/css/components/navigation.css b/website/css/components/navigation.css new file mode 100644 index 000000000..13ffc036d --- /dev/null +++ b/website/css/components/navigation.css @@ -0,0 +1,10 @@ +/* Navigation Styles */ +.comprehensive-demo .navbar { + background: rgba(15, 15, 35, 0.95); + backdrop-filter: blur(20px); + border-bottom: 1px solid var(--glass-border); +} + +.comprehensive-demo .navbar-brand, .comprehensive-demo .navbar .nav-link { + color: #e2e8f0; +} From 60956241cc4c9c1470a08f323aed8a98f2633cf7 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:25:56 +0200 Subject: [PATCH 07/26] feat: add layout and interactive component CSS files - Add containers.css for layout containers and hero sections - Add progress.css for progress indicators and pipeline components - Add charts.css for data visualization and chart components - Add animations.css for transitions and animation effects --- website/css/components/animations.css | 89 +++++++ website/css/components/charts.css | 286 ++++++++++++++++++++++ website/css/components/containers.css | 68 ++++++ website/css/components/progress.css | 332 ++++++++++++++++++++++++++ 4 files changed, 775 insertions(+) create mode 100644 website/css/components/animations.css create mode 100644 website/css/components/charts.css create mode 100644 website/css/components/containers.css create mode 100644 website/css/components/progress.css diff --git a/website/css/components/animations.css b/website/css/components/animations.css new file mode 100644 index 000000000..b79b3fe01 --- /dev/null +++ b/website/css/components/animations.css @@ -0,0 +1,89 @@ +/* Animations and Transitions */ +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(40px) scale(0.95); + } + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +@keyframes float { + 0%, 100% { transform: translateY(0px) rotate(0deg); } + 33% { transform: translateY(-20px) rotate(1deg); } + 66% { transform: translateY(-10px) rotate(-1deg); } +} + +@keyframes slideInLeft { + to { + opacity: 1; + transform: translateX(0); + } +} + +@keyframes shimmer { + 0% { transform: translateX(-100%); } + 100% { transform: translateX(100%); } +} + +@keyframes audioPulse { + 0% { height: 20px; } + 100% { height: 40px; } +} + +.floating-card { + animation: float 6s ease-in-out infinite; +} + +/* Result sections */ +.result-section-hidden { + display: none !important; +} + +.result-section-visible { + display: block; + animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1); +} + +.result-section { + display: none; +} + +.result-section.show { + display: block; + animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1); +} + +/* Loading States */ +.loading-spinner { + display: none; + color: #e2e8f0; +} + +.loading-spinner.show { + display: block; +} + +/* Dynamic Layout States */ +#inputLayout { + transition: all 0.5s ease-in-out; +} + +#resultsLayout { + transition: all 0.5s ease-in-out; +} + +#titleWithFlow { + transition: all 0.3s ease-in-out; +} + +/* Enhanced transitions for responsive changes */ +@media (prefers-reduced-motion: no-preference) { + #titleWithFlow, + #inputLayout, + #resultsLayout { + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + } +} diff --git a/website/css/components/charts.css b/website/css/components/charts.css new file mode 100644 index 000000000..f14319845 --- /dev/null +++ b/website/css/components/charts.css @@ -0,0 +1,286 @@ +/* Chart and Visualization Components */ +.emotion-chart-container, .summary-chart-container { + background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); + border-radius: 16px; + padding: 25px; + margin: 20px 0; + border: 1px solid rgba(255, 255, 255, 0.2); + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); + backdrop-filter: blur(10px); + position: relative; + overflow: hidden; +} + +.emotion-chart-container::before, .summary-chart-container::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 3px; + background: linear-gradient(90deg, #8b5cf6, #a855f7, #c084fc); +} + +.chart-header { + text-align: center; + margin-bottom: 25px; +} + +.chart-title { + color: #fbbf24; + font-weight: 700; + margin-bottom: 8px; + font-size: 1.25rem; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.chart-subtitle { + color: #cbd5e1; + font-size: 0.9rem; + opacity: 0.8; +} + +.emotion-bars { + display: flex; + flex-direction: column; + gap: 20px; +} + +.emotion-bar { + margin-bottom: 20px; + animation: slideInLeft 0.8s ease-out forwards; + opacity: 0; + transform: translateX(-30px); + background: rgba(255, 255, 255, 0.03); + border-radius: 12px; + padding: 15px; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; + display: block; + visibility: visible; +} + +.emotion-bar:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); +} + +.emotion-label { + display: flex; + justify-content: space-between; + margin-bottom: 12px; + align-items: center; +} + +.emotion-name { + font-weight: 700; + color: #f1f5f9; + text-transform: capitalize; + font-size: 1rem; + letter-spacing: 0.5px; +} + +.emotion-percentage { + color: #a855f7; + font-weight: 700; + font-size: 1.1rem; + background: rgba(168, 85, 247, 0.1); + padding: 4px 12px; + border-radius: 20px; + border: 1px solid rgba(168, 85, 247, 0.3); +} + +.emotion-bar-bg { + background: rgba(0, 0, 0, 0.3); + border-radius: 15px; + height: 16px; + overflow: hidden; + position: relative; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.emotion-bar-fill { + height: 100%; + border-radius: 15px; + transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); + position: relative; + overflow: hidden; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); +} + +.emotion-bar-fill::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); + animation: shimmer 3s infinite; +} + +.summary-stats { + display: flex; + justify-content: space-around; + margin-bottom: 25px; + gap: 20px; +} + +.stat-item { + text-align: center; + flex: 1; + background: rgba(255, 255, 255, 0.05); + border-radius: 12px; + padding: 15px; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; +} + +.stat-item:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-2px); +} + +.stat-item.highlight { + background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1)); + border: 2px solid rgba(139, 92, 246, 0.4); + box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2); +} + +.stat-value { + font-size: 1.8rem; + font-weight: 800; + color: #fbbf24; + margin-bottom: 8px; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.stat-item.highlight .stat-value { + color: #c084fc; + font-size: 2rem; +} + +.stat-label { + font-size: 0.8rem; + color: #cbd5e1; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: 600; +} + +.summary-bars { + display: flex; + flex-direction: column; + gap: 20px; +} + +.summary-bar { + margin-bottom: 20px; + background: rgba(255, 255, 255, 0.03); + border-radius: 12px; + padding: 15px; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; +} + +.summary-bar:hover { + background: rgba(255, 255, 255, 0.08); + transform: translateY(-1px); +} + +.bar-label { + font-weight: 700; + color: #f1f5f9; + margin-bottom: 12px; + font-size: 1rem; +} + +.bar-bg { + background: rgba(0, 0, 0, 0.3); + border-radius: 12px; + height: 24px; + overflow: hidden; + position: relative; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.bar-fill { + height: 100%; + border-radius: 12px; + transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); + position: relative; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); +} + +.bar-fill.original { + background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd); +} + +.bar-fill.summary { + background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7); +} + +.bar-value { + text-align: right; + font-size: 0.9rem; + color: #cbd5e1; + margin-top: 8px; + font-weight: 600; +} + +.chart-footer { + text-align: center; + margin-top: 20px; + padding-top: 20px; + border-top: 1px solid rgba(255, 255, 255, 0.1); + color: #94a3b8; + font-size: 0.85rem; +} + +/* Emotion Badges */ +.emotion-badge { + display: block; + padding: 8px 16px; + margin: 4px 0; + border-radius: 20px; + font-size: 0.9rem; + font-weight: 500; + transition: var(--transition-smooth); + text-align: center; + width: 100%; + box-sizing: border-box; +} + +.emotion-badge:hover { + transform: scale(1.05); +} + +/* Emotion Badges Container */ +#emotionBadges { + display: flex; + flex-direction: column; + gap: 8px; + margin-bottom: 20px; +} + +/* Audio Visualizer */ +.audio-visualizer { + width: 100%; + height: 60px; + background: var(--glass-bg); + border-radius: 10px; + display: flex; + align-items: center; + justify-content: center; + margin: 10px 0; +} + +.audio-bar { + width: 4px; + height: 20px; + background: var(--primary-color); + margin: 0 2px; + border-radius: 2px; + animation: audioPulse 0.5s ease-in-out infinite alternate; +} diff --git a/website/css/components/containers.css b/website/css/components/containers.css new file mode 100644 index 000000000..45e519a9b --- /dev/null +++ b/website/css/components/containers.css @@ -0,0 +1,68 @@ +/* Demo Container - Consolidated */ +.demo-container { + background: linear-gradient(135deg, + rgba(139, 92, 246, 0.12) 0%, + rgba(15, 15, 35, 0.95) 50%, + rgba(168, 85, 247, 0.08) 100%); + backdrop-filter: blur(20px); + border: 1px solid rgba(139, 92, 246, 0.2); + border-radius: 20px; + box-shadow: + var(--shadow-glass), + 0 0 40px rgba(139, 92, 246, 0.1); + padding: 3rem; + margin: 2rem 0; + width: 100%; + position: relative; + z-index: 1; + color: #e2e8f0; +} + +/* Scoped to demo container only */ +.demo-container .text-dark { + color: #e2e8f0; +} + +/* Hero Section */ +.hero-section::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: + radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%), + radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 50%), + radial-gradient(circle at 40% 80%, rgba(192, 132, 252, 0.2) 0%, transparent 50%); + animation: float 6s ease-in-out infinite; +} + +.hero-content { + position: relative; + z-index: 2; +} + +/* Ensure all text is visible - scoped to comprehensive demo */ +.comprehensive-demo .text-muted { + color: #cbd5e1 !important; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + .demo-container { + padding: 30px 20px; + margin: -50px 15px 30px 15px; + } + + .hero-section { + padding: 80px 0; + } +} + +@media (max-width: 576px) { + .demo-container { + padding: 20px 15px; + margin: -50px 10px 20px 10px; + } +} diff --git a/website/css/components/progress.css b/website/css/components/progress.css new file mode 100644 index 000000000..3d89120ba --- /dev/null +++ b/website/css/components/progress.css @@ -0,0 +1,332 @@ +/* Progress Steps and Pipelines */ +.progress-step { + display: flex; + align-items: center; +} + +/* Vertical Progress Pipeline */ +.progress-pipeline-vertical { + display: flex; + flex-direction: column; + align-items: center; + gap: 12px; /* Reduced from 20px for tighter spacing */ + padding: 25px 15px; /* Reduced padding */ + background: var(--glass-bg); + border-radius: 20px; + border: 1px solid rgba(255, 255, 255, 0.1); + min-height: 450px; /* Reduced height */ + justify-content: center; + width: 100%; +} + +.progress-step-vertical { + display: flex; + flex-direction: row; + align-items: center; + text-align: left; + padding: 16px 20px; /* Increased padding for better touch targets */ + border-radius: 15px; + transition: var(--transition-smooth); + min-width: 160px; /* Increased width */ + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + margin-bottom: 4px; /* Reduced margin */ + width: 100%; /* Full width for better appearance */ +} + +.progress-step-vertical .step-icon-small { + width: 24px !important; /* Increased from 18px */ + height: 24px !important; /* Increased from 18px */ + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 16px; /* Increased margin */ + margin-bottom: 0; + font-size: 0.8rem !important; /* Increased from 0.6rem */ + transition: var(--transition-smooth); + background: rgba(255, 255, 255, 0.1) !important; + color: #e2e8f0 !important; + border: 1px solid rgba(255, 255, 255, 0.2); + flex-shrink: 0; +} + +.progress-step-vertical .step-label { + font-size: 0.9rem; /* Increased from 0.7rem */ + font-weight: 600; + color: #e2e8f0; + transition: var(--transition-smooth); + text-align: left; /* Changed from center to left for better alignment */ + flex: 1; /* Take remaining space */ +} + +.progress-step-vertical.active .step-icon-small { + background: var(--primary-gradient) !important; + color: white !important; + box-shadow: var(--shadow-glow); +} + +.progress-step-vertical.completed .step-icon-small { + background: var(--success-color) !important; + color: white !important; +} + +.progress-step-vertical.error .step-icon-small { + background: var(--error-color) !important; + color: white !important; +} + +.pipeline-arrow-vertical { + font-size: 1.2rem; /* Slightly smaller */ + color: #94a3b8; /* Better color */ + margin: 2px 0; /* Reduced margin */ + opacity: 0.7; /* Subtle appearance */ + transition: var(--transition-smooth); +} + +.progress-step.completed { + background: rgba(16, 185, 129, 0.1); + border: 1px solid rgba(16, 185, 129, 0.3); +} + +.progress-step.active { + background: var(--primary-gradient); + color: white; +} + +.step-icon { + width: 30px; + height: 30px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 15px; + font-size: 14px; +} + +.step-icon.completed { + background: #10b981; + color: white; +} + +.step-icon.active { + background: white; + color: var(--primary-color); +} + +.step-icon.pending { + background: rgba(139, 92, 246, 0.2); + color: #94a3b8; +} + +/* Progress Pipeline - New Compact Horizontal Design */ +.progress-pipeline { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; + padding: 1.5rem; + background: var(--glass-bg); + border-radius: 15px; + border: 1px solid var(--glass-border); + max-width: 700px; + margin: 0 auto; +} + +/* Horizontal Progress Pipeline for Title Flow */ +.progress-pipeline-horizontal { + display: flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + padding: 0.5rem 1rem; + background: rgba(139, 92, 246, 0.05); + border-radius: 25px; + border: 1px solid rgba(139, 92, 246, 0.1); + backdrop-filter: blur(5px); + box-shadow: none; + opacity: 0.7; + transition: all 0.3s ease; +} + +.progress-pipeline-horizontal:hover { + opacity: 1; + background: rgba(139, 92, 246, 0.08); +} + +.progress-step-horizontal { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + min-width: 60px; + transition: var(--transition-smooth); +} + +.progress-step-horizontal .step-icon-small { + width: 18px !important; + height: 18px !important; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 0.25rem; + font-size: 0.7rem !important; + transition: var(--transition-smooth); + background: rgba(255, 255, 255, 0.1) !important; + color: #cbd5e1 !important; + border: 1px solid rgba(255, 255, 255, 0.15); + flex-shrink: 0; +} + +.progress-step-horizontal .step-label { + font-size: 0.65rem; + font-weight: 500; + color: #94a3b8; + white-space: nowrap; + transition: var(--transition-smooth); +} + +.progress-step-horizontal.active .step-icon-small { + background: var(--primary-gradient) !important; + color: white !important; + transform: scale(1.1); +} + +.progress-step-horizontal.active .step-label { + color: var(--primary-color); + font-weight: 600; +} + +.progress-step-horizontal.completed .step-icon-small { + background: #10b981 !important; + color: white !important; +} + +.progress-step-horizontal.completed .step-label { + color: #10b981; +} + +.pipeline-arrow { + font-size: 0.8rem; + color: #64748b; + font-weight: normal; + user-select: none; + opacity: 0.6; +} + +/* Enhanced Loading Step Styles */ +.process-step { + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 15px; + transition: all 0.3s ease; + text-align: center; +} + +.process-step.active { + background: rgba(139, 92, 246, 0.15); + border-color: rgba(139, 92, 246, 0.4); + transform: scale(1.02); +} + +.process-step.completed { + background: rgba(16, 185, 129, 0.15); + border-color: rgba(16, 185, 129, 0.4); +} + +.step-text { + font-weight: 600; + color: #e2e8f0; + font-size: 0.9rem; + margin-bottom: 8px; +} + +.step-status { + font-size: 0.8rem; + color: #94a3b8; + font-weight: 500; +} + +.process-step.active .step-status { + color: #a855f7; +} + +.process-step.completed .step-status { + color: #10b981; +} + +/* Processing Information Icons */ +.processing-info i { + font-size: 1.5rem !important; + margin-bottom: 8px; +} + +/* Responsive Design for Progress Pipeline */ +@media (max-width: 768px) { + .progress-pipeline { + flex-direction: column; + gap: 1.5rem; + padding: 2rem 1rem; + } + + .pipeline-arrow { + transform: rotate(90deg); + font-size: 1.5rem; + } + + .progress-step-horizontal { + min-width: 100px; + } + + .step-label { + font-size: 0.8rem; + } + + .progress-pipeline-horizontal { + gap: 0.25rem; + padding: 0.4rem 0.6rem; + justify-content: center; + } + + .progress-step-horizontal { + min-width: 40px; + } + + .progress-step-horizontal .step-icon-small { + width: 16px !important; + height: 16px !important; + font-size: 0.6rem !important; + } + + .progress-step-horizontal .step-label { + font-size: 0.5rem; + } + + .pipeline-arrow { + font-size: 0.7rem; + } +} + +@media (max-width: 1200px) { + .progress-pipeline-horizontal { + gap: 0.5rem; + padding: 0.8rem 1rem; + } + + .progress-pipeline-horizontal .step-label { + font-size: 0.7rem; + } + + #processingInfoSidebar { + margin-top: 2rem; + } +} + +@media (max-width: 576px) { + .progress-pipeline-horizontal { + padding: 0.5rem; + } +} From 1b8466fd09f42bc549caab16d086d21de6f75c5f Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 12:26:03 +0200 Subject: [PATCH 08/26] feat: add final component CSS files and documentation - Add messages.css for error and success message styling - Add responsive.css for media queries and responsive design - Add comprehensive README.md explaining the modular CSS architecture --- website/css/README.md | 59 +++++++++++++++++++++++++++ website/css/components/messages.css | 32 +++++++++++++++ website/css/components/responsive.css | 55 +++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 website/css/README.md create mode 100644 website/css/components/messages.css create mode 100644 website/css/components/responsive.css diff --git a/website/css/README.md b/website/css/README.md new file mode 100644 index 000000000..3ce7d3ea9 --- /dev/null +++ b/website/css/README.md @@ -0,0 +1,59 @@ +# CSS Architecture - Modular Component Structure + +This directory contains a modular CSS architecture that addresses code review feedback +for improved maintainability and performance. + +## Structure + +### Main Files + +- `main.css` - Main entry point that imports all component stylesheets +- `comprehensive-demo.css` - Original monolithic file (kept for reference) + +### Component Files (`components/` directory) + +- `variables.css` - CSS custom properties and design system variables +- `base.css` - Base styles, typography, and global elements +- `navigation.css` - Navigation bar and menu styles +- `buttons.css` - Button components and interactive elements +- `forms.css` - Form controls and input styling +- `containers.css` - Layout containers and hero sections +- `cards.css` - Feature cards and content cards +- `progress.css` - Progress indicators and pipeline components +- `charts.css` - Data visualization and chart components +- `messages.css` - Error and success message styling +- `animations.css` - Keyframes, transitions, and animation effects +- `responsive.css` - Media queries and responsive design rules + +## Benefits + +1. **Improved Maintainability**: Each component is isolated and easier to modify +2. **Better Performance**: Mobile-specific optimizations (e.g., disabled + `background-attachment: fixed`) +3. **Reduced Redundancy**: Consolidated duplicate rules and eliminated conflicts +4. **Enhanced Readability**: Logical organization makes code easier to understand +5. **Scalability**: Easy to add new components without affecting existing styles + +## Usage + +Simply include `main.css` in your HTML: + +```html + +``` + +The main.css file automatically imports all component stylesheets in the correct order. + +## Performance Optimizations + +- Mobile devices use `background-attachment: scroll` instead of `fixed` for better + performance +- Consolidated duplicate CSS rules to reduce file size +- Optimized favicon.ico for better loading performance +- Modular structure allows for better caching strategies + +## Browser Support + +- Modern browsers with CSS custom properties support +- Graceful degradation for older browsers +- Mobile-first responsive design approach diff --git a/website/css/components/messages.css b/website/css/components/messages.css new file mode 100644 index 000000000..0492e3da2 --- /dev/null +++ b/website/css/components/messages.css @@ -0,0 +1,32 @@ +/* Error and Success Messages */ +.error-message { + color: #ef4444; + font-size: 0.875rem; + margin-top: 8px; + padding: 8px 12px; + background: rgba(239, 68, 68, 0.1); + border: 1px solid rgba(239, 68, 68, 0.2); + border-radius: 8px; + display: none; +} + +.error-message.show { + display: block; + animation: fadeInUp 0.3s ease-out; +} + +.success-message { + color: #10b981; + font-size: 0.875rem; + margin-top: 8px; + padding: 8px 12px; + background: rgba(16, 185, 129, 0.1); + border: 1px solid rgba(16, 185, 129, 0.2); + border-radius: 8px; + display: none; +} + +.success-message.show { + display: block; + animation: fadeInUp 0.3s ease-out; +} diff --git a/website/css/components/responsive.css b/website/css/components/responsive.css new file mode 100644 index 000000000..1999414d0 --- /dev/null +++ b/website/css/components/responsive.css @@ -0,0 +1,55 @@ +/* Responsive Design and Media Queries */ + +/* Debug section responsive behavior */ +@media (max-width: 992px) { + #debugTestSection { + margin-top: 1rem; + } +} + +/* Stack title and flow vertically on mobile */ +@media (max-width: 768px) { + #titleWithFlow .d-flex { + flex-direction: column; + gap: 0.75rem; + text-align: center; + } + + /* Stack buttons vertically on mobile */ + .d-flex.gap-3.justify-content-center { + flex-direction: column; + align-items: center; + gap: 0.75rem !important; + } + + /* Full width input on mobile */ + #textInput { + min-height: 180px !important; + padding: 1rem; + } + + /* Compact processing info on mobile */ + #processingInfoSidebar .bg-dark { + padding: 0.5rem !important; + } + + /* Results layout adjustments */ + #resultsLayout .col-lg-8, + #resultsLayout .col-lg-4 { + flex: 0 0 100%; + max-width: 100%; + } +} + +@media (max-width: 576px) { + /* Full width input on mobile */ + #textInput { + min-height: 160px !important; + font-size: 14px; + } +} + +/* Debug Test Section Toggleable */ +#debugTestSection.hidden { + display: none !important; +} From c5fde3faab86a26f323d415a79efd42a00837ad2 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 15:51:10 +0200 Subject: [PATCH 09/26] Fix emotion model ID configuration to use DeBERTa instead of DistilRoBERTa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update EMOTION_MODEL_ID default from '0xmnrv/samo' to 'duelker/samo-goemotions-deberta-v3-large' across 5 critical files to ensure Cloud Run services use the correct fine-tuned model. Files changed: - src/unified_ai_api.py: Main API model loading - scripts/deployment/bake_emotion_model.py: Model baking script - scripts/deployment/patch_config_and_upload.py: Config patching - scripts/maintenance/infer_mapping_and_eval.py: Evaluation script - scripts/maintenance/metrics_test.py: Metrics testing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- scripts/deployment/bake_emotion_model.py | 4 ++-- scripts/deployment/patch_config_and_upload.py | 2 +- scripts/maintenance/infer_mapping_and_eval.py | 2 +- scripts/maintenance/metrics_test.py | 2 +- src/unified_ai_api.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/deployment/bake_emotion_model.py b/scripts/deployment/bake_emotion_model.py index 84a8aa6cf..8ae891e9d 100644 --- a/scripts/deployment/bake_emotion_model.py +++ b/scripts/deployment/bake_emotion_model.py @@ -11,7 +11,7 @@ def main() -> int: - model_id = os.environ.get("EMOTION_MODEL_ID", "0xmnrv/samo") + model_id = os.environ.get("EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") token = os.environ.get("HF_TOKEN") if token and login is not None: @@ -34,4 +34,4 @@ def main() -> int: if __name__ == "__main__": - raise SystemExit(main()) \ No newline at end of file + raise SystemExit(main()) diff --git a/scripts/deployment/patch_config_and_upload.py b/scripts/deployment/patch_config_and_upload.py index 429b3afcb..31b2af6a3 100644 --- a/scripts/deployment/patch_config_and_upload.py +++ b/scripts/deployment/patch_config_and_upload.py @@ -5,7 +5,7 @@ from transformers import AutoConfig from huggingface_hub import HfApi, HfFolder -MODEL_ID = os.getenv("MODEL_ID", "0xmnrv/samo") +MODEL_ID = os.getenv("MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") # Get token from environment or local storage TOKEN = os.getenv("HF_TOKEN") diff --git a/scripts/maintenance/infer_mapping_and_eval.py b/scripts/maintenance/infer_mapping_and_eval.py index 9922c9506..736933a5c 100644 --- a/scripts/maintenance/infer_mapping_and_eval.py +++ b/scripts/maintenance/infer_mapping_and_eval.py @@ -7,7 +7,7 @@ from sklearn.metrics import f1_score, accuracy_score from scipy.optimize import linear_sum_assignment -MODEL_ID = os.getenv("MODEL_ID", "0xmnrv/samo") +MODEL_ID = os.getenv("MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_HUB_TOKEN") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") BATCH = int(os.getenv("BATCH_SIZE", "32")) diff --git a/scripts/maintenance/metrics_test.py b/scripts/maintenance/metrics_test.py index 74a5624f9..8920285d4 100644 --- a/scripts/maintenance/metrics_test.py +++ b/scripts/maintenance/metrics_test.py @@ -9,7 +9,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification from sklearn.metrics import f1_score, accuracy_score -MODEL_ID = os.getenv("MODEL_ID", "0xmnrv/samo") +MODEL_ID = os.getenv("MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_HUB_TOKEN") DEVICE = "cuda" if torch.cuda.is_available() else "cpu" BATCH = int(os.getenv("BATCH_SIZE", "32")) diff --git a/src/unified_ai_api.py b/src/unified_ai_api.py index d39ec4e6c..d2bab6714 100644 --- a/src/unified_ai_api.py +++ b/src/unified_ai_api.py @@ -402,7 +402,7 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]: from src.models.emotion_detection.hf_loader import ( load_emotion_model_multi_source ) - hf_model_id = os.getenv("EMOTION_MODEL_ID", "0xmnrv/samo") + hf_model_id = os.getenv("EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") hf_token = os.getenv("HF_TOKEN") local_dir = os.getenv("EMOTION_MODEL_LOCAL_DIR") archive_url = os.getenv("EMOTION_MODEL_ARCHIVE_URL") From f62e084f27fe1a8cb591ed1865cd00f00aa67e98 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 15:51:27 +0200 Subject: [PATCH 10/26] Fix model ID in HF serverless smoke test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update HF_REPO default from '0xmnrv/samo' to 'duelker/samo-goemotions-deberta-v3-large' in the serverless testing script to ensure consistency across all testing tools. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- scripts/testing/hf_serverless_smoke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/testing/hf_serverless_smoke.py b/scripts/testing/hf_serverless_smoke.py index e776c8dba..ab4b9916d 100644 --- a/scripts/testing/hf_serverless_smoke.py +++ b/scripts/testing/hf_serverless_smoke.py @@ -7,7 +7,7 @@ import requests -HF_REPO = os.getenv("HF_REPO", "0xmnrv/samo") +HF_REPO = os.getenv("HF_REPO", "duelker/samo-goemotions-deberta-v3-large") HF_TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_TOKEN") API_URL = f"https://api-inference.huggingface.co/models/{HF_REPO}" From da69c8e7162fae1f39f94480f5c0a63bb2e0fb2e Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:00:34 +0200 Subject: [PATCH 11/26] fix: resolve line length violations (FLK-E501) - Fix 103-character line in src/unified_ai_api.py by breaking long import and assignment statements - Fix 93-character line in scripts/deployment/bake_emotion_model.py by breaking long os.environ.get() call - All lines now comply with 88-character limit --- scripts/deployment/bake_emotion_model.py | 4 +++- src/unified_ai_api.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/deployment/bake_emotion_model.py b/scripts/deployment/bake_emotion_model.py index 8ae891e9d..a4e78f1a9 100644 --- a/scripts/deployment/bake_emotion_model.py +++ b/scripts/deployment/bake_emotion_model.py @@ -11,7 +11,9 @@ def main() -> int: - model_id = os.environ.get("EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") + model_id = os.environ.get( + "EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large" + ) token = os.environ.get("HF_TOKEN") if token and login is not None: diff --git a/src/unified_ai_api.py b/src/unified_ai_api.py index d2bab6714..b72e5be80 100644 --- a/src/unified_ai_api.py +++ b/src/unified_ai_api.py @@ -399,10 +399,11 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]: try: # Prefer loading our HF Hub model; fallback to local BERT if unavailable try: - from src.models.emotion_detection.hf_loader import ( + from src.models.emotion_detection.hf_loader import \ load_emotion_model_multi_source + hf_model_id = os.getenv( + "EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large" ) - hf_model_id = os.getenv("EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") hf_token = os.getenv("HF_TOKEN") local_dir = os.getenv("EMOTION_MODEL_LOCAL_DIR") archive_url = os.getenv("EMOTION_MODEL_ARCHIVE_URL") From 071a49e23dd976bf34e8911f1ca2e29c0d4827de Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:04:36 +0200 Subject: [PATCH 12/26] feat: add centralized emotion model ID constant - Add DEFAULT_EMOTION_MODEL_ID to src/constants.py - Update unified_ai_api.py to use centralized constant - Standardize environment variable name to EMOTION_MODEL_ID --- src/constants.py | 3 +++ src/unified_ai_api.py | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/constants.py b/src/constants.py index 8e94148a1..cc5c2aed9 100644 --- a/src/constants.py +++ b/src/constants.py @@ -8,3 +8,6 @@ # Emotion model configuration DEFAULT_EMOTION_MODEL_DIR = "/app/models/emotion-english-distilroberta-base" EMOTION_MODEL_DIR = os.getenv("EMOTION_MODEL_DIR", DEFAULT_EMOTION_MODEL_DIR) + +# Default emotion model ID for HuggingFace Hub +DEFAULT_EMOTION_MODEL_ID = "duelker/samo-goemotions-deberta-v3-large" diff --git a/src/unified_ai_api.py b/src/unified_ai_api.py index b72e5be80..fe5cb60e2 100644 --- a/src/unified_ai_api.py +++ b/src/unified_ai_api.py @@ -401,9 +401,8 @@ async def lifespan(_: FastAPI) -> AsyncGenerator[None, None]: try: from src.models.emotion_detection.hf_loader import \ load_emotion_model_multi_source - hf_model_id = os.getenv( - "EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large" - ) + from .constants import DEFAULT_EMOTION_MODEL_ID + hf_model_id = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) hf_token = os.getenv("HF_TOKEN") local_dir = os.getenv("EMOTION_MODEL_LOCAL_DIR") archive_url = os.getenv("EMOTION_MODEL_ARCHIVE_URL") From de24be44cb7eb8e0fe49b72ec70b5982a5e30dd1 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:04:54 +0200 Subject: [PATCH 13/26] fix: update deployment scripts to use standardized EMOTION_MODEL_ID - Update bake_emotion_model.py and patch_config_and_upload.py - Use centralized DEFAULT_EMOTION_MODEL_ID constant - Standardize environment variable names across deployment scripts --- scripts/deployment/bake_emotion_model.py | 5 ++--- scripts/deployment/patch_config_and_upload.py | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/deployment/bake_emotion_model.py b/scripts/deployment/bake_emotion_model.py index a4e78f1a9..67fc736c3 100644 --- a/scripts/deployment/bake_emotion_model.py +++ b/scripts/deployment/bake_emotion_model.py @@ -3,6 +3,7 @@ import sys from transformers import AutoTokenizer, AutoModelForSequenceClassification +from src.constants import DEFAULT_EMOTION_MODEL_ID try: from huggingface_hub import login # type: ignore @@ -11,9 +12,7 @@ def main() -> int: - model_id = os.environ.get( - "EMOTION_MODEL_ID", "duelker/samo-goemotions-deberta-v3-large" - ) + model_id = os.environ.get("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) token = os.environ.get("HF_TOKEN") if token and login is not None: diff --git a/scripts/deployment/patch_config_and_upload.py b/scripts/deployment/patch_config_and_upload.py index 31b2af6a3..94c51e5c0 100644 --- a/scripts/deployment/patch_config_and_upload.py +++ b/scripts/deployment/patch_config_and_upload.py @@ -4,8 +4,14 @@ import tempfile from transformers import AutoConfig from huggingface_hub import HfApi, HfFolder +import sys +import os + +# Add src to path to import constants +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) +from src.constants import DEFAULT_EMOTION_MODEL_ID -MODEL_ID = os.getenv("MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") +MODEL_ID = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) # Get token from environment or local storage TOKEN = os.getenv("HF_TOKEN") From 74127d9e3467f5656a434c24fca996c16c9d7e4a Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:05:05 +0200 Subject: [PATCH 14/26] fix: update maintenance scripts to use EMOTION_MODEL_ID - Update metrics_test.py and infer_mapping_and_eval.py - Use centralized DEFAULT_EMOTION_MODEL_ID constant - Standardize environment variable names for consistency --- scripts/maintenance/infer_mapping_and_eval.py | 7 ++++++- scripts/maintenance/metrics_test.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/maintenance/infer_mapping_and_eval.py b/scripts/maintenance/infer_mapping_and_eval.py index 736933a5c..43cf3e2b2 100644 --- a/scripts/maintenance/infer_mapping_and_eval.py +++ b/scripts/maintenance/infer_mapping_and_eval.py @@ -1,4 +1,5 @@ import os +import sys import numpy as np import torch from tqdm import tqdm @@ -7,7 +8,11 @@ from sklearn.metrics import f1_score, accuracy_score from scipy.optimize import linear_sum_assignment -MODEL_ID = os.getenv("MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") +# Add src to path to import constants +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) +from src.constants import DEFAULT_EMOTION_MODEL_ID + +MODEL_ID = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_HUB_TOKEN") DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") BATCH = int(os.getenv("BATCH_SIZE", "32")) diff --git a/scripts/maintenance/metrics_test.py b/scripts/maintenance/metrics_test.py index 8920285d4..b86744614 100644 --- a/scripts/maintenance/metrics_test.py +++ b/scripts/maintenance/metrics_test.py @@ -2,6 +2,7 @@ # pip install -U transformers datasets scikit-learn torch tqdm huggingface_hub import os +import sys import numpy as np import torch from tqdm import tqdm @@ -9,7 +10,11 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification from sklearn.metrics import f1_score, accuracy_score -MODEL_ID = os.getenv("MODEL_ID", "duelker/samo-goemotions-deberta-v3-large") +# Add src to path to import constants +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) +from src.constants import DEFAULT_EMOTION_MODEL_ID + +MODEL_ID = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_HUB_TOKEN") DEVICE = "cuda" if torch.cuda.is_available() else "cpu" BATCH = int(os.getenv("BATCH_SIZE", "32")) From 2c0635874c0efd6c2200c10fa2f3278de74e3f58 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:05:16 +0200 Subject: [PATCH 15/26] fix: update testing script to use EMOTION_MODEL_ID - Update hf_serverless_smoke.py to use standardized environment variable - Use centralized DEFAULT_EMOTION_MODEL_ID constant - Maintains consistency across all scripts --- scripts/testing/hf_serverless_smoke.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/testing/hf_serverless_smoke.py b/scripts/testing/hf_serverless_smoke.py index ab4b9916d..661116498 100644 --- a/scripts/testing/hf_serverless_smoke.py +++ b/scripts/testing/hf_serverless_smoke.py @@ -7,7 +7,11 @@ import requests -HF_REPO = os.getenv("HF_REPO", "duelker/samo-goemotions-deberta-v3-large") +# Add src to path to import constants +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) +from src.constants import DEFAULT_EMOTION_MODEL_ID + +HF_REPO = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) HF_TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_TOKEN") API_URL = f"https://api-inference.huggingface.co/models/{HF_REPO}" From 803a69248a786e0c11b4a8edddd0cf2034414275 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:05:27 +0200 Subject: [PATCH 16/26] fix: improve CSS maintainability and remove redundancy - Remove redundant transition properties in animations.css (kept only in media query) - Replace !important declarations in forms.css with more specific .demo-container selectors - Update CSS README to reflect removal of comprehensive-demo.css - Improves CSS specificity and reduces maintenance overhead --- website/css/README.md | 1 - website/css/components/animations.css | 13 ------------- website/css/components/forms.css | 17 +++++++++-------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/website/css/README.md b/website/css/README.md index 3ce7d3ea9..ecf468e7c 100644 --- a/website/css/README.md +++ b/website/css/README.md @@ -8,7 +8,6 @@ for improved maintainability and performance. ### Main Files - `main.css` - Main entry point that imports all component stylesheets -- `comprehensive-demo.css` - Original monolithic file (kept for reference) ### Component Files (`components/` directory) diff --git a/website/css/components/animations.css b/website/css/components/animations.css index b79b3fe01..e21c89f54 100644 --- a/website/css/components/animations.css +++ b/website/css/components/animations.css @@ -66,19 +66,6 @@ display: block; } -/* Dynamic Layout States */ -#inputLayout { - transition: all 0.5s ease-in-out; -} - -#resultsLayout { - transition: all 0.5s ease-in-out; -} - -#titleWithFlow { - transition: all 0.3s ease-in-out; -} - /* Enhanced transitions for responsive changes */ @media (prefers-reduced-motion: no-preference) { #titleWithFlow, diff --git a/website/css/components/forms.css b/website/css/components/forms.css index 3f28cef36..15838aa2d 100644 --- a/website/css/components/forms.css +++ b/website/css/components/forms.css @@ -1,18 +1,19 @@ /* Form Controls and Input Styling */ -#textInput { - min-height: 240px !important; +/* Scoped text input styling to demo container for higher specificity */ +.demo-container #textInput { + min-height: 240px; font-size: 16px; line-height: 1.5; resize: vertical; padding: 1.5rem; /* Increased padding for better appearance */ - background-color: rgba(255, 255, 255, 0.12) !important; /* More prominent background */ - border: 2px solid rgba(139, 92, 246, 0.3) !important; /* Thicker border */ + background-color: rgba(255, 255, 255, 0.12); /* More prominent background */ + border: 2px solid rgba(139, 92, 246, 0.3); /* Thicker border */ } -#textInput:focus { - background-color: rgba(255, 255, 255, 0.18) !important; - border-color: var(--primary-color) !important; - box-shadow: 0 0 0 0.3rem rgba(139, 92, 246, 0.25) !important; +.demo-container #textInput:focus { + background-color: rgba(255, 255, 255, 0.18); + border-color: var(--primary-color); + box-shadow: 0 0 0 0.3rem rgba(139, 92, 246, 0.25); transform: scale(1.01); /* Subtle scale on focus */ } From c3ec29d3df526ba716b12760e5bc49fd3ea2d31d Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:05:38 +0200 Subject: [PATCH 17/26] refactor: remove redundant comprehensive-demo.css file - Delete monolithic CSS file that duplicated component styles - All styles are now properly imported via main.css component system - Eliminates maintenance overhead and potential inconsistencies - Addresses code review feedback about duplicate sources of truth --- website/css/comprehensive-demo.css | 1213 ---------------------------- 1 file changed, 1213 deletions(-) delete mode 100644 website/css/comprehensive-demo.css diff --git a/website/css/comprehensive-demo.css b/website/css/comprehensive-demo.css deleted file mode 100644 index 1073ba403..000000000 --- a/website/css/comprehensive-demo.css +++ /dev/null @@ -1,1213 +0,0 @@ -/* Comprehensive Demo Styles - Extracted from HTML for better maintainability */ - -/* CSS Variables */ -:root { - --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%); - --secondary-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); - --dark-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%); - --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c084fc 100%); - - --primary-color: #8b5cf6; - --secondary-color: #a855f7; - --accent-color: #c084fc; - --dark-color: #0f0f23; - --darker-color: #0a0a1a; - --light-accent: #e9d5ff; - --glass-bg: rgba(139, 92, 246, 0.1); - --glass-border: rgba(139, 92, 246, 0.2); - --error-color: #ef4444; - --success-color: #10b981; - - --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); - --shadow-glow: 0 10px 40px rgba(139, 92, 246, 0.3); - --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3); -} - -/* Material Icons styling */ -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; - line-height: 1; - letter-spacing: normal; - text-transform: none; - display: inline-block; - white-space: nowrap; - word-wrap: normal; - direction: ltr; - -webkit-font-feature-settings: 'liga'; - -webkit-font-smoothing: antialiased; - vertical-align: middle; -} - -/* Info icon styling */ -.info-icon { - font-size: 16px !important; - color: #6b7280; - margin-left: 6px; - cursor: help; - opacity: 0.7; - transition: var(--transition-smooth); - vertical-align: middle; -} - -.info-icon:hover { - color: var(--primary-color); - opacity: 1; - transform: scale(1.1); -} - -/* Text input styling - consolidated below */ - -/* Base Styles */ -body.comprehensive-demo { - font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; - line-height: 1.6; - color: #e2e8f0; - background: var(--dark-gradient); - background-attachment: fixed; - min-height: 100vh; - padding-top: 80px; /* Account for fixed navbar */ -} - -/* Mobile Responsive Design - Consolidated */ -@media (max-width: 768px) { - body.comprehensive-demo { - background-attachment: scroll; - } - - .progress-pipeline { - flex-direction: column; - gap: 1.5rem; - padding: 2rem 1rem; - } - - .pipeline-arrow { - transform: rotate(90deg); - font-size: 1.5rem; - } - - .progress-step-horizontal { - min-width: 100px; - } - - .progress-step-horizontal .step-label { - font-size: 0.8rem; - } - - .demo-container { - padding: 30px 20px; - margin: -50px 15px 30px 15px; - } - - .hero-section { - padding: 80px 0; - } - - /* Stack title and flow vertically on mobile */ - #titleWithFlow .d-flex { - flex-direction: column; - gap: 0.75rem; - text-align: center; - } - - .progress-pipeline-horizontal { - gap: 0.25rem; - padding: 0.4rem 0.6rem; - justify-content: center; - } - - .progress-step-horizontal { - min-width: 40px; - } - - .progress-step-horizontal .step-icon-small { - width: 16px !important; - height: 16px !important; - font-size: 0.6rem !important; - } - - .progress-step-horizontal .step-label { - font-size: 0.5rem; - } - - .pipeline-arrow { - font-size: 0.7rem; - } - - /* Stack buttons vertically on mobile */ - .d-flex.gap-3.justify-content-center { - flex-direction: column; - align-items: center; - gap: 0.75rem !important; - } - - .btn-lg { - min-width: 200px; - width: 100%; - max-width: 300px; - } - - /* Full width input on mobile */ - #textInput { - min-height: 180px !important; - padding: 1rem; - } - - /* Compact processing info on mobile */ - #processingInfoSidebar .bg-dark { - padding: 0.5rem !important; - } - - #processingInfoSidebar .feature-card { - padding: 1rem; - } - - /* Results layout adjustments */ - #resultsLayout .col-lg-8, - #resultsLayout .col-lg-4 { - flex: 0 0 100%; - max-width: 100%; - } -} - -/* Result sections */ -.result-section-hidden { - display: none !important; -} - -.result-section-visible { - display: block; - animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1); -} - -/* Ensure all text is visible - scoped to comprehensive demo */ -.comprehensive-demo .text-muted { - color: #cbd5e1 !important; -} - -/* Scoped to demo container only */ -.demo-container .text-dark { - color: #e2e8f0; -} - -/* Feature card text improvements */ -.feature-card .text-muted { - color: #cbd5e1 !important; -} - -.feature-card h5, .feature-card h6 { - color: #f1f5f9 !important; -} - -.feature-card small { - color: #cbd5e1 !important; -} - -/* Scoped form controls to demo container */ -.demo-container .form-control { - color: #e2e8f0; - background-color: rgba(255, 255, 255, 0.1); - border-color: rgba(139, 92, 246, 0.3); -} - -.demo-container .form-control:focus { - color: #e2e8f0; - background-color: rgba(255, 255, 255, 0.15); - border-color: var(--primary-color); - box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25); -} - -.comprehensive-demo .form-control::placeholder { - color: #94a3b8 !important; -} - -/* Hero Section */ -.hero-section::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: - radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%), - radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.2) 0%, transparent 50%), - radial-gradient(circle at 40% 80%, rgba(192, 132, 252, 0.2) 0%, transparent 50%); - animation: float 6s ease-in-out infinite; -} - -.hero-content { - position: relative; - z-index: 2; -} - -/* Demo Container - Consolidated */ - -/* Feature Cards - Consolidated */ - -/* Navigation */ -.comprehensive-demo .navbar { - background: rgba(15, 15, 35, 0.95); - backdrop-filter: blur(20px); - border-bottom: 1px solid var(--glass-border); -} - -.comprehensive-demo .navbar-brand, .comprehensive-demo .navbar .nav-link { - color: #e2e8f0; -} - -/* Buttons */ -.comprehensive-demo .btn-primary { - background: var(--primary-gradient); - border: none; - border-radius: 12px; - padding: 12px 30px; - font-weight: 600; - transition: var(--transition-bounce); - box-shadow: var(--shadow-glow); -} - -.comprehensive-demo .btn-primary:hover { - transform: translateY(-2px) scale(1.05); - box-shadow: 0 15px 50px rgba(139, 92, 246, 0.4); -} - -.comprehensive-demo .btn:focus-visible { - outline: 3px solid #667eea; - outline-offset: 2px; -} - -/* Form Controls - consolidated with scoped rules above */ - -/* Focus styles consolidated with scoped rules above */ - -.demo-container .form-control::placeholder { - color: #94a3b8; -} - -/* Loading States */ -.loading-spinner { - display: none; - color: #e2e8f0; -} - -.loading-spinner.show { - display: block; -} - -/* Result Sections */ -.result-section { - display: none; -} - -/* Ensure icons are visible in results */ -.feature-card h5 i { - font-size: 1.2rem; - margin-right: 8px; -} - -/* Processing Information Icons */ -.processing-info i { - font-size: 1.5rem !important; - margin-bottom: 8px; -} - -.result-section.show { - display: block; - animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1); -} - -/* Animations */ -@keyframes fadeInUp { - from { - opacity: 0; - transform: translateY(40px) scale(0.95); - } - to { - opacity: 1; - transform: translateY(0) scale(1); - } -} - -@keyframes float { - 0%, 100% { transform: translateY(0px) rotate(0deg); } - 33% { transform: translateY(-20px) rotate(1deg); } - 66% { transform: translateY(-10px) rotate(-1deg); } -} - -.floating-card { - animation: float 6s ease-in-out infinite; -} - -/* Text Effects */ -.gradient-text { - background: var(--primary-gradient); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; -} - -/* Emotion Badges */ -.emotion-badge { - display: block; - padding: 8px 16px; - margin: 4px 0; - border-radius: 20px; - font-size: 0.9rem; - font-weight: 500; - transition: var(--transition-smooth); - text-align: center; - width: 100%; - box-sizing: border-box; -} - -.emotion-badge:hover { - transform: scale(1.05); -} - -/* Emotion Badges Container */ -#emotionBadges { - display: flex; - flex-direction: column; - gap: 8px; - margin-bottom: 20px; -} - -/* Audio Visualizer */ -.audio-visualizer { - width: 100%; - height: 60px; - background: var(--glass-bg); - border-radius: 10px; - display: flex; - align-items: center; - justify-content: center; - margin: 10px 0; -} - -.audio-bar { - width: 4px; - height: 20px; - background: var(--primary-color); - margin: 0 2px; - border-radius: 2px; - animation: audioPulse 0.5s ease-in-out infinite alternate; -} - -@keyframes audioPulse { - 0% { height: 20px; } - 100% { height: 40px; } -} - -/* Reduced motion rules consolidated above */ - -/* Progress Steps */ -.progress-step { - display: flex; - align-items: center; -} - -/* Vertical Progress Pipeline */ -.progress-pipeline-vertical { - display: flex; - flex-direction: column; - align-items: center; - gap: 12px; /* Reduced from 20px for tighter spacing */ - padding: 25px 15px; /* Reduced padding */ - background: var(--glass-bg); - border-radius: 20px; - border: 1px solid rgba(255, 255, 255, 0.1); - min-height: 450px; /* Reduced height */ - justify-content: center; - width: 100%; -} - -.progress-step-vertical { - display: flex; - flex-direction: row; - align-items: center; - text-align: left; - padding: 16px 20px; /* Increased padding for better touch targets */ - border-radius: 15px; - transition: var(--transition-smooth); - min-width: 160px; /* Increased width */ - background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.1); - margin-bottom: 4px; /* Reduced margin */ - width: 100%; /* Full width for better appearance */ -} - -.progress-step-vertical .step-icon-small { - width: 24px !important; /* Increased from 18px */ - height: 24px !important; /* Increased from 18px */ - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - margin-right: 16px; /* Increased margin */ - margin-bottom: 0; - font-size: 0.8rem !important; /* Increased from 0.6rem */ - transition: var(--transition-smooth); - background: rgba(255, 255, 255, 0.1) !important; - color: #e2e8f0 !important; - border: 1px solid rgba(255, 255, 255, 0.2); - flex-shrink: 0; -} - -.progress-step-vertical .step-label { - font-size: 0.9rem; /* Increased from 0.7rem */ - font-weight: 600; - color: #e2e8f0; - transition: var(--transition-smooth); - text-align: left; /* Changed from center to left for better alignment */ - flex: 1; /* Take remaining space */ -} - -.progress-step-vertical.active .step-icon-small { - background: var(--primary-gradient) !important; - color: white !important; - box-shadow: var(--shadow-glow); -} - -.progress-step-vertical.completed .step-icon-small { - background: var(--success-color) !important; - color: white !important; -} - -.progress-step-vertical.error .step-icon-small { - background: var(--error-color) !important; - color: white !important; -} - -.pipeline-arrow-vertical { - font-size: 1.2rem; /* Slightly smaller */ - color: #94a3b8; /* Better color */ - margin: 2px 0; /* Reduced margin */ - opacity: 0.7; /* Subtle appearance */ - transition: var(--transition-smooth); -} - -.progress-step.completed { - background: rgba(16, 185, 129, 0.1); - border: 1px solid rgba(16, 185, 129, 0.3); -} - -.progress-step.active { - background: var(--primary-gradient); - color: white; -} - -.step-icon { - width: 30px; - height: 30px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - margin-right: 15px; - font-size: 14px; -} - -.step-icon.completed { - background: #10b981; - color: white; -} - -.step-icon.active { - background: white; - color: var(--primary-color); -} - -.step-icon.pending { - background: rgba(139, 92, 246, 0.2); - color: #94a3b8; -} - -/* Progress Pipeline - New Compact Horizontal Design */ -.progress-pipeline { - display: flex; - align-items: center; - justify-content: center; - gap: 1rem; - padding: 1.5rem; - background: var(--glass-bg); - border-radius: 15px; - border: 1px solid var(--glass-border); - max-width: 700px; - margin: 0 auto; -} - -/* Horizontal Progress Pipeline for Title Flow */ -.progress-pipeline-horizontal { - display: flex; - align-items: center; - justify-content: center; - gap: 0.5rem; - padding: 0.5rem 1rem; - background: rgba(139, 92, 246, 0.05); - border-radius: 25px; - border: 1px solid rgba(139, 92, 246, 0.1); - backdrop-filter: blur(5px); - box-shadow: none; - opacity: 0.7; - transition: all 0.3s ease; -} - -.progress-pipeline-horizontal:hover { - opacity: 1; - background: rgba(139, 92, 246, 0.08); -} - -/* Dynamic Layout States */ -#inputLayout { - transition: all 0.5s ease-in-out; -} - -#resultsLayout { - transition: all 0.5s ease-in-out; -} - -#titleWithFlow { - transition: all 0.3s ease-in-out; -} - -/* Enhanced Feature Cards with Better Background Prominence */ -.feature-card { - background: linear-gradient(135deg, - rgba(139, 92, 246, 0.15) 0%, - rgba(168, 85, 247, 0.12) 50%, - rgba(192, 132, 252, 0.1) 100%); - backdrop-filter: blur(15px); - border: 1px solid rgba(139, 92, 246, 0.25); - border-radius: 20px; - box-shadow: var(--shadow-glass); - transition: var(--transition-bounce); - color: #e2e8f0; - height: 100%; - padding: 2rem; /* Increased padding for better background-to-text ratio */ - min-height: 140px; /* Ensure minimum height for prominence */ - position: relative; -} - -/* Add subtle glow effect to feature cards */ -.feature-card::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: linear-gradient(135deg, - rgba(139, 92, 246, 0.05), - rgba(168, 85, 247, 0.03), - rgba(192, 132, 252, 0.02)); - border-radius: 20px; - z-index: -1; - opacity: 0; - transition: opacity 0.3s ease; -} - -.feature-card:hover::before { - opacity: 1; -} - -/* Enhanced demo container background */ -.demo-container { - background: linear-gradient(135deg, - rgba(139, 92, 246, 0.12) 0%, - rgba(15, 15, 35, 0.95) 50%, - rgba(168, 85, 247, 0.08) 100%); - backdrop-filter: blur(20px); - border: 1px solid rgba(139, 92, 246, 0.2); - border-radius: 20px; - box-shadow: - var(--shadow-glass), - 0 0 40px rgba(139, 92, 246, 0.1); - padding: 3rem; - margin: 2rem 0; - width: 100%; - position: relative; - z-index: 1; - color: #e2e8f0; -} - -/* Enhanced Loading Step Styles */ -.process-step { - background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 12px; - padding: 15px; - transition: all 0.3s ease; - text-align: center; -} - -.process-step.active { - background: rgba(139, 92, 246, 0.15); - border-color: rgba(139, 92, 246, 0.4); - transform: scale(1.02); -} - -.process-step.completed { - background: rgba(16, 185, 129, 0.15); - border-color: rgba(16, 185, 129, 0.4); -} - -.step-text { - font-weight: 600; - color: #e2e8f0; - font-size: 0.9rem; - margin-bottom: 8px; -} - -.step-status { - font-size: 0.8rem; - color: #94a3b8; - font-weight: 500; -} - -.process-step.active .step-status { - color: #a855f7; -} - -.process-step.completed .step-status { - color: #10b981; -} - -/* Processing Information Compact Styles */ -#processingInfoSidebar .feature-card { - min-height: auto; -} - -#processingInfoSidebar .bg-dark { - transition: all 0.2s ease; -} - -#processingInfoSidebar .bg-dark:hover { - background-color: rgba(0, 0, 0, 0.4) !important; - transform: translateX(2px); -} - -/* Button Consistency and Improved Spacing */ -.btn-lg { - padding: 0.75rem 1.5rem; - font-weight: 600; - border-radius: 12px; - transition: all 0.3s ease; - min-width: 120px; /* Ensure consistent button widths */ -} - -/* Debug Test Section Toggleable */ -#debugTestSection.hidden { - display: none !important; -} - -#debugTestSection .btn-sm { - padding: 0.5rem 1rem; - font-size: 0.875rem; - border-radius: 8px; - transition: all 0.2s ease; -} - -/* Enhanced Input Area Background */ -#textInput { - min-height: 240px !important; - font-size: 16px; - line-height: 1.5; - resize: vertical; - padding: 1.5rem; /* Increased padding for better appearance */ - background-color: rgba(255, 255, 255, 0.12) !important; /* More prominent background */ - border: 2px solid rgba(139, 92, 246, 0.3) !important; /* Thicker border */ -} - -#textInput:focus { - background-color: rgba(255, 255, 255, 0.18) !important; - border-color: var(--primary-color) !important; - box-shadow: 0 0 0 0.3rem rgba(139, 92, 246, 0.25) !important; - transform: scale(1.01); /* Subtle scale on focus */ -} - -.progress-step-horizontal { - display: flex; - flex-direction: column; - align-items: center; - text-align: center; - min-width: 60px; - transition: var(--transition-smooth); -} - -.progress-step-horizontal .step-icon-small { - width: 18px !important; - height: 18px !important; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 0.25rem; - font-size: 0.7rem !important; - transition: var(--transition-smooth); - background: rgba(255, 255, 255, 0.1) !important; - color: #cbd5e1 !important; - border: 1px solid rgba(255, 255, 255, 0.15); - flex-shrink: 0; -} - -.progress-step-horizontal .step-label { - font-size: 0.65rem; - font-weight: 500; - color: #94a3b8; - white-space: nowrap; - transition: var(--transition-smooth); -} - -.progress-step-horizontal.active .step-icon-small { - background: var(--primary-gradient) !important; - color: white !important; - transform: scale(1.1); -} - -.progress-step-horizontal.active .step-label { - color: var(--primary-color); - font-weight: 600; -} - -.progress-step-horizontal.completed .step-icon-small { - background: #10b981 !important; - color: white !important; -} - -.progress-step-horizontal.completed .step-label { - color: #10b981; -} - -.pipeline-arrow { - font-size: 0.8rem; - color: #64748b; - font-weight: normal; - user-select: none; - opacity: 0.6; -} - - -/* Responsive Design for Progress Pipeline - consolidated above */ - -/* Error Messages */ -.error-message { - color: #ef4444; - font-size: 0.875rem; - margin-top: 8px; - padding: 8px 12px; - background: rgba(239, 68, 68, 0.1); - border: 1px solid rgba(239, 68, 68, 0.2); - border-radius: 8px; - display: none; -} - -.error-message.show { - display: block; - animation: fadeInUp 0.3s ease-out; -} - -/* Success Messages */ -.success-message { - color: #10b981; - font-size: 0.875rem; - margin-top: 8px; - padding: 8px 12px; - background: rgba(16, 185, 129, 0.1); - border: 1px solid rgba(16, 185, 129, 0.2); - border-radius: 8px; - display: none; -} - -.success-message.show { - display: block; - animation: fadeInUp 0.3s ease-out; -} - -/* Model Detail Cards */ -.model-detail-card { - background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 8px; - padding: 12px; - margin-bottom: 10px; - transition: all 0.3s ease; -} - -.model-detail-card:hover { - background: rgba(255, 255, 255, 0.08); - transform: translateY(-1px); -} - -.model-detail-label { - font-size: 0.75rem; - color: #94a3b8; - text-transform: uppercase; - letter-spacing: 0.5px; - margin-bottom: 4px; - font-weight: 600; -} - -.model-detail-value { - font-size: 1.1rem; - color: #f1f5f9; - font-weight: 700; -} - -.model-detail-text { - font-size: 0.9rem; - color: #cbd5e1; - line-height: 1.4; -} - -/* Pure HTML/CSS Chart styling - BEAUTIFUL DESIGN */ -.emotion-chart-container, .summary-chart-container { - background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); - border-radius: 16px; - padding: 25px; - margin: 20px 0; - border: 1px solid rgba(255, 255, 255, 0.2); - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); - backdrop-filter: blur(10px); - position: relative; - overflow: hidden; -} - -.emotion-chart-container::before, .summary-chart-container::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 3px; - background: linear-gradient(90deg, #8b5cf6, #a855f7, #c084fc); -} - -.chart-header { - text-align: center; - margin-bottom: 25px; -} - -.chart-title { - color: #fbbf24; - font-weight: 700; - margin-bottom: 8px; - font-size: 1.25rem; - text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); -} - -.chart-subtitle { - color: #cbd5e1; - font-size: 0.9rem; - opacity: 0.8; -} - -.emotion-bars { - display: flex; - flex-direction: column; - gap: 20px; -} - -.emotion-bar { - margin-bottom: 20px; - animation: slideInLeft 0.8s ease-out forwards; - opacity: 0; - transform: translateX(-30px); - background: rgba(255, 255, 255, 0.03); - border-radius: 12px; - padding: 15px; - border: 1px solid rgba(255, 255, 255, 0.1); - transition: all 0.3s ease; - display: block; - visibility: visible; -} - -.emotion-bar:hover { - background: rgba(255, 255, 255, 0.08); - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); -} - -@keyframes slideInLeft { - to { - opacity: 1; - transform: translateX(0); - } -} - -.emotion-label { - display: flex; - justify-content: space-between; - margin-bottom: 12px; - align-items: center; -} - -.emotion-name { - font-weight: 700; - color: #f1f5f9; - text-transform: capitalize; - font-size: 1rem; - letter-spacing: 0.5px; -} - -.emotion-percentage { - color: #a855f7; - font-weight: 700; - font-size: 1.1rem; - background: rgba(168, 85, 247, 0.1); - padding: 4px 12px; - border-radius: 20px; - border: 1px solid rgba(168, 85, 247, 0.3); -} - -.emotion-bar-bg { - background: rgba(0, 0, 0, 0.3); - border-radius: 15px; - height: 16px; - overflow: hidden; - position: relative; - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); -} - -.emotion-bar-fill { - height: 100%; - border-radius: 15px; - transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); - position: relative; - overflow: hidden; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); -} - -.emotion-bar-fill::after { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); - animation: shimmer 3s infinite; -} - -@keyframes shimmer { - 0% { transform: translateX(-100%); } - 100% { transform: translateX(100%); } -} - -.summary-stats { - display: flex; - justify-content: space-around; - margin-bottom: 25px; - gap: 20px; -} - -.stat-item { - text-align: center; - flex: 1; - background: rgba(255, 255, 255, 0.05); - border-radius: 12px; - padding: 15px; - border: 1px solid rgba(255, 255, 255, 0.1); - transition: all 0.3s ease; -} - -.stat-item:hover { - background: rgba(255, 255, 255, 0.08); - transform: translateY(-2px); -} - -.stat-item.highlight { - background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1)); - border: 2px solid rgba(139, 92, 246, 0.4); - box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2); -} - -.stat-value { - font-size: 1.8rem; - font-weight: 800; - color: #fbbf24; - margin-bottom: 8px; - text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); -} - -.stat-item.highlight .stat-value { - color: #c084fc; - font-size: 2rem; -} - -.stat-label { - font-size: 0.8rem; - color: #cbd5e1; - text-transform: uppercase; - letter-spacing: 1px; - font-weight: 600; -} - -.summary-bars { - display: flex; - flex-direction: column; - gap: 20px; -} - -.summary-bar { - margin-bottom: 20px; - background: rgba(255, 255, 255, 0.03); - border-radius: 12px; - padding: 15px; - border: 1px solid rgba(255, 255, 255, 0.1); - transition: all 0.3s ease; -} - -.summary-bar:hover { - background: rgba(255, 255, 255, 0.08); - transform: translateY(-1px); -} - -.bar-label { - font-weight: 700; - color: #f1f5f9; - margin-bottom: 12px; - font-size: 1rem; -} - -.bar-bg { - background: rgba(0, 0, 0, 0.3); - border-radius: 12px; - height: 24px; - overflow: hidden; - position: relative; - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); -} - -.bar-fill { - height: 100%; - border-radius: 12px; - transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); - position: relative; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); -} - -.bar-fill.original { - background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd); -} - -.bar-fill.summary { - background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7); -} - -.bar-value { - text-align: right; - font-size: 0.9rem; - color: #cbd5e1; - margin-top: 8px; - font-weight: 600; -} - -.chart-footer { - text-align: center; - margin-top: 20px; - padding-top: 20px; - border-top: 1px solid rgba(255, 255, 255, 0.1); - color: #94a3b8; - font-size: 0.85rem; -} - - -/* Keyboard Focus Indicators */ -.comprehensive-demo .btn-primary:focus-visible { - outline: 3px solid #c084fc; - outline-offset: 2px; - box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.45); -} - -.demo-container .form-control:focus-visible { - outline: 2px solid var(--primary-color); - outline-offset: 2px; -} - -/* Reduced Motion Preferences - Consolidated */ -@media (prefers-reduced-motion: reduce) { - .step.active .step-circle, - .spinner, - .hero-section::before, - .floating-card, - .audio-bar, - .emotion-bar-fill::after, - .feature-card, - .btn, - .btn:hover, - .progress-step-vertical, - .progress-step-horizontal, - .process-step, - .model-detail-card, - .stat-item, - .emotion-bar, - .summary-bar { - animation: none !important; - transition: none !important; - transform: none !important; - } -} - -/* Responsive Design */ -@media (max-width: 1200px) { - .progress-pipeline-horizontal { - gap: 0.5rem; - padding: 0.8rem 1rem; - } - - .progress-pipeline-horizontal .step-label { - font-size: 0.7rem; - } - - #processingInfoSidebar { - margin-top: 2rem; - } -} - -/* Mobile responsive rules consolidated above */ - -@media (max-width: 576px) { - .demo-container { - padding: 20px 15px; - margin: -50px 10px 20px 10px; - } - - .progress-pipeline-horizontal { - padding: 0.5rem; - } - - .btn-lg { - padding: 0.6rem 1rem; - font-size: 0.9rem; - } - - .feature-card { - padding: 1rem !important; - margin-bottom: 1rem; - } - - #textInput { - min-height: 160px !important; - font-size: 14px; - } -} - -/* Debug section responsive behavior */ -@media (max-width: 992px) { - #debugTestSection { - margin-top: 1rem; - } -} - -/* Enhanced transitions for responsive changes */ -@media (prefers-reduced-motion: no-preference) { - #titleWithFlow, - #inputLayout, - #resultsLayout { - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - } -} From e2d9cdf7b5a2a36090e74dc483510c1a4448cefe Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:11:08 +0200 Subject: [PATCH 18/26] fix: remove duplicated .demo-container styles from legacy CSS files - Remove .demo-container definition from styles.css (now only in components/containers.css) - Remove .demo-container definition from demo.css (consolidated in component system) - Remove responsive .demo-container styles from demo.css (moved to components/containers.css) - Eliminates style conflicts and maintains single source of truth for demo container styles - Addresses CodeRabbit concern about maintaining two copies of the same selectors --- website/css/demo.css | 26 ++------------------------ website/css/styles.css | 14 +------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/website/css/demo.css b/website/css/demo.css index f2bf7b6d1..d55412e31 100644 --- a/website/css/demo.css +++ b/website/css/demo.css @@ -1,16 +1,4 @@ -/* Demo-specific styles */ -.demo-container { - background: var(--glass-bg); - backdrop-filter: blur(20px); - border: 1px solid var(--glass-border); - border-radius: 30px; - box-shadow: var(--shadow-glass); - padding: 50px; - margin: -80px 0 50px 0; - position: relative; - z-index: 10; - color: #e2e8f0; -} +/* Demo-specific styles - .demo-container consolidated in components/containers.css */ .emotion-card { background: var(--glass-bg); @@ -79,14 +67,4 @@ background-clip: text; } -/* Responsive enhancements */ -@media (max-width: 768px) { - .demo-container { - padding: 30px 20px; - margin: -50px 15px 30px 15px; - } - - .hero-section { - padding: 80px 0; - } -} +/* Responsive enhancements - .demo-container responsive styles moved to components/containers.css */ diff --git a/website/css/styles.css b/website/css/styles.css index 856934445..22c711a2e 100644 --- a/website/css/styles.css +++ b/website/css/styles.css @@ -418,19 +418,7 @@ body { background: var(--primary-gradient); } -/* Demo components */ -.demo-container { - background: var(--glass-bg); - backdrop-filter: blur(20px); - border: 1px solid var(--glass-border); - border-radius: 30px; - box-shadow: var(--shadow-glass); - padding: 50px; - margin: -80px 0 50px 0; - position: relative; - z-index: 10; - color: #e2e8f0; -} +/* Demo components - consolidated in components/containers.css */ .demo-tab { background: var(--glass-bg); From edac8791aaf187b16a5b119db9373ccf56800cb7 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:45:10 +0200 Subject: [PATCH 19/26] fix: remove duplicated CSS variables from styles.css - Remove complete :root block from styles.css (22 lines) - Variables now centralized in components/variables.css - Eliminates duplication and ensures single source of truth - Addresses CodeRabbit concern about design token duplication --- website/css/styles.css | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/website/css/styles.css b/website/css/styles.css index 22c711a2e..17ec8f259 100644 --- a/website/css/styles.css +++ b/website/css/styles.css @@ -1,32 +1,4 @@ -/* Shared styles for SAMO-DL website */ -:root { - /* Sophisticated dark gradient color palette */ - --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%); - --secondary-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); - --dark-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%); - --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c084fc 100%); - - --primary-color: #8b5cf6; - --secondary-color: #a855f7; - --accent-color: #c084fc; - --dark-color: #0f0f23; - --darker-color: #0a0a1a; - --light-accent: #e9d5ff; - --glass-bg: rgba(139, 92, 246, 0.1); - --glass-border: rgba(139, 92, 246, 0.2); - - /* Performance and animation settings */ - --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); - --shadow-glow: 0 10px 40px rgba(139, 92, 246, 0.3); - --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3); - - /* Additional semantic colors for alerts, badges, and status indicators */ - --success-color: #10b981; - --warning-color: #f59e0b; - --danger-color: #ef4444; - --light-color: #f9fafb; -} +/* Shared styles for SAMO-DL website - CSS variables now centralized in components/variables.css */ body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; From 273ef291b03584a85418513d1095f6f3e0821588 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:45:39 +0200 Subject: [PATCH 20/26] refactor: consolidate CSS variables in index.css - Import centralized variables from components/variables.css - Map centralized variables to index.css naming convention for backward compatibility - Remove duplicate variable definitions while maintaining existing API - Ensures all CSS files use single source of truth for design tokens --- website/css/index.css | 44 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/website/css/index.css b/website/css/index.css index 432995f4c..db4b2cb75 100644 --- a/website/css/index.css +++ b/website/css/index.css @@ -1,33 +1,37 @@ /* SAMO-DL Website Styles */ /* Consolidated CSS with improved maintainability and accessibility */ +/* Import centralized design system variables */ +@import url('./components/variables.css'); + +/* Map centralized variables to index.css naming convention for backward compatibility */ :root { - /* Consolidated gradient definitions */ - --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%); - --gradient-secondary: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); - --gradient-dark: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%); - --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c084fc 100%); + /* Gradient mappings */ + --gradient-primary: var(--primary-gradient); + --gradient-secondary: var(--secondary-gradient); + --gradient-dark: var(--dark-gradient); + --gradient-accent: var(--accent-gradient); --gradient-success: linear-gradient(135deg, #10b981, #34d399); - /* Color palette */ - --color-primary: #8b5cf6; - --color-secondary: #a855f7; - --color-accent: #c084fc; - --color-dark: #0f0f23; - --color-darker: #0a0a1a; - --color-light-accent: #e9d5ff; + /* Color palette mappings */ + --color-primary: var(--primary-color); + --color-secondary: var(--secondary-color); + --color-accent: var(--accent-color); + --color-dark: var(--dark-color); + --color-darker: var(--darker-color); + --color-light-accent: var(--light-accent); --color-text: #e2e8f0; --color-text-muted: #94a3b8; - /* Glass morphism */ - --glass-bg: rgba(139, 92, 246, 0.1); - --glass-border: rgba(139, 92, 246, 0.2); + /* Glass morphism mappings */ + --glass-bg: var(--glass-bg); + --glass-border: var(--glass-border); - /* Performance and animation settings */ - --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); - --shadow-glow: 0 10px 40px rgba(139, 92, 246, 0.3); - --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3); + /* Performance and animation settings mappings */ + --transition-smooth: var(--transition-smooth); + --transition-bounce: var(--transition-bounce); + --shadow-glow: var(--shadow-glow); + --shadow-glass: var(--shadow-glass); /* Accessibility improvements */ --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.5); From 2dfbcfe75f578ab2324d94338b5a201c20d8e2dd Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:50:23 +0200 Subject: [PATCH 21/26] fix: add proper reduced motion accessibility support - Add @media (prefers-reduced-motion: reduce) rule to disable animations - Disable transitions for #titleWithFlow, #inputLayout, #resultsLayout - Disable animations for .floating-card and result section animations - Ensures full accessibility compliance for users with motion sensitivity - Addresses CodeRabbit accessibility concern about forced animations --- website/css/components/animations.css | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/css/components/animations.css b/website/css/components/animations.css index e21c89f54..061968b76 100644 --- a/website/css/components/animations.css +++ b/website/css/components/animations.css @@ -74,3 +74,23 @@ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } } + +/* Honor reduced motion preferences */ +@media (prefers-reduced-motion: reduce) { + #titleWithFlow, + #inputLayout, + #resultsLayout { + transition: none !important; + } + + /* Disable floating animations */ + .floating-card { + animation: none !important; + } + + /* Disable result section animations */ + .result-section-visible, + .result-section.show { + animation: none !important; + } +} From 3eccedd199d5aaaf3770840f8c7f2f1c36ae0711 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:53:45 +0200 Subject: [PATCH 22/26] fix: address Copilot security and code quality concerns Security fix: - Replace innerHTML with template literals with safer DOM manipulation - Prevent potential XSS vulnerability in rate limit test results display - Use createElement/textContent instead of string interpolation in innerHTML Code quality improvements: - Remove inline comments about textContent HTML escaping (clutter) - Add explanatory comment for universal selector in reduced motion CSS - Maintain accessibility compliance while addressing code review feedback Addresses Copilot concerns about XSS vulnerabilities and code clarity. --- website/comprehensive-demo.html | 31 ++++++++++++++++++++----------- website/css/components/base.css | 2 ++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/website/comprehensive-demo.html b/website/comprehensive-demo.html index 56c8f1188..ec65589b4 100644 --- a/website/comprehensive-demo.html +++ b/website/comprehensive-demo.html @@ -529,7 +529,7 @@
SAMO Deep Learning
const emotionSpan = document.createElement('span'); emotionSpan.className = 'fw-bold text-capitalize'; - emotionSpan.textContent = emotion.emotion; // textContent automatically escapes HTML + emotionSpan.textContent = emotion.emotion; headerDiv.appendChild(emotionSpan); const badgeSpan = document.createElement('span'); @@ -922,7 +922,7 @@
SAMO Deep Learning
const textContent = document.createElement('p'); textContent.className = 'text-muted mb-2'; - textContent.textContent = `"${text}"`; // textContent automatically escapes HTML + textContent.textContent = `"${text}"`; itemDiv.appendChild(textContent); const badgesDiv = document.createElement('div'); @@ -1001,7 +1001,7 @@
SAMO Deep Learning
summaryContainer.appendChild(summaryTitle); const summaryText = document.createElement('p'); - summaryText.textContent = summary; // textContent automatically escapes HTML + summaryText.textContent = summary; summaryContainer.appendChild(summaryText); // Add emotional context if available @@ -1195,14 +1195,23 @@
SAMO Deep Learning
const successCount = responses.filter(r => r.ok).length; const rateLimitedCount = responses.filter(r => r.status === 429).length; - container.innerHTML = ` -
- Rate Limit Test Results:
- Successful requests: ${successCount}
- Rate limited requests: ${rateLimitedCount}
- Rate limiting is working correctly! -
- `; + // Safer DOM manipulation to avoid XSS + container.innerHTML = ""; // Clear previous content + const alertDiv = document.createElement("div"); + alertDiv.className = "alert alert-info"; + const strong = document.createElement("strong"); + strong.textContent = "Rate Limit Test Results:"; + alertDiv.appendChild(strong); + alertDiv.appendChild(document.createElement("br")); + const successText = document.createTextNode("Successful requests: " + successCount); + alertDiv.appendChild(successText); + alertDiv.appendChild(document.createElement("br")); + const rateLimitedText = document.createTextNode("Rate limited requests: " + rateLimitedCount); + alertDiv.appendChild(rateLimitedText); + alertDiv.appendChild(document.createElement("br")); + const infoText = document.createTextNode("Rate limiting is working correctly!"); + alertDiv.appendChild(infoText); + container.appendChild(alertDiv); } catch (error) { container.innerHTML = '
Rate limit test completed (simulated).
'; } diff --git a/website/css/components/base.css b/website/css/components/base.css index 4f8efb758..5f568a97f 100644 --- a/website/css/components/base.css +++ b/website/css/components/base.css @@ -60,6 +60,8 @@ body.comprehensive-demo { } /* Reduced Motion Preferences */ +/* Universal selector is the standard approach for accessibility compliance */ +/* when users have explicitly requested reduced motion */ @media (prefers-reduced-motion: reduce) { * { animation: none !important; From a3e0af09a2ed14ed14e58cab7e49f0947811c5fa Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 27 Sep 2025 14:57:27 +0000 Subject: [PATCH 23/26] =?UTF-8?q?=F0=9F=94=A7=20Refactor:=20Eliminate=20CS?= =?UTF-8?q?S=20Duplications=20&=20Enhance=20Security/Accessibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolved issues in scripts/deployment/patch_config_and_upload.py with DeepSource Autofix --- scripts/deployment/patch_config_and_upload.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/deployment/patch_config_and_upload.py b/scripts/deployment/patch_config_and_upload.py index 94c51e5c0..b97b9f8dd 100644 --- a/scripts/deployment/patch_config_and_upload.py +++ b/scripts/deployment/patch_config_and_upload.py @@ -5,7 +5,6 @@ from transformers import AutoConfig from huggingface_hub import HfApi, HfFolder import sys -import os # Add src to path to import constants sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) From 602968bb4396e83bdf5ec411aaff0dd972767562 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:57:10 +0200 Subject: [PATCH 24/26] fix: resolve FLK-E402 import ordering violations - Move module-level imports to top of file in 4 scripts - Ensure all imports are grouped together before any code execution - Fix duplicate 'import os' in patch_config_and_upload.py - Maintain proper PEP 8 import ordering standards --- scripts/deployment/patch_config_and_upload.py | 4 ++-- scripts/maintenance/infer_mapping_and_eval.py | 6 +++--- scripts/maintenance/metrics_test.py | 2 +- scripts/testing/hf_serverless_smoke.py | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/deployment/patch_config_and_upload.py b/scripts/deployment/patch_config_and_upload.py index b97b9f8dd..4c413a2e9 100644 --- a/scripts/deployment/patch_config_and_upload.py +++ b/scripts/deployment/patch_config_and_upload.py @@ -1,10 +1,10 @@ # patch_config_and_upload.py # pip install -U transformers huggingface_hub import os +import sys import tempfile -from transformers import AutoConfig from huggingface_hub import HfApi, HfFolder -import sys +from transformers import AutoConfig # Add src to path to import constants sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) diff --git a/scripts/maintenance/infer_mapping_and_eval.py b/scripts/maintenance/infer_mapping_and_eval.py index 43cf3e2b2..210d7aa31 100644 --- a/scripts/maintenance/infer_mapping_and_eval.py +++ b/scripts/maintenance/infer_mapping_and_eval.py @@ -2,11 +2,11 @@ import sys import numpy as np import torch -from tqdm import tqdm from datasets import load_dataset -from transformers import AutoTokenizer, AutoModelForSequenceClassification -from sklearn.metrics import f1_score, accuracy_score from scipy.optimize import linear_sum_assignment +from sklearn.metrics import f1_score, accuracy_score +from tqdm import tqdm +from transformers import AutoTokenizer, AutoModelForSequenceClassification # Add src to path to import constants sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) diff --git a/scripts/maintenance/metrics_test.py b/scripts/maintenance/metrics_test.py index b86744614..032fdcdbe 100644 --- a/scripts/maintenance/metrics_test.py +++ b/scripts/maintenance/metrics_test.py @@ -7,8 +7,8 @@ import torch from tqdm import tqdm from datasets import load_dataset -from transformers import AutoTokenizer, AutoModelForSequenceClassification from sklearn.metrics import f1_score, accuracy_score +from transformers import AutoTokenizer, AutoModelForSequenceClassification # Add src to path to import constants sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) diff --git a/scripts/testing/hf_serverless_smoke.py b/scripts/testing/hf_serverless_smoke.py index 661116498..708edbe05 100644 --- a/scripts/testing/hf_serverless_smoke.py +++ b/scripts/testing/hf_serverless_smoke.py @@ -1,16 +1,16 @@ #!/usr/bin/env python3 import os import json -import time import sys +import time from typing import List, Tuple -import requests - # Add src to path to import constants sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from src.constants import DEFAULT_EMOTION_MODEL_ID +import requests + HF_REPO = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) HF_TOKEN = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_TOKEN") From 219c0d4d61b6dafa35c476c58518ef1175d07a59 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:59:14 +0200 Subject: [PATCH 25/26] fix: properly resolve FLK-E402 import ordering violations - Move sys.path.append() before all imports to comply with PEP 8 - Ensure all imports are grouped together at the top of files - Remove executable code between module-level imports - Fix E402 violations in all 4 affected scripts --- scripts/deployment/patch_config_and_upload.py | 8 +++++--- scripts/maintenance/infer_mapping_and_eval.py | 7 ++++--- scripts/maintenance/metrics_test.py | 9 +++++---- scripts/testing/hf_serverless_smoke.py | 8 ++++---- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/scripts/deployment/patch_config_and_upload.py b/scripts/deployment/patch_config_and_upload.py index 4c413a2e9..035ae5ea9 100644 --- a/scripts/deployment/patch_config_and_upload.py +++ b/scripts/deployment/patch_config_and_upload.py @@ -1,13 +1,15 @@ # patch_config_and_upload.py # pip install -U transformers huggingface_hub -import os + +# Add src to path to import constants import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) + +import os import tempfile from huggingface_hub import HfApi, HfFolder from transformers import AutoConfig -# Add src to path to import constants -sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from src.constants import DEFAULT_EMOTION_MODEL_ID MODEL_ID = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) diff --git a/scripts/maintenance/infer_mapping_and_eval.py b/scripts/maintenance/infer_mapping_and_eval.py index 210d7aa31..d1500cdaa 100644 --- a/scripts/maintenance/infer_mapping_and_eval.py +++ b/scripts/maintenance/infer_mapping_and_eval.py @@ -1,5 +1,8 @@ -import os +# Add src to path to import constants import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) + +import os import numpy as np import torch from datasets import load_dataset @@ -8,8 +11,6 @@ from tqdm import tqdm from transformers import AutoTokenizer, AutoModelForSequenceClassification -# Add src to path to import constants -sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from src.constants import DEFAULT_EMOTION_MODEL_ID MODEL_ID = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) diff --git a/scripts/maintenance/metrics_test.py b/scripts/maintenance/metrics_test.py index 032fdcdbe..c07400dfe 100644 --- a/scripts/maintenance/metrics_test.py +++ b/scripts/maintenance/metrics_test.py @@ -1,17 +1,18 @@ # metrics_test.py # pip install -U transformers datasets scikit-learn torch tqdm huggingface_hub -import os +# Add src to path to import constants import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) + +import os import numpy as np import torch -from tqdm import tqdm from datasets import load_dataset from sklearn.metrics import f1_score, accuracy_score +from tqdm import tqdm from transformers import AutoTokenizer, AutoModelForSequenceClassification -# Add src to path to import constants -sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from src.constants import DEFAULT_EMOTION_MODEL_ID MODEL_ID = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) diff --git a/scripts/testing/hf_serverless_smoke.py b/scripts/testing/hf_serverless_smoke.py index 708edbe05..fafa8eca2 100644 --- a/scripts/testing/hf_serverless_smoke.py +++ b/scripts/testing/hf_serverless_smoke.py @@ -1,14 +1,14 @@ #!/usr/bin/env python3 +# Add src to path to import constants +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) + import os import json -import sys import time from typing import List, Tuple -# Add src to path to import constants -sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from src.constants import DEFAULT_EMOTION_MODEL_ID - import requests HF_REPO = os.getenv("EMOTION_MODEL_ID", DEFAULT_EMOTION_MODEL_ID) From 3ea007cf88d7d6219fa53a5dd518f92311fcaf40 Mon Sep 17 00:00:00 2001 From: Deniz Ulker <156104354+uelkerd@users.noreply.github.com> Date: Sat, 27 Sep 2025 17:00:20 +0200 Subject: [PATCH 26/26] fix: resolve FLK-E402 violations by proper import ordering - Import 'os' before using os.path in sys.path.append() - Ensure all imports are at the top with proper dependencies - Fix module-level import ordering in all 4 affected scripts - Comply with PEP 8 import placement requirements --- scripts/deployment/patch_config_and_upload.py | 3 +-- scripts/maintenance/infer_mapping_and_eval.py | 3 +-- scripts/maintenance/metrics_test.py | 3 +-- scripts/testing/hf_serverless_smoke.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/deployment/patch_config_and_upload.py b/scripts/deployment/patch_config_and_upload.py index 035ae5ea9..cbd120486 100644 --- a/scripts/deployment/patch_config_and_upload.py +++ b/scripts/deployment/patch_config_and_upload.py @@ -2,10 +2,9 @@ # pip install -U transformers huggingface_hub # Add src to path to import constants +import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) - -import os import tempfile from huggingface_hub import HfApi, HfFolder from transformers import AutoConfig diff --git a/scripts/maintenance/infer_mapping_and_eval.py b/scripts/maintenance/infer_mapping_and_eval.py index d1500cdaa..07d2c62a4 100644 --- a/scripts/maintenance/infer_mapping_and_eval.py +++ b/scripts/maintenance/infer_mapping_and_eval.py @@ -1,8 +1,7 @@ # Add src to path to import constants +import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) - -import os import numpy as np import torch from datasets import load_dataset diff --git a/scripts/maintenance/metrics_test.py b/scripts/maintenance/metrics_test.py index c07400dfe..fe00835a6 100644 --- a/scripts/maintenance/metrics_test.py +++ b/scripts/maintenance/metrics_test.py @@ -2,10 +2,9 @@ # pip install -U transformers datasets scikit-learn torch tqdm huggingface_hub # Add src to path to import constants +import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) - -import os import numpy as np import torch from datasets import load_dataset diff --git a/scripts/testing/hf_serverless_smoke.py b/scripts/testing/hf_serverless_smoke.py index fafa8eca2..061528992 100644 --- a/scripts/testing/hf_serverless_smoke.py +++ b/scripts/testing/hf_serverless_smoke.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 # Add src to path to import constants +import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) - -import os import json import time from typing import List, Tuple