← back to Dw Photo Capture

public/themes/v16-sticky-notes.html

161 lines

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>v16 — Sticky Notes</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<style>
  :root{
    --board:#ede6da;
    --ink:#2b2b2b;
    --muted:#5f574b;   /* Figma #7d7466 @80% → darkened for 4.5:1 */
    --yellow:#ffe66d;
    --aqua:#a0e7e5;
    --pink:#ffaebc;
    --mint:#b4f8c8;
    --focus:#2b2b2b;
  }
  *{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;display:block;
    background:var(--board);border-radius:36px;overflow:hidden;border:8px solid #000;
    box-shadow:0 20px 60px rgba(0,0,0,.5);color:var(--ink);
  }
  @media (max-width:405.98px){
    .stage{width:100%;margin:0;border:0;border-radius:0;height:100vh;height:100dvh;min-height:640px;}
  }
  .screen{
    position:absolute;inset:0;display:none;flex-direction:column;gap:14px;
    padding:18px 20px 18px;overflow-y:auto;overflow-x:hidden;background:var(--board);
  }
  .screen.is-active{display:flex;}
  .screen.note-bg{background:var(--yellow);}
  .top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;flex-shrink:0;}
  .step{margin:0;font-size:13px;font-weight:600;color:var(--muted);}
  .home{background:#fff;color:var(--ink);border-radius:4px;padding:0 14px;font-size:15px;font-weight:700;box-shadow:0 2px 0 rgba(0,0,0,.12);}
  h1{margin:0;font-size:32px;font-weight:700;text-align:center;}
  h1.left{text-align:left;font-size:28px;}
  h1:focus{outline:none;}
  button{font:inherit;cursor:pointer;border:0;min-height:44px;min-width:44px;color:inherit;}
  button:focus-visible{outline:3px solid var(--focus);outline-offset:3px;}

  .board{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;padding:6px 4px;flex-shrink:0;}
  .note{
    height:170px;border-radius:4px;display:flex;align-items:center;justify-content:center;text-align:center;
    font-size:24px;font-weight:700;color:var(--ink);line-height:1.2;padding:8px;
    box-shadow:0 6px 12px rgba(60,40,10,.14),0 1px 0 rgba(0,0,0,.06);
    transition:transform .15s;position:relative;
  }
  .note::before{ /* tape strip */
    content:"";position:absolute;top:-8px;left:50%;width:54px;height:16px;transform:translateX(-50%) rotate(-2deg);
    background:rgba(255,255,255,.55);border-radius:2px;
  }
  .note:hover{transform:rotate(0deg) scale(1.03) !important;}
  .r3{transform:rotate(3deg);} .rm2{transform:rotate(-2deg);} .r2{transform:rotate(2deg);}
  .y{background:var(--yellow);} .a{background:var(--aqua);} .p{background:var(--pink);} .m{background:var(--mint);}

  .camera{
    flex:1;min-height:220px;background:#1c1c1e;border-radius:6px;display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:18px;font-weight:600;position:relative;
  }
  .camera::after{content:"";position:absolute;inset:18%;border:2px dashed rgba(255,255,255,.35);border-radius:4px;}
  .shutter-row{display:flex;justify-content:center;flex-shrink:0;}
  .shutter{width:96px;height:96px;border-radius:50%;background:#2b2b2b;border:6px solid #fff;}
  .choice{
    width:100%;min-height:72px;border-radius:4px;background:#fff;color:var(--ink);font-size:22px;font-weight:700;flex-shrink:0;
    box-shadow:0 2px 0 rgba(0,0,0,.08);
  }
  .choice[aria-pressed="true"]{background:#2b2b2b;color:#fff;}
  .spacer{flex:1;}
  .big{width:100%;min-height:72px;border-radius:4px;background:#2b2b2b;color:#fff;font-size:22px;font-weight:700;padding:0 16px;flex-shrink:0;}
  .pinned-note{font-size:18px;height:150px;}
  .add-note{background:#fff;font-size:48px;height:150px;}
  .toast{
    position:absolute;left:50%;bottom:110px;transform:translateX(-50%) translateY(10px);
    background:#2b2b2b;color:#fff;padding:12px 18px;border-radius:4px;font-size:15px;font-weight:600;
    opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,transform .2s,visibility 0s .2s;max-width:86%;text-align:center;z-index:5;
  }
  .toast.show{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0);transition:opacity .2s,transform .2s,visibility 0s;}
  @media (prefers-reduced-motion:reduce){ .toast,.toast.show{transition:none} }
</style>
</head>
<body>
<main class="stage" id="app">

  <section class="screen is-active" data-screen="1" aria-labelledby="h1-1">
    <div class="top"><p class="step">1 / 4 · Board</p></div>
    <h1 id="h1-1">Pick a note</h1>
    <div class="board">
      <button class="note y r3" data-go="2" data-job="✏️ New item">New<br>item ✏️</button>
      <button class="note a rm2" data-go="2" data-job="🔧 Fix an item">Fix an<br>item 🔧</button>
      <button class="note p rm2" data-go="2" data-job="🔍 Find it">Find<br>it 🔍</button>
      <button class="note m r2" data-go="2" data-job="📦 Sample in">Sample<br>in 📦</button>
    </div>
  </section>

  <section class="screen note-bg" data-screen="2" aria-labelledby="h1-2">
    <div class="top">
      <p class="step">2 / 4 · Snap</p>
      <button class="home" data-go="1">⌂ Board</button>
    </div>
    <h1 id="h1-2" class="left">✏️ New item</h1>
    <div class="camera" role="img" aria-label="Camera viewfinder">📷&nbsp;&nbsp;point at the sample</div>
    <div class="shutter-row"><button class="shutter" aria-label="Take photo" data-go="3"></button></div>
  </section>

  <section class="screen note-bg" data-screen="3" aria-labelledby="h1-3">
    <div class="top">
      <p class="step">3 / 4 · Write it</p>
      <button class="home" data-go="1">⌂ Board</button>
    </div>
    <h1 id="h1-3" class="left">Jot the brand</h1>
    <button class="choice" data-brand="Thibaut" aria-pressed="false">Thibaut</button>
    <button class="choice" data-brand="York" aria-pressed="false">York</button>
    <button class="choice" data-brand="Kravet" aria-pressed="false">Kravet</button>
    <div class="spacer"></div>
    <button class="big" data-go="4">Stick it on the board 📌</button>
  </section>

  <section class="screen" data-screen="4" aria-labelledby="h1-4">
    <div class="top"><p class="step">4 / 4 · Pinned</p></div>
    <h1 id="h1-4" style="font-size:36px">📌 Pinned!</h1>
    <div class="board">
      <div class="note y r3 pinned-note" id="pinned">Linen — Oat<br>Kravet</div>
      <button class="note add-note" data-go="2" aria-label="Add another note">+</button>
    </div>
    <div class="spacer"></div>
    <button class="big" data-go="1">Back to the board</button>
  </section>

  <div class="toast" id="toast" role="status" aria-live="polite"></div>
</main>

<script>
  const screens = Array.from(document.querySelectorAll('[data-screen]'));
  let brand = 'Kravet';
  function go(n){
    n = String(n);
    if (n === '4') document.getElementById('pinned').innerHTML = 'Linen — Oat<br>' + brand;
    screens.forEach(s => s.classList.toggle('is-active', s.dataset.screen === n));
    const h = document.getElementById('h1-' + n);
    if (h && document.activeElement && document.activeElement !== document.body){
      h.setAttribute('tabindex','-1'); h.focus({preventScroll:true});
    }
  }
  document.addEventListener('click', (e) => {
    const b = e.target.closest('button'); if (!b) return;
    if (b.dataset.job) document.getElementById('h1-2').textContent = b.dataset.job;
    if (b.dataset.brand){
      brand = b.dataset.brand;
      document.querySelectorAll('.choice').forEach(c => c.setAttribute('aria-pressed', String(c === b)));
    }
    if (b.dataset.go) go(b.dataset.go);
  });
</script>
<script>window.__theme = {id:'v16', name:'Sticky Notes', screens:4};</script>
</body>
</html>