HifiPlanet-Builder/index.html
Maaxxs 0446dbf7d0 Add optional AI-powered lookup for cars not in the local database
When a search has no local match, a "Mit KI suchen" button now calls a
PHP backend (api/lookup.php) that asks the Claude API for plausible
cargo-bay dimensions. The API key stays server-side (config.php, gitignored,
see config.example.php) and is never exposed to the browser. The existing
category-based estimate picker remains as a free fallback if the AI call
fails or isn't configured.
2026-08-31 09:50:53 +02:00

104 lines
4.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kofferraum 3D Explorer</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="top">
<h1>Kofferraum 3D Explorer</h1>
<p class="subtitle">Automarke, Modell oder Fahrgestellnummer (VIN) eingeben — der Kofferraum wird als 3D-Näherung generiert.</p>
</header>
<main>
<section class="search-panel">
<div class="search-box">
<input id="searchInput" type="text" autocomplete="off" spellcheck="false"
placeholder="z. B. „VW Golf“, „Tiguan“ oder eine 17-stellige VIN …">
<button id="randomBtn" title="Zufälliges Modell">Zufall</button>
</div>
<div id="suggestions" class="suggestions" hidden></div>
<div id="hintBox" class="hint-box" hidden></div>
<div id="estimateBox" class="hint-box estimate-box" hidden>
<p>Kein Modell mit hinterlegten Werten gefunden.</p>
<div class="estimate-ai-row">
<button id="estimateAIBtn" type="button" class="ai-btn"></button>
</div>
<p id="estimateAIStatus" class="estimate-ai-status" hidden></p>
<p class="estimate-or">…oder direkt eine Fahrzeugklasse für eine grobe Schätzung wählen:</p>
<div id="estimateChips" class="chips estimate-chips"></div>
</div>
<div id="chips" class="chips"></div>
</section>
<section class="content" id="content" hidden>
<div class="side-col">
<div class="info-panel" id="infoPanel"></div>
<div class="sub-panel">
<h3>Subwoofer-Box platzieren</h3>
<div class="sub-presets" id="subPresets"></div>
<div class="sub-custom">
<label>B<input id="subW" type="number" min="10" max="150" value="40"><span>cm</span></label>
<label>H<input id="subH" type="number" min="10" max="100" value="35"><span>cm</span></label>
<label>T<input id="subD" type="number" min="10" max="100" value="40"><span>cm</span></label>
</div>
<div class="sub-actions">
<button id="subApply">Box einsetzen</button>
<button id="subRemove" class="ghost" hidden>Entfernen</button>
</div>
<div id="subStatus" class="sub-status" hidden></div>
<p class="sub-hint">Box mit der Maus im Kofferraum verschieben, um Passform zu testen.</p>
</div>
</div>
<div class="viewer-wrap">
<div id="viewer" class="viewer"></div>
<div class="viewer-toolbar">
<label class="switch-toggle">
<input type="checkbox" id="toggleLid" checked>
<span class="switch-track"><span class="switch-knob"></span></span>
<span class="switch-label">Heckklappe <strong id="lidStateLabel">offen</strong></span>
</label>
<label class="switch-toggle" id="floorToggleRow">
<input type="checkbox" id="toggleFloor">
<span class="switch-track"><span class="switch-knob"></span></span>
<span class="switch-label">Zwischenboden <strong id="floorStateLabel">unten</strong></span>
</label>
<label class="viewer-toggle">
<input type="checkbox" id="toggleCase">
Referenz-Koffer (55×40×20 cm) einblenden
</label>
</div>
<div class="viewer-hint">Ziehen (Hintergrund) zum Drehen · Ziehen (Box) zum Verschieben · Scrollen zum Zoomen</div>
</div>
</section>
<section class="empty-state" id="emptyState">
<p>Noch kein Fahrzeug ausgewählt — probiere z. B. eines der Modelle oben, oder tippe eine Marke/ein Modell ein.</p>
</section>
</main>
<footer>
<p>
Hinweis: Die Kofferraumvolumina (Liter) entsprechen öffentlich bekannten, nach VDA-Norm ermittelten
Herstellerangaben. Innenmaße, Radkastenform und die 3D-Geometrie sind gerundete,
<strong>parametrische Näherungen zur Veranschaulichung</strong> — keine exakten CAD-Daten der Hersteller.
Die VIN-Erkennung liest nur das Herstellerkürzel (WMI, erste 3 Zeichen) aus einer kleinen Demo-Tabelle.
</p>
</footer>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"
}
}
</script>
<script type="module" src="app.js"></script>
</body>
</html>