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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Ultimate Sleeper Generator</title>
|
| 7 |
+
<style>
|
| 8 |
+
:root {
|
| 9 |
+
--bg: #121212;
|
| 10 |
+
--card: #1e1e1e;
|
| 11 |
+
--accent: #bb86fc;
|
| 12 |
+
--text: #e0e0e0;
|
| 13 |
+
--success: #4caf50;
|
| 14 |
+
--danger: #f44336;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
body {
|
| 18 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 19 |
+
background-color: var(--bg);
|
| 20 |
+
color: var(--text);
|
| 21 |
+
display: flex;
|
| 22 |
+
flex-direction: column;
|
| 23 |
+
align-items: center;
|
| 24 |
+
padding: 20px;
|
| 25 |
+
margin: 0;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.container {
|
| 29 |
+
max-width: 800px;
|
| 30 |
+
width: 100%;
|
| 31 |
+
background: var(--card);
|
| 32 |
+
padding: 20px;
|
| 33 |
+
border-radius: 12px;
|
| 34 |
+
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.image-display {
|
| 38 |
+
width: 100%;
|
| 39 |
+
min-height: 400px;
|
| 40 |
+
background: #000;
|
| 41 |
+
border-radius: 8px;
|
| 42 |
+
margin-bottom: 20px;
|
| 43 |
+
display: flex;
|
| 44 |
+
justify-content: center;
|
| 45 |
+
align-items: center;
|
| 46 |
+
overflow: hidden;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
img {
|
| 50 |
+
max-width: 100%;
|
| 51 |
+
height: auto;
|
| 52 |
+
border-radius: 4px;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.controls {
|
| 56 |
+
display: flex;
|
| 57 |
+
gap: 10px;
|
| 58 |
+
margin-bottom: 20px;
|
| 59 |
+
flex-wrap: wrap;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
button {
|
| 63 |
+
padding: 12px 24px;
|
| 64 |
+
border: none;
|
| 65 |
+
border-radius: 6px;
|
| 66 |
+
cursor: pointer;
|
| 67 |
+
font-weight: bold;
|
| 68 |
+
transition: 0.3s;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.btn-primary { background: var(--accent); color: #000; }
|
| 72 |
+
.btn-tab { background: #333; color: #fff; }
|
| 73 |
+
.btn-tab.active { background: #555; border: 1px solid var(--accent); }
|
| 74 |
+
|
| 75 |
+
.specs-panel {
|
| 76 |
+
background: #252525;
|
| 77 |
+
padding: 15px;
|
| 78 |
+
border-radius: 8px;
|
| 79 |
+
margin-top: 10px;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.component-list {
|
| 83 |
+
display: grid;
|
| 84 |
+
grid-template-columns: 1fr 1fr;
|
| 85 |
+
gap: 10px;
|
| 86 |
+
list-style: none;
|
| 87 |
+
padding: 0;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.item { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
|
| 91 |
+
.check { color: var(--success); }
|
| 92 |
+
.cross { color: var(--danger); }
|
| 93 |
+
|
| 94 |
+
.accordion {
|
| 95 |
+
width: 100%;
|
| 96 |
+
background: #2a2a2a;
|
| 97 |
+
border: none;
|
| 98 |
+
text-align: left;
|
| 99 |
+
padding: 15px;
|
| 100 |
+
color: var(--accent);
|
| 101 |
+
font-weight: bold;
|
| 102 |
+
cursor: pointer;
|
| 103 |
+
border-radius: 4px;
|
| 104 |
+
margin-top: 10px;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.panel {
|
| 108 |
+
max-height: 0;
|
| 109 |
+
overflow: hidden;
|
| 110 |
+
transition: max-height 0.2s ease-out;
|
| 111 |
+
background: #1a1a1a;
|
| 112 |
+
padding: 0 15px;
|
| 113 |
+
}
|
| 114 |
+
</style>
|
| 115 |
+
</head>
|
| 116 |
+
<body>
|
| 117 |
+
|
| 118 |
+
<div class="container">
|
| 119 |
+
<h2 style="text-align: center; color: var(--accent);">STREET RACER: SLEEPER GEN</h2>
|
| 120 |
+
|
| 121 |
+
<div class="image-display">
|
| 122 |
+
<img id="genImage" src="https://image.pollinations.ai/prompt/rust%20covered%201990%20economy%20car%20parked%20in%20alleyway%20photorealistic?width=800&height=500&nologo=true" alt="Sleeper Car">
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<div class="controls">
|
| 126 |
+
<button class="btn-primary" onclick="randomize()">RANDOMIZE BUILD</button>
|
| 127 |
+
<button class="btn-tab active" id="tabExterior" onclick="setMode('exterior')">EXTERIOR</button>
|
| 128 |
+
<button class="btn-tab" id="tabOpen" onclick="setMode('hood_open')">HOOD OPEN</button>
|
| 129 |
+
</div>
|
| 130 |
+
|
| 131 |
+
<button class="accordion" onclick="toggleAccordion()">ENGINE BAY SPECS ▼</button>
|
| 132 |
+
<div class="panel" id="enginePanel">
|
| 133 |
+
<div style="padding: 15px;">
|
| 134 |
+
<p id="engineDesc">Massive Turbocharged V8 swap, custom piping, intercooler hidden behind rusted grill.</p>
|
| 135 |
+
<div class="component-list">
|
| 136 |
+
<div class="item"><span class="cross">✘</span> Stock 1.6L Engine</div>
|
| 137 |
+
<div class="item"><span class="check">✔</span> Precision 76mm Turbo</div>
|
| 138 |
+
<div class="item"><span class="cross">✘</span> OEM Exhaust</div>
|
| 139 |
+
<div class="item"><span class="check">✔</span> Straight-pipe Hood Exit</div>
|
| 140 |
+
<div class="item"><span class="cross">✘</span> All-Season Tires</div>
|
| 141 |
+
<div class="item"><span class="check">✔</span> Rear Mickey Thompson Slicks</div>
|
| 142 |
+
<div class="item"><span class="check">✔</span> Haltech ECU System</div>
|
| 143 |
+
<div class="item"><span class="check">✔</span> 10-Point Roll Cage</div>
|
| 144 |
+
</div>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
|
| 148 |
+
<div class="specs-panel">
|
| 149 |
+
<strong>Current Build Style:</strong> <span id="styleText">Rusted 90s Commuter</span>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<script>
|
| 154 |
+
const cars = [
|
| 155 |
+
"1994 Toyota Corolla beige rusted",
|
| 156 |
+
"1998 Honda Civic faded paint peeling",
|
| 157 |
+
"1992 Volvo 240 wagon wood paneling",
|
| 158 |
+
"2001 Ford Taurus dented door silver",
|
| 159 |
+
"1995 Nissan Sentra mismatched bumper"
|
| 160 |
+
];
|
| 161 |
+
|
| 162 |
+
const engines = [
|
| 163 |
+
"Twin turbo LS swap engine bay chrome piping",
|
| 164 |
+
"built 2JZ swap massive single turbo glowing manifold",
|
| 165 |
+
"K24 turbo swap engine bay wire tucked red valve cover",
|
| 166 |
+
"Supercharged V8 hemi swap cramped engine bay"
|
| 167 |
+
];
|
| 168 |
+
|
| 169 |
+
let currentCar = cars[0];
|
| 170 |
+
let currentMode = 'exterior';
|
| 171 |
+
|
| 172 |
+
function randomize() {
|
| 173 |
+
currentCar = cars[Math.floor(Math.random() * cars.length)];
|
| 174 |
+
const styles = ["Rusted Beater", "Junkyard Gem", "Grandma's Commuter", "Patina King"];
|
| 175 |
+
document.getElementById('styleText').innerText = styles[Math.floor(Math.random() * styles.length)];
|
| 176 |
+
updateImage();
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
function setMode(mode) {
|
| 180 |
+
currentMode = mode;
|
| 181 |
+
document.getElementById('tabExterior').classList.toggle('active', mode === 'exterior');
|
| 182 |
+
document.getElementById('tabOpen').classList.toggle('active', mode === 'hood_open');
|
| 183 |
+
updateImage();
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
function updateImage() {
|
| 187 |
+
const img = document.getElementById('genImage');
|
| 188 |
+
const engineType = engines[Math.floor(Math.random() * engines.length)];
|
| 189 |
+
|
| 190 |
+
let prompt = "";
|
| 191 |
+
if(currentMode === 'exterior') {
|
| 192 |
+
prompt = `Full view of a ${currentCar} street racer sleeper, deceptive look, stock wheels in front, drag slicks in back, photorealistic, 8k, urban setting`;
|
| 193 |
+
} else if (currentMode === 'hood_open') {
|
| 194 |
+
prompt = `A ${currentCar} with the hood removed showing a ${engineType}, high detail mechanical parts, oil stains, racing components, photorealistic`;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
img.src = `https://image.pollinations.ai/prompt/${encodeURIComponent(prompt)}?width=800&height=500&nologo=true`;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
function toggleAccordion() {
|
| 201 |
+
const panel = document.getElementById('enginePanel');
|
| 202 |
+
if (panel.style.maxHeight) {
|
| 203 |
+
panel.style.maxHeight = null;
|
| 204 |
+
} else {
|
| 205 |
+
panel.style.maxHeight = panel.scrollHeight + "px";
|
| 206 |
+
// When showing engine bay, update image to engine focus
|
| 207 |
+
const enginePrompt = engines[Math.floor(Math.random() * engines.length)] + " highly detailed 8k photography";
|
| 208 |
+
document.getElementById('genImage').src = `https://image.pollinations.ai/prompt/${encodeURIComponent(enginePrompt)}?width=800&height=500&nologo=true`;
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
</script>
|
| 212 |
+
</body>
|
| 213 |
</html>
|