← back to Dw Photo Capture
public/themes/v17-game-pad.html
193 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>v17 — Game Pad</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<style>
:root{
--bg:#1b1f3b;
--deep:#0f1226;
--panel:#2a2f5a;
--muted:#8e94c7;
--a:#ff4f7b;
--b:#ffc23f;
--x:#3fb8ff;
--y:#5be37d;
--ink:#1b1f3b;
--focus:#ffc23f;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;background:#0a0a0a;font-family:'Inter',system-ui,sans-serif;}
.stage{
width:390px;height:780px;margin:24px auto;position:relative;
background:var(--bg);border-radius:36px;overflow:hidden;
box-shadow:0 20px 60px rgba(0,0,0,.5);border:8px solid #000;color:#fff;
display:flex;flex-direction:column;
}
@media (max-width:405.98px){
.stage{width:100%;height:100dvh;min-height:640px;margin:0;border:0;border-radius:0;}
}
.screen{display:none;flex:1;min-height:0;flex-direction:column;gap:16px;padding:18px 24px 28px;overflow-y:auto;overflow-x:hidden;}
.screen.is-active{display:flex;}
.screen[data-screen="4"]{background:var(--a);}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;flex-shrink:0;}
.step{margin:0;font-size:13px;font-weight:600;color:var(--muted);}
.screen[data-screen="4"] .step{color:var(--ink);}
h1{margin:0;font-weight:700;text-align:center;color:#fff;line-height:1.15;}
h1:focus{outline:none;}
.h-30{font-size:30px;} .h-28{font-size:28px;} .h-26{font-size:26px;}
button{font:inherit;cursor:pointer;border:0;-webkit-tap-highlight-color:transparent;}
button:focus-visible{outline:3px solid var(--focus);outline-offset:3px;}
.screen[data-screen="4"] button:focus-visible{outline-color:#fff;}
.home{
min-width:44px;min-height:44px;padding:0 14px;border-radius:14px;
background:var(--panel);color:#fff;font-size:15px;font-weight:700;
}
.screen[data-screen="4"] .home{background:var(--ink);}
.camera{
background:var(--deep);border-radius:24px;display:flex;align-items:center;justify-content:center;
flex-direction:column;gap:8px;color:#fff;font-size:18px;font-weight:600;position:relative;overflow:hidden;
flex:1 1 auto;min-height:140px;
}
.camera.short{max-height:260px;}
.reticle{width:22px;height:22px;position:relative;}
.reticle::before,.reticle::after{content:"";position:absolute;background:#fff;}
.reticle::before{left:50%;top:0;width:1.5px;height:100%;transform:translateX(-50%);}
.reticle::after{top:50%;left:0;height:1.5px;width:100%;transform:translateY(-50%);}
.reticle span{position:absolute;inset:4px;border:1.5px solid #fff;border-radius:50%;}
.flash{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none;}
.flash.go{animation:flash .35s ease-out;}
@keyframes flash{0%{opacity:.8}100%{opacity:0}}
.pad{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex-shrink:0;}
.pad button{
aspect-ratio:1/1;width:100%;max-width:153px;justify-self:center;border-radius:50%;
display:flex;flex-direction:column;align-items:center;justify-content:center;
font-size:26px;font-weight:700;line-height:1.15;
box-shadow:0 6px 0 rgba(0,0,0,.28);transition:transform .08s ease,box-shadow .08s ease;
}
.pad button:active{transform:translateY(4px);box-shadow:0 2px 0 rgba(0,0,0,.28);}
.pad .ta{background:var(--a);color:#fff;}
.pad .tb{background:var(--b);color:var(--ink);}
.pad .tx{background:var(--x);color:var(--ink);}
.pad .ty{background:var(--y);color:var(--ink);font-size:24px;}
.spacer{flex:1 1 0;min-height:0;}
.shutter-row{display:flex;justify-content:center;flex-shrink:0;}
.shutter{
width:96px;height:96px;border-radius:50%;background:var(--a);
box-shadow:0 0 0 6px #fff inset, 0 0 0 0 transparent;border:0;
}
.shutter:active{transform:scale(.96);}
.choices{display:flex;flex-direction:column;gap:16px;flex-shrink:0;}
.choice{
min-height:72px;border-radius:20px;background:var(--panel);color:#fff;font-size:22px;font-weight:700;
display:flex;align-items:center;justify-content:center;gap:12px;padding:0 16px;
border:3px solid transparent;
}
.choice .cursor{width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:16px solid #fff;visibility:hidden;}
.choice[aria-pressed="true"]{border-color:var(--b);}
.choice[aria-pressed="true"] .cursor{visibility:visible;}
.primary{
min-height:80px;border-radius:20px;font-size:24px;font-weight:700;width:100%;flex-shrink:0;
}
.primary.pink{background:var(--a);color:#fff;}
.primary.dark{background:var(--ink);color:#fff;}
.clear{font-size:56px;font-weight:700;line-height:1.1;}
.stars{margin:0;font-size:40px;text-align:center;letter-spacing:6px;}
.stars span{display:inline-block;}
.is-active .stars span{animation:pop .5s cubic-bezier(.2,1.6,.4,1) both;}
.is-active .stars span:nth-child(2){animation-delay:.12s;}
.is-active .stars span:nth-child(3){animation-delay:.24s;}
@keyframes pop{0%{transform:scale(0)}100%{transform:scale(1)}}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;color:var(--ink);}
@media (prefers-reduced-motion:reduce){
*,*::before,*::after{animation:none !important;transition:none !important;}
}
</style>
</head>
<body>
<main class="stage" id="app">
<!-- 1 / 4 · Press start -->
<section class="screen is-active" data-screen="1" aria-labelledby="s1-h">
<div class="topbar"><p class="step">1 / 4 · Press start</p></div>
<h1 id="s1-h" class="h-30" tabindex="-1">PRESS A JOB</h1>
<div class="camera short" aria-hidden="true">🕹️ ready, player 1</div>
<div class="pad" role="group" aria-label="Pick a job">
<button class="ta" data-go="2" aria-label="A: New item">A<br>NEW</button>
<button class="tb" data-go="2" aria-label="B: Fix an item">B<br>FIX</button>
<button class="tx" data-go="2" aria-label="X: Find an item">X<br>FIND</button>
<button class="ty" data-go="2" aria-label="Y: Sample arrived">Y<br>SAMPLE</button>
</div>
</section>
<!-- 2 / 4 · Aim -->
<section class="screen" data-screen="2" aria-labelledby="s2-h">
<div class="topbar"><p class="step">2 / 4 · Aim</p><button class="home" data-go="1" aria-label="Home">⌂ Home</button></div>
<h1 id="s2-h" class="h-28" tabindex="-1">AIM + PRESS A</h1>
<div class="camera" aria-label="Camera viewfinder (pretend)" role="img">
<div class="reticle"><span></span></div>
<div class="flash" id="flash"></div>
</div>
<div class="shutter-row"><button class="shutter" id="shoot" aria-label="Press A to take photo"></button></div>
</section>
<!-- 3 / 4 · Choose -->
<section class="screen" data-screen="3" aria-labelledby="s3-h">
<div class="topbar"><p class="step">3 / 4 · Choose</p><button class="home" data-go="1" aria-label="Home">⌂ Home</button></div>
<h1 id="s3-h" class="h-26" tabindex="-1">PICK YOUR BRAND</h1>
<div class="choices" role="group" aria-label="Brand">
<button class="choice" aria-pressed="true"><span class="cursor" aria-hidden="true"></span>Thibaut</button>
<button class="choice" aria-pressed="false"><span class="cursor" aria-hidden="true"></span>York</button>
<button class="choice" aria-pressed="false"><span class="cursor" aria-hidden="true"></span>Kravet</button>
</div>
<div class="spacer"></div>
<button class="primary pink" data-go="4">A = SELECT</button>
</section>
<!-- 4 / 4 · Level clear -->
<section class="screen" data-screen="4" aria-labelledby="s4-h">
<div class="topbar"><p class="step">4 / 4 · Level clear</p><button class="home" data-go="1" aria-label="Home">⌂ Home</button></div>
<div class="spacer"></div>
<h1 id="s4-h" class="clear" tabindex="-1">LEVEL<br>CLEAR!</h1>
<p class="stars" aria-label="Three stars"><span>⭐</span> <span>⭐</span> <span>⭐</span></p>
<p class="sr" id="saved-note" aria-live="polite"></p>
<div class="spacer"></div>
<button class="primary dark" data-go="1">PLAY AGAIN</button>
</section>
</main>
<script>
(function(){
const screens = Array.from(document.querySelectorAll('.screen'));
function go(n){
screens.forEach(s => s.classList.toggle('is-active', s.dataset.screen === String(n)));
const active = document.querySelector('.screen.is-active');
const h = active && active.querySelector('h1');
if (h) h.focus({preventScroll:true});
if (String(n) === '4') document.getElementById('saved-note').textContent = 'Saved as a draft.';
}
document.addEventListener('click', e => {
const b = e.target.closest('[data-go]');
if (b) go(b.dataset.go);
});
// brand choice (single select)
document.querySelectorAll('.choice').forEach(c => c.addEventListener('click', () => {
document.querySelectorAll('.choice').forEach(o => o.setAttribute('aria-pressed', o === c ? 'true' : 'false'));
}));
// shutter: flash then advance
document.getElementById('shoot').addEventListener('click', () => {
const f = document.getElementById('flash');
f.classList.remove('go'); void f.offsetWidth; f.classList.add('go');
go(3);
});
})();
</script>
<script>window.__theme = {id:'v17', name:'Game Pad', screens:4};</script>
</body>
</html>