página del paquete→ /design/kit-style/showcase.html
pages/design/kit-style/showcase.html
136 líneas, 7.1 KB. Abrir tal cual (en un proyecto hay otros archivos a su lado; aquí pueden faltar).
El archivo tal como está en el paquete: el código y sus comentarios no se traducen.
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>kit-style — showcase</title>
- <link rel="stylesheet" href="skins/kit.css">
- <link rel="stylesheet" href="kit.css">
- <link rel="stylesheet" href="skins/keer.css">
- <link rel="stylesheet" href="skins/shtukbase.css">
- </head>
- <body>
- <div class="lx-top">
- <nav class="lx-crumbs">
- <a class="lx-crumb" href="#"><span class="t">Project</span></a><span class="sep">/</span>
- <a class="lx-crumb" href="#"><span class="t">Design</span></a><span class="sep">/</span>
- <span class="lx-crumb cur"><span class="t">kit-style</span></span>
- </nav>
- <div class="lx-tools">
- <button class="lx-btn" id="skin" title="Skin">Skin: Kit</button>
- <button class="lx-btn" id="theme" title="Theme">Dark theme</button>
- <button class="lx-btn on">Chosen</button>
- </div>
- </div>
- <main class="kx-page wide">
- <div class="lx-md">
- <h1>The style of the lens kit</h1>
- <p>The same tokens, chips, cards and text as in the Shtukbase lenses, for any HTML page of a project. The classes are in <code>kit.css</code>, the values are in the skins <code>skins/kit.css</code> (“Kit”) and <code>skins/keer.css</code> (“Draft”), with no build step. The “Draft” skin is the attribute <code>data-skin="keer"</code>, the dark theme is <code>data-theme="dark"</code> on <code><html></code>.</p>
- </div>
- <section class="kx-section">
- <h2>Buttons and keys</h2>
- <div class="kx-row">
- <button class="lx-btn">Regular</button>
- <button class="lx-btn on">On</button>
- <button class="lx-btn icon" aria-label="More">⋯</button>
- <span class="lx-kbd">⌘K</span>
- <a class="lx-ref" href="#"><span class="t">Link to a record</span></a>
- <span class="lx-ref missing"><span class="t">No record</span></span>
- </div>
- </section>
- <section class="kx-section">
- <h2>Chips: Shtukbase options</h2>
- <div class="kx-row">
- <span class="lx-chip">default</span>
- <span class="lx-chip" style="--cb: var(--cb-gray); --cf: var(--cf-gray)">gray</span>
- <span class="lx-chip" style="--cb: var(--cb-brown); --cf: var(--cf-brown)">brown</span>
- <span class="lx-chip" style="--cb: var(--cb-orange); --cf: var(--cf-orange)">orange</span>
- <span class="lx-chip" style="--cb: var(--cb-yellow); --cf: var(--cf-yellow)">yellow</span>
- <span class="lx-chip" style="--cb: var(--cb-green); --cf: var(--cf-green)">green</span>
- <span class="lx-chip" style="--cb: var(--cb-blue); --cf: var(--cf-blue)">blue</span>
- <span class="lx-chip" style="--cb: var(--cb-purple); --cf: var(--cf-purple)">purple</span>
- <span class="lx-chip" style="--cb: var(--cb-pink); --cf: var(--cf-pink)">pink</span>
- <span class="lx-chip" style="--cb: var(--cb-red); --cf: var(--cf-red)">red</span>
- </div>
- <div class="kx-row" style="margin-top: 8px">
- <span class="lx-chip dot" style="--cc: var(--c-blue)">in progress</span>
- <span class="lx-chip dot" style="--cc: var(--c-yellow)">waits for a decision</span>
- <span class="lx-chip dot" style="--cc: var(--c-green)">done</span>
- <span class="lx-chip dot" style="--cc: var(--c-red)">error</span>
- </div>
- </section>
- <section class="kx-section">
- <h2>Cards</h2>
- <div class="kx-grid">
- <div class="lx-card">
- <div class="hd"><div class="ttl">Meeting summary</div><span class="cnt">12</span></div>
- <div class="sub">The agent collects the outcomes of the meetings of the week and writes a short report for the owner.</div>
- <div class="chips"><span class="lx-chip dot" style="--cc: var(--c-blue)">in progress</span><span class="lx-chip">report</span></div>
- </div>
- <div class="lx-card">
- <div class="hd"><div class="ttl">Contract review</div></div>
- <div class="mono">work/tasks/contract-review.md</div>
- <div class="sub">The owner's decision is needed: accept the change of the payment term or send it back.</div>
- <div class="chips"><span class="lx-chip dot" style="--cc: var(--c-yellow)">waits for a decision</span></div>
- </div>
- <div class="lx-card compact"><div class="hd"><div class="ttl">Compact card</div><span class="cnt">3</span></div></div>
- </div>
- </section>
- <section class="kx-section">
- <h2>Board</h2>
- <div class="lx-board" style="padding: 0; margin: 0">
- <div class="lx-col">
- <div class="ch"><span class="lx-chip dot" style="--cc: var(--c-gray)">Queue</span><span class="n">2</span></div>
- <div class="lx-card compact"><div class="ttl">Contact import</div></div>
- <div class="lx-card compact"><div class="ttl">Weekly report</div></div>
- </div>
- <div class="lx-col">
- <div class="ch"><span class="lx-chip dot" style="--cc: var(--c-blue)">In progress</span><span class="n">1</span></div>
- <div class="lx-card compact"><div class="ttl">Meeting summary</div></div>
- </div>
- <div class="lx-col">
- <div class="ch"><span class="lx-chip dot" style="--cc: var(--c-green)">Done</span><span class="n">0</span></div>
- <div class="lx-empty">Empty for now</div>
- </div>
- </div>
- </section>
- <section class="kx-section">
- <h2>Page text (markdown)</h2>
- <div class="lx-md">
- <h2>Section heading</h2>
- <p>A regular paragraph with a <a href="#">link</a>, <code>inline code</code> and <strong>emphasis</strong>.</p>
- <ul><li>A list item</li><li>One more item</li></ul>
- <blockquote>A quote or a note in the margin.</blockquote>
- <table>
- <thead><tr><th>Package</th><th>What it gives</th></tr></thead>
- <tbody><tr><td>kit-style</td><td>the kit style for pages</td></tr><tr><td>keer-style</td><td>the keer style</td></tr></tbody>
- </table>
- <pre><code><link rel="stylesheet" href="design/kit-style/skins/kit.css">
- <link rel="stylesheet" href="design/kit-style/kit.css">
- <link rel="stylesheet" href="design/kit-style/skins/keer.css"></code></pre>
- <div class="callout">A callout: a short note to the text.</div>
- </div>
- </section>
- </main>
- <script>
- // ?skin=keer (or shtukbase)&theme=dark in the address gives the wanted look at once.
- const q = new URLSearchParams(location.search), root = document.documentElement, skinBtn = document.getElementById('skin');
- const SKINS = { kit: 'Kit', keer: 'Draft', shtukbase: 'Shtukbase' };
- const setSkin = (s) => { if (SKINS[s] && s !== 'kit') root.dataset.skin = s; else delete root.dataset.skin; skinBtn.textContent = 'Skin: ' + SKINS[root.dataset.skin || 'kit']; };
- setSkin(q.get('skin'));
- if (q.get('theme') === 'dark') { root.dataset.theme = 'dark'; document.getElementById('theme').textContent = 'Light theme'; }
- skinBtn.addEventListener('click', () => { const ids = Object.keys(SKINS); setSkin(ids[(ids.indexOf(root.dataset.skin || 'kit') + 1) % ids.length]); });
- document.getElementById('theme').addEventListener('click', (e) => {
- const dark = document.documentElement.dataset.theme === 'dark';
- if (dark) delete document.documentElement.dataset.theme; else document.documentElement.dataset.theme = 'dark';
- e.currentTarget.textContent = dark ? 'Dark theme' : 'Light theme';
- });
- </script>
- </body>
- </html>