Prototype build incorporating Amy's gate review findings: - Custom --cd-surface-* tokens (oklch), not Open Props - Custom --cd-grid-* tokens via gray-3/gray-2 - --cd-scale: 1 = default 2x display scale, all dims calc() - --cd-font-label using font-neo-grotesque for spine legibility Files: - opencd.css (622 lines) — full monolith with variables, reset, components, grid overlays, advisory badge, print styles, responsive containers - templates/jewel-case.html — front jewel case with spine + disc + advisory - templates/leaflet.html — 4-page booklet with page-turn navigation - templates/back-tray.html — back tray with tracklist, dual spines, grid GPG: ABE295FFEB4571F8 — H.M. Murdock <murdock@a-team.dev>
184 lines
No EOL
6.6 KiB
HTML
184 lines
No EOL
6.6 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>OpenCD · Leaflet</title>
|
||
<link rel="stylesheet" href="../opencd.css">
|
||
<style>
|
||
/* Demo page chrome */
|
||
body {
|
||
min-height: 100dvh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 2rem;
|
||
padding: 2rem;
|
||
background: oklch(92% .012 85);
|
||
font-family: var(--font-system-ui);
|
||
}
|
||
|
||
.demo-controls {
|
||
display: flex;
|
||
gap: 1rem;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
font-size: .875rem;
|
||
}
|
||
|
||
.demo-controls button {
|
||
padding: .5rem 1rem;
|
||
border: 1px solid var(--gray-6);
|
||
border-radius: var(--radius-2);
|
||
background: var(--gray-0);
|
||
font-family: inherit;
|
||
cursor: pointer;
|
||
transition: background var(--cd-transition-duration);
|
||
}
|
||
|
||
.demo-controls button:hover {
|
||
background: var(--gray-2);
|
||
}
|
||
|
||
.demo-controls button:disabled {
|
||
opacity: .4;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
.demo-controls .page-indicator {
|
||
font-family: var(--font-mono);
|
||
font-size: .875rem;
|
||
color: var(--gray-6);
|
||
min-width: 8ch;
|
||
text-align: center;
|
||
}
|
||
|
||
.demo-footnote {
|
||
font-size: .75rem;
|
||
color: var(--gray-6);
|
||
text-align: center;
|
||
max-width: 480px;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/* ============================================================
|
||
Leaflet-specific overrides for multi-page demo
|
||
============================================================ */
|
||
.leaflet-content--multi {
|
||
max-width: calc(var(--cd-leaflet-size) + var(--cd-space-inset) * 2);
|
||
}
|
||
|
||
.leaflet-pages {
|
||
display: flex;
|
||
gap: var(--cd-space-stack);
|
||
flex-direction: column;
|
||
position: relative;
|
||
}
|
||
|
||
.leaflet-pages .leaflet-page {
|
||
display: none;
|
||
}
|
||
|
||
.leaflet-pages .leaflet-page[data-leaflet-active="true"] {
|
||
display: flex;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<!-- ============================================================
|
||
LEAFLET — Multi-page booklet
|
||
============================================================ -->
|
||
<main class="cd-jewel-case" style="width: auto; box-shadow: none; background: transparent;">
|
||
|
||
<div class="cd-jewel-inner" style="grid-column:1/-1; gap: var(--cd-space-inset);">
|
||
|
||
<section class="leaflet-content leaflet-content--multi cd-grid--crosshatch">
|
||
|
||
<div class="leaflet-pages" id="pages">
|
||
|
||
<article class="leaflet-page" data-leaflet-page="0" data-leaflet-active="true">
|
||
<h1>Design Notes</h1>
|
||
<p>This booklet is a demonstration of the leaflet component — the insert booklet found inside a standard CD jewel case. Each page measures 120 × 120 mm (240px at 2× scale), matching the ISO 15727 standard for CD packaging.</p>
|
||
<span class="leaflet-meta">Page 1 of 4 · v0.1.0</span>
|
||
</article>
|
||
|
||
<article class="leaflet-page" data-leaflet-page="1" data-leaflet-active="false">
|
||
<h1>Architecture</h1>
|
||
<p>OpenCD is built on Open Props — a design token framework by Adam Argyle. Every dimension, color, and spacing value maps to a custom property, with fallback values for standalone use. The framework includes:</p>
|
||
<ul style="margin-left:1rem; color:var(--cd-text-secondary); line-height:1.6;">
|
||
<li>CD dimension tokens at 2× scale</li>
|
||
<li>Semantic color aliases on Open Props</li>
|
||
<li>ASW-inspired surface layers</li>
|
||
<li>Visible grid overlays (tray paper aesthetic)</li>
|
||
</ul>
|
||
<span class="leaflet-meta">Page 2 of 4 · v0.1.0</span>
|
||
</article>
|
||
|
||
<article class="leaflet-page" data-leaflet-page="2" data-leaflet-active="false">
|
||
<h1>Token System</h1>
|
||
<p>The variable layer defines ~40 custom properties organized into semantic groups:</p>
|
||
<dl style="margin-top:.5rem; display:grid; gap:.25rem; font-size:var(--size-fluid-1);">
|
||
<dt style="font-family:var(--font-mono); color:var(--gray-6);">--cd-jewel-width</dt>
|
||
<dd style="color:var(--gray-7);">280px × scale</dd>
|
||
<dt style="font-family:var(--font-mono); color:var(--gray-6);">--cd-surface-1</dt>
|
||
<dd style="color:var(--gray-7);">oklch(30% .015 265)</dd>
|
||
<dt style="font-family:var(--font-mono); color:var(--gray-6);">--cd-font-label</dt>
|
||
<dd style="color:var(--gray-7);">font-neo-grotesque</dd>
|
||
</dl>
|
||
<span class="leaflet-meta">Page 3 of 4 · v0.1.0</span>
|
||
</article>
|
||
|
||
<article class="leaflet-page" data-leaflet-page="3" data-leaflet-active="false">
|
||
<h1>Credits</h1>
|
||
<p>OpenCD is a project of the A-Team design collective — a framework for physical-digital design artifacts that bridge the gap between print packaging and web implementations.</p>
|
||
<p style="margin-top:.5rem;">Design: Hannibal & Face<br>Engineering: Murdock & B.A.<br>Quality: Amy</p>
|
||
<span class="leaflet-meta">Page 4 of 4 · MMXXV</span>
|
||
</article>
|
||
|
||
</div>
|
||
</section>
|
||
|
||
<!-- Human Advisory badge (small) -->
|
||
<aside class="human-advisory" style="position:static; align-self:flex-end;">
|
||
<span class="advisory-row advisory-row--black">PROTOTYPE</span>
|
||
<span class="advisory-row advisory-row--white">OPENCD v0.1</span>
|
||
</aside>
|
||
|
||
</div>
|
||
</main>
|
||
|
||
<!-- Demo controls -->
|
||
<div class="demo-controls">
|
||
<button id="prev-btn" onclick="flipPage(-1)" disabled>← Prev</button>
|
||
<span class="page-indicator" id="page-indicator">Page 1 / 4</span>
|
||
<button id="next-btn" onclick="flipPage(1)">Next →</button>
|
||
</div>
|
||
|
||
<div class="demo-footnote">
|
||
Leaflet booklet demo · 4-page layout at 120 × 120 mm each · Page-turn via inline JS
|
||
</div>
|
||
|
||
<script>
|
||
let currentPage = 0;
|
||
const totalPages = 4;
|
||
|
||
function flipPage(direction) {
|
||
const pages = document.querySelectorAll('.leaflet-page');
|
||
const old = currentPage;
|
||
|
||
currentPage = Math.max(0, Math.min(totalPages - 1, currentPage + direction));
|
||
|
||
if (old === currentPage) return;
|
||
|
||
pages[old].dataset.leafletActive = 'false';
|
||
pages[currentPage].dataset.leafletActive = 'true';
|
||
|
||
document.getElementById('page-indicator').textContent = 'Page ' + (currentPage + 1) + ' / ' + totalPages;
|
||
document.getElementById('prev-btn').disabled = currentPage === 0;
|
||
document.getElementById('next-btn').disabled = currentPage === totalPages - 1;
|
||
}
|
||
</script>
|
||
</body>
|
||
</html> |