ShtukbaseStandard
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.

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>kit-style — showcase</title>
  7. <link rel="stylesheet" href="skins/kit.css">
  8. <link rel="stylesheet" href="kit.css">
  9. <link rel="stylesheet" href="skins/keer.css">
  10. <link rel="stylesheet" href="skins/shtukbase.css">
  11. </head>
  12. <body>
  13. <div class="lx-top">
  14. <nav class="lx-crumbs">
  15. <a class="lx-crumb" href="#"><span class="t">Project</span></a><span class="sep">/</span>
  16. <a class="lx-crumb" href="#"><span class="t">Design</span></a><span class="sep">/</span>
  17. <span class="lx-crumb cur"><span class="t">kit-style</span></span>
  18. </nav>
  19. <div class="lx-tools">
  20. <button class="lx-btn" id="skin" title="Skin">Skin: Kit</button>
  21. <button class="lx-btn" id="theme" title="Theme">Dark theme</button>
  22. <button class="lx-btn on">Chosen</button>
  23. </div>
  24. </div>
  25. <main class="kx-page wide">
  26. <div class="lx-md">
  27. <h1>The style of the lens kit</h1>
  28. <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>&lt;html&gt;</code>.</p>
  29. </div>
  30. <section class="kx-section">
  31. <h2>Buttons and keys</h2>
  32. <div class="kx-row">
  33. <button class="lx-btn">Regular</button>
  34. <button class="lx-btn on">On</button>
  35. <button class="lx-btn icon" aria-label="More">⋯</button>
  36. <span class="lx-kbd">⌘K</span>
  37. <a class="lx-ref" href="#"><span class="t">Link to a record</span></a>
  38. <span class="lx-ref missing"><span class="t">No record</span></span>
  39. </div>
  40. </section>
  41. <section class="kx-section">
  42. <h2>Chips: Shtukbase options</h2>
  43. <div class="kx-row">
  44. <span class="lx-chip">default</span>
  45. <span class="lx-chip" style="--cb: var(--cb-gray); --cf: var(--cf-gray)">gray</span>
  46. <span class="lx-chip" style="--cb: var(--cb-brown); --cf: var(--cf-brown)">brown</span>
  47. <span class="lx-chip" style="--cb: var(--cb-orange); --cf: var(--cf-orange)">orange</span>
  48. <span class="lx-chip" style="--cb: var(--cb-yellow); --cf: var(--cf-yellow)">yellow</span>
  49. <span class="lx-chip" style="--cb: var(--cb-green); --cf: var(--cf-green)">green</span>
  50. <span class="lx-chip" style="--cb: var(--cb-blue); --cf: var(--cf-blue)">blue</span>
  51. <span class="lx-chip" style="--cb: var(--cb-purple); --cf: var(--cf-purple)">purple</span>
  52. <span class="lx-chip" style="--cb: var(--cb-pink); --cf: var(--cf-pink)">pink</span>
  53. <span class="lx-chip" style="--cb: var(--cb-red); --cf: var(--cf-red)">red</span>
  54. </div>
  55. <div class="kx-row" style="margin-top: 8px">
  56. <span class="lx-chip dot" style="--cc: var(--c-blue)">in progress</span>
  57. <span class="lx-chip dot" style="--cc: var(--c-yellow)">waits for a decision</span>
  58. <span class="lx-chip dot" style="--cc: var(--c-green)">done</span>
  59. <span class="lx-chip dot" style="--cc: var(--c-red)">error</span>
  60. </div>
  61. </section>
  62. <section class="kx-section">
  63. <h2>Cards</h2>
  64. <div class="kx-grid">
  65. <div class="lx-card">
  66. <div class="hd"><div class="ttl">Meeting summary</div><span class="cnt">12</span></div>
  67. <div class="sub">The agent collects the outcomes of the meetings of the week and writes a short report for the owner.</div>
  68. <div class="chips"><span class="lx-chip dot" style="--cc: var(--c-blue)">in progress</span><span class="lx-chip">report</span></div>
  69. </div>
  70. <div class="lx-card">
  71. <div class="hd"><div class="ttl">Contract review</div></div>
  72. <div class="mono">work/tasks/contract-review.md</div>
  73. <div class="sub">The owner's decision is needed: accept the change of the payment term or send it back.</div>
  74. <div class="chips"><span class="lx-chip dot" style="--cc: var(--c-yellow)">waits for a decision</span></div>
  75. </div>
  76. <div class="lx-card compact"><div class="hd"><div class="ttl">Compact card</div><span class="cnt">3</span></div></div>
  77. </div>
  78. </section>
  79. <section class="kx-section">
  80. <h2>Board</h2>
  81. <div class="lx-board" style="padding: 0; margin: 0">
  82. <div class="lx-col">
  83. <div class="ch"><span class="lx-chip dot" style="--cc: var(--c-gray)">Queue</span><span class="n">2</span></div>
  84. <div class="lx-card compact"><div class="ttl">Contact import</div></div>
  85. <div class="lx-card compact"><div class="ttl">Weekly report</div></div>
  86. </div>
  87. <div class="lx-col">
  88. <div class="ch"><span class="lx-chip dot" style="--cc: var(--c-blue)">In progress</span><span class="n">1</span></div>
  89. <div class="lx-card compact"><div class="ttl">Meeting summary</div></div>
  90. </div>
  91. <div class="lx-col">
  92. <div class="ch"><span class="lx-chip dot" style="--cc: var(--c-green)">Done</span><span class="n">0</span></div>
  93. <div class="lx-empty">Empty for now</div>
  94. </div>
  95. </div>
  96. </section>
  97. <section class="kx-section">
  98. <h2>Page text (markdown)</h2>
  99. <div class="lx-md">
  100. <h2>Section heading</h2>
  101. <p>A regular paragraph with a <a href="#">link</a>, <code>inline code</code> and <strong>emphasis</strong>.</p>
  102. <ul><li>A list item</li><li>One more item</li></ul>
  103. <blockquote>A quote or a note in the margin.</blockquote>
  104. <table>
  105. <thead><tr><th>Package</th><th>What it gives</th></tr></thead>
  106. <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>
  107. </table>
  108. <pre><code>&lt;link rel="stylesheet" href="design/kit-style/skins/kit.css"&gt;
  109. &lt;link rel="stylesheet" href="design/kit-style/kit.css"&gt;
  110. &lt;link rel="stylesheet" href="design/kit-style/skins/keer.css"&gt;</code></pre>
  111. <div class="callout">A callout: a short note to the text.</div>
  112. </div>
  113. </section>
  114. </main>
  115. <script>
  116. // ?skin=keer (or shtukbase)&theme=dark in the address gives the wanted look at once.
  117. const q = new URLSearchParams(location.search), root = document.documentElement, skinBtn = document.getElementById('skin');
  118. const SKINS = { kit: 'Kit', keer: 'Draft', shtukbase: 'Shtukbase' };
  119. 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']; };
  120. setSkin(q.get('skin'));
  121. if (q.get('theme') === 'dark') { root.dataset.theme = 'dark'; document.getElementById('theme').textContent = 'Light theme'; }
  122. skinBtn.addEventListener('click', () => { const ids = Object.keys(SKINS); setSkin(ids[(ids.indexOf(root.dataset.skin || 'kit') + 1) % ids.length]); });
  123. document.getElementById('theme').addEventListener('click', (e) => {
  124. const dark = document.documentElement.dataset.theme === 'dark';
  125. if (dark) delete document.documentElement.dataset.theme; else document.documentElement.dataset.theme = 'dark';
  126. e.currentTarget.textContent = dark ? 'Dark theme' : 'Light theme';
  127. });
  128. </script>
  129. </body>
  130. </html>