From 9fc636a558b16057d79436051d422f646ebe8056 Mon Sep 17 00:00:00 2001 From: b1rdmania <102524336+b1rdmania@users.noreply.github.com> Date: Fri, 26 Dec 2025 19:21:28 +0000 Subject: [PATCH] =?UTF-8?q?Refocus=20main=20page=20around=20search=20?= =?UTF-8?q?=E2=86=92=20select=20=E2=86=92=20generate.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleans result titles, adds a 'Use this' action, promotes a selected source card with Preview/Generate, collapses results after selection, and hides debug-ish metadata behind Details. --- index.html | 288 ++++++++++++++++++++++++++++++++-------------------- src/main.ts | 225 ++++++++++++++++++++-------------------- 2 files changed, 295 insertions(+), 218 deletions(-) diff --git a/index.html b/index.html index 30cc27c..b83d203 100644 --- a/index.html +++ b/index.html @@ -64,28 +64,24 @@ margin: 0 auto; } - h1 { - color: var(--color-accent-primary); + .hero { text-align: center; margin: 0 0 calc(var(--spacing-unit) * 4) 0; + } + .hero h1 { + color: var(--color-accent-primary); + margin: 0; font-size: 2em; - font-weight: 700; - letter-spacing: 0.05em; + font-weight: 800; + letter-spacing: 0.08em; text-shadow: var(--glow-primary); } - - .topbar { - display: flex; - align-items: center; - justify-content: center; - gap: calc(var(--spacing-unit) * 2); - margin-bottom: calc(var(--spacing-unit) * 2); - } - .topbar h1 { - margin: 0; + .hero .tagline { + margin: calc(var(--spacing-unit) * 1.5) 0 0 0; + color: rgba(255,255,255,0.72); + font-size: 14px; } .faq-link { - margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.85); @@ -230,8 +226,12 @@ color: rgba(255,255,255,0.85); } .controls { - margin: calc(var(--spacing-unit) * 3) 0; - text-align: center; + margin: calc(var(--spacing-unit) * 3) auto calc(var(--spacing-unit) * 2) auto; + display: flex; + gap: calc(var(--spacing-unit) * 1.5); + align-items: stretch; + justify-content: center; + max-width: 720px; } button { @@ -268,8 +268,8 @@ button.primary { background: var(--color-accent-primary); color: #000; - border-color: var(--color-accent-primary); - font-weight: 600; + border-color: rgba(0,255,136,0.4); + font-weight: 800; } button.primary:hover:not(:disabled) { @@ -277,6 +277,12 @@ box-shadow: var(--glow-primary), var(--shadow-md); } + /* Make Search the primary CTA */ + #searchBtn { + padding: 14px 18px; + border-radius: 12px; + } + #status { margin: calc(var(--spacing-unit) * 3) 0; padding: calc(var(--spacing-unit) * 2); @@ -289,11 +295,12 @@ } input[type="text"] { - background: var(--color-surface); + flex: 1; + background: rgba(0,0,0,0.25); color: var(--color-text); - border: 1px solid var(--color-border); - padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2); - border-radius: var(--radius); + border: 1px solid rgba(255,255,255,0.14); + padding: 14px 14px; + border-radius: 12px; font-family: inherit; font-size: 16px; transition: border-color 150ms ease, box-shadow 150ms ease; @@ -301,8 +308,8 @@ input[type="text"]:focus { outline: none; - border-color: var(--color-accent-primary); - box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1); + border-color: rgba(0,255,136,0.45); + box-shadow: 0 0 0 3px rgba(0,255,136,0.18); } .results-section { @@ -312,6 +319,13 @@ .results-section.visible { display: block; } + .results-section.collapsed { + opacity: 0.55; + transition: opacity 160ms ease; + } + .results-section.collapsed:hover { + opacity: 1; + } .results-table { width: 100%; @@ -346,11 +360,11 @@ .results-table .duration-col { width: 80px; - text-align: center; + text-align: right; } - .results-table .preview-col { - width: 110px; - text-align: center; + .results-table .action-col { + width: 120px; + text-align: right; } .results-table tbody tr { @@ -394,30 +408,12 @@ width: 60px; } - .results-table .preview-col { - width: 84px; + .results-table .action-col { + width: 100px; } } - .results-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: calc(var(--spacing-unit) * 2); - flex-wrap: wrap; - margin: 0 0 calc(var(--spacing-unit) * 2) 0; - } - .results-header h3 { - margin: 0; - } - .results-header .volume-control { - margin-top: 0; - min-width: 260px; - flex: 0 1 360px; - } - .results-header .volume-control label { - font-size: 12px; - } + .results-header h3 { margin: 0; } .confidence-bar { width: 60px; @@ -431,6 +427,83 @@ background: linear-gradient(90deg, #ff4444, #ffaa44, #00ff88); transition: width 0.2s; } + + /* Selected source card */ + .selected-card { + margin-top: calc(var(--spacing-unit) * 3); + padding: calc(var(--spacing-unit) * 3); + background: var(--color-surface-elevated); + border: 1px solid rgba(255,255,255,0.10); + border-radius: 12px; + box-shadow: var(--shadow-lg); + } + .selected-title { + margin: 0; + font-size: 22px; + line-height: 1.2; + font-weight: 800; + letter-spacing: 0.01em; + color: var(--color-text); + } + .selected-meta { + margin: 10px 0 0 0; + font-size: 13px; + color: rgba(255,255,255,0.62); + } + .selected-actions { + display: flex; + gap: 12px; + margin-top: 16px; + flex-wrap: wrap; + } + .selected-actions .primary { + flex: 1; + min-width: 180px; + padding: 12px 16px; + } + .selected-actions button:not(.primary) { + flex: 1; + min-width: 160px; + } + .selected-support { + display: flex; + gap: 12px; + align-items: center; + flex-wrap: wrap; + margin-top: 12px; + } + .selected-support .volume-control { + margin-top: 0; + flex: 1; + min-width: 220px; + opacity: 0.85; + } + .engine-line { + margin-top: 14px; + color: rgba(255,255,255,0.72); + font-size: 13px; + } + details.details-toggle { + margin-top: 12px; + } + details.details-toggle summary { + cursor: pointer; + color: rgba(255,255,255,0.7); + font-size: 12px; + list-style: none; + } + details.details-toggle summary::-webkit-details-marker { display: none; } + .selected-details { + margin-top: 8px; + font-size: 12px; + color: rgba(255,255,255,0.58); + } + + .footer { + margin-top: calc(var(--spacing-unit) * 6); + display: flex; + justify-content: center; + } .player-section { margin: 30px 0; @@ -856,15 +929,14 @@