← back to Model Arena
data/artifacts/0b9bb5066c06/qwen25-7b.html
127 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Which Design Era?</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #f7efe6;
color: #3a2c22;
font-family: 'Didot', serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.top-bar {
position: fixed;
left: 0;
top: 0;
width: 100%;
background-color: #17171c;
padding: 24px;
text-align: left;
color: #f5f2ea;
font-size: 2rem;
letter-spacing: .18em;
}
.game-container {
max-width: 600px;
width: 100%;
padding: 48px;
background-color: white;
border-radius: 14px;
box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.title {
font-size: 38px;
margin-bottom: 32px;
}
.options {
display: flex;
justify-content: space-around;
gap: 16px;
}
.option-btn {
padding: 16px 32px;
background-color: #c9a961;
color: white;
border: none;
border-radius: 14px;
font-size: 18px;
cursor: pointer;
transition: all .3s ease;
}
.option-btn:hover {
transform: translateY(-2px);
}
.fact-reveal {
margin-top: 32px;
text-align: center;
opacity: 0;
animation: fadeUp .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes fadeUp {
from { opacity: 0; transform: translateY(28px); }
to { opacity: 1; transform: none; }
}
</style>
</head>
<body>
<div class="top-bar">DESIGNER WALLCOVERINGS</div>
<div class="game-container">
<h1 class="title">Which Design Era?</h1>
<p id="guess">Guess the era:</p>
<div class="options" id="options">
<button class="option-btn" onclick="checkEra('Victorian')">Victorian</button>
<button class="option-btn" onclick="checkEra('Art Deco')">Art Deco</button>
<button class="option-btn" onclick="checkEra('Mid-Century Modern')">Mid-Century Modern</button>
<button class="option-btn" onclick="checkEra('Grandmillennial')">Grandmillennial</button>
</div>
<p id="score">Score: 0/8</p>
<div id="fact-reveal" class="fact-reveal"></div>
</div>
<script>
const eras = ['Victorian', 'Art Deco', 'Mid-Century Modern', 'Grandmillennial'];
let correctCount = 0;
let score = localStorage.getItem('score') || 0;
function checkEra(era) {
if (eras.includes(era)) {
const factIndex = eras.indexOf(era);
document.getElementById('fact-reveal').textContent = `Correct! The era is ${era}. Here's a fun-fact: ${getFunFact(factIndex)}`;
correctCount++;
score += 1;
} else {
document.getElementById('fact-reveal').textContent = 'Incorrect, try again!';
}
if (correctCount === 8) {
alert(`Congratulations! You scored ${score}/8`);
localStorage.setItem('score', score);
window.location.reload();
} else {
score++;
localStorage.setItem('score', score);
}
document.getElementById('score').textContent = `Score: ${score}/8`;
}
function getFunFact(index) {
const facts = [
"Victorian era is known for its intricate woodwork and ornate designs.",
"Art Deco features geometric patterns and bold, streamlined forms.",
"Mid-Century Modern emphasizes simplicity and functionality in design.",
"Grandmillennial combines futuristic elements with nostalgic references."
];
return facts[index];
}
</script>
</body>
</html>