|
363 | 363 | font-size: clamp(2.8rem, 6vw, 5rem); |
364 | 364 | font-weight: 800; |
365 | 365 | letter-spacing: -0.04em; |
366 | | - line-height: 1.05; |
| 366 | + line-height: 1.16; |
367 | 367 | margin-bottom: 20px; |
368 | 368 | } |
369 | 369 |
|
|
373 | 373 | -webkit-background-clip: text; |
374 | 374 | -webkit-text-fill-color: transparent; |
375 | 375 | background-clip: text; |
| 376 | + display: inline-block; |
376 | 377 | } |
377 | 378 |
|
378 | 379 | .hero-sub { |
|
1832 | 1833 | /* responsive */ |
1833 | 1834 | @media(max-width:600px) { |
1834 | 1835 | .hero h1 { |
1835 | | - font-size: 2.2rem |
| 1836 | + font-size: 2.2rem; |
| 1837 | + line-height: 1.18 |
1836 | 1838 | } |
1837 | 1839 |
|
1838 | 1840 | nav { |
|
1948 | 1950 | } |
1949 | 1951 |
|
1950 | 1952 | .hero h1 { |
1951 | | - font-size: 1.9rem |
| 1953 | + font-size: 1.9rem; |
| 1954 | + line-height: 1.2 |
1952 | 1955 | } |
1953 | 1956 |
|
1954 | 1957 | .feat-pill-info p { |
@@ -2233,24 +2236,8 @@ <h4>File Upload</h4> |
2233 | 2236 | <div class="spinner" id="spinner" aria-hidden="true"></div> |
2234 | 2237 | <span class="btn-text">Analyze Code</span> |
2235 | 2238 | </button> |
2236 | | - <button id="analyze-btn" title="Analyze Code (Ctrl+Enter)" align="center">Analyze <span |
2237 | | - class="desktop-hint">(Ctrl+Enter)</span> |
2238 | | - </button> |
2239 | 2239 | </div> |
2240 | 2240 | </div> |
2241 | | - |
2242 | | - <!-- Result tabs --> |
2243 | | - <div class="result-tabs" role="tablist" aria-label="Analysis Results"> |
2244 | | - <button class="result-tab active" data-rtab="explain" role="tab" aria-selected="true" aria-controls="pane-explain" tabindex="0"> |
2245 | | - <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg> Explain <span class="tab-badge" id="explainBadge"></span> |
2246 | | - </button> |
2247 | | - <button class="result-tab" data-rtab="debug" role="tab" aria-selected="false" aria-controls="pane-debug" tabindex="-1"> |
2248 | | - <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M8 2l1.5 1.5"/><path d="M14.5 3.5L16 2"/><path d="M9 7.5A3 3 0 0 1 12 5a3 3 0 0 1 3 2.5"/><path d="M6.5 9H4a1 1 0 0 0-1 1v1a8 8 0 0 0 16 0v-1a1 1 0 0 0-1-1h-2.5"/><line x1="12" y1="12" x2="12" y2="16"/><path d="M4.5 15H2"/><path d="M22 15h-2.5"/><path d="M4.5 19l-2 2"/><path d="M19.5 19l2 2"/></svg> Debug <span class="tab-badge" id="debugBadge"></span> |
2249 | | - </button> |
2250 | | - <button class="result-tab" data-rtab="suggest" role="tab" aria-selected="false" aria-controls="pane-suggest" tabindex="-1"> |
2251 | | - <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polygon points="13,2 3,14 12,14 11,22 21,10 12,10"/></svg> Improve <span class="tab-badge" id="suggestBadge"></span> |
2252 | | - </button> |
2253 | | - </div> |
2254 | 2241 | <!-- Results Panel --> |
2255 | 2242 | <div class="panel"> |
2256 | 2243 | <div class="panel-header"> |
@@ -2599,106 +2586,6 @@ <h3>No suggestions yet</h3> |
2599 | 2586 | } |
2600 | 2587 | } |
2601 | 2588 | } |
2602 | | - |
2603 | | -/* ═══════════════════════════════════════════════════════════════ |
2604 | | - MODE BUTTONS |
2605 | | -═══════════════════════════════════════════════════════════════ */ |
2606 | | -document.querySelectorAll('.mode-btn').forEach(b => { |
2607 | | - b.addEventListener('click', () => { |
2608 | | - selectedMode = b.dataset.mode; |
2609 | | - document.querySelectorAll('.mode-btn').forEach(x => { |
2610 | | - x.classList.remove('active'); |
2611 | | - x.setAttribute('aria-pressed', 'false'); |
2612 | | - }); |
2613 | | - b.classList.add('active'); |
2614 | | - b.setAttribute('aria-pressed', 'true'); |
2615 | | - }); |
2616 | | -}); |
2617 | | - |
2618 | | -/* ═══════════════════════════════════════════════════════════════ |
2619 | | - RESULT TABS |
2620 | | -═══════════════════════════════════════════════════════════════ */ |
2621 | | -document.querySelectorAll('.result-tab').forEach((t, index, tabs) => { |
2622 | | - t.addEventListener('click', () => { |
2623 | | - const tab = t.dataset.rtab; |
2624 | | - |
2625 | | - document.querySelectorAll('.result-tab').forEach(x => { |
2626 | | - x.classList.remove('active'); |
2627 | | - x.setAttribute('aria-selected', 'false'); |
2628 | | - }); |
2629 | | - |
2630 | | - document.querySelectorAll('.result-pane').forEach(x => |
2631 | | - x.classList.remove('active') |
2632 | | - ); |
2633 | | - |
2634 | | - t.classList.add('active'); |
2635 | | - t.setAttribute('aria-selected', 'true'); |
2636 | | - |
2637 | | - document.getElementById(`pane-${tab}`).classList.add('active'); |
2638 | | - }); |
2639 | | - |
2640 | | - t.addEventListener('keydown', (e) => { |
2641 | | - if (e.key === 'ArrowRight') { |
2642 | | - e.preventDefault(); |
2643 | | - tabs[(index + 1) % tabs.length].focus(); |
2644 | | - } |
2645 | | - |
2646 | | - if (e.key === 'ArrowLeft') { |
2647 | | - e.preventDefault(); |
2648 | | - tabs[(index - 1 + tabs.length) % tabs.length].focus(); |
2649 | | - } |
2650 | | - |
2651 | | - if (e.key === 'Enter' || e.key === ' ') { |
2652 | | - e.preventDefault(); |
2653 | | - t.click(); |
2654 | | - } |
2655 | | - }); |
2656 | | -}); |
2657 | | - |
2658 | | -/* ═══════════════════════════════════════════════════════════════ |
2659 | | - CLEAR / COPY |
2660 | | -═══════════════════════════════════════════════════════════════ */ |
2661 | | -document.getElementById('clearBtn').addEventListener('click', () => { |
2662 | | - editor.value = ''; |
2663 | | - updateEditor(); |
2664 | | - resetResults(); |
2665 | | -}); |
2666 | | -document.getElementById('copyBtn').addEventListener('click', () => { |
2667 | | - if (!editor.value.trim()) return; |
2668 | | - navigator.clipboard.writeText(editor.value).then(() => toast('Code copied!', 'success')); |
2669 | | -}); |
2670 | | - |
2671 | | -/* ═══════════════════════════════════════════════════════════════ |
2672 | | - API PING |
2673 | | -═══════════════════════════════════════════════════════════════ */ |
2674 | | -async function pingApi() { |
2675 | | - const base = apiUrlInput.value.replace(/\/$/, ''); |
2676 | | - try { |
2677 | | - const r = await fetch(`${base}/health`, {signal: AbortSignal.timeout(5000)}); |
2678 | | - if (r.ok) { |
2679 | | - apiDot.classList.add('connected'); |
2680 | | - apiStatusText.textContent = 'Connected'; |
2681 | | - toast('API is reachable', 'success'); |
2682 | | - } else { |
2683 | | - apiDot.classList.remove('connected'); |
2684 | | - apiStatusText.textContent = 'Error ' + r.status; |
2685 | | - } |
2686 | | - } catch { |
2687 | | - apiDot.classList.remove('connected'); |
2688 | | - apiStatusText.textContent = 'Unreachable'; |
2689 | | - toast('Cannot reach API. Check the URL.', 'error'); |
2690 | | - } |
2691 | | -} |
2692 | | -document.getElementById('pingBtn').addEventListener('click', pingApi); |
2693 | | - // CTRL + ENTER |
2694 | | - else if ( |
2695 | | - e.key === 'Enter' && |
2696 | | - (e.ctrlKey || e.metaKey) |
2697 | | - ) { |
2698 | | - |
2699 | | - e.preventDefault(); |
2700 | | - doAnalyze(); |
2701 | | - } |
2702 | 2589 | }); |
2703 | 2590 |
|
2704 | 2591 | /* ═══════════════════════════════════════════════════════════════ |
|
0 commit comments