swatchkit 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build.js CHANGED
@@ -698,13 +698,17 @@ function build(settings) {
698
698
  const previewPath = p.sectionSlug
699
699
  ? `preview/${p.sectionSlug}/${p.id}.html`
700
700
  : `preview/${p.id}.html`;
701
+ const previewLink = previewPath.replace(/\.html$/, '');
701
702
 
702
703
  return `
703
- <section id="${p.id}" class="flow">
704
+ <section id="${p.id}" class="region flow">
704
705
  <h2>${p.name} <small style="font-weight: normal; opacity: 0.6; font-size: 0.7em">(${section})</small></h2>
705
- <div class="preview">${p.content}</div>
706
- <div class="swatchkit-preview-link"><a href="${previewPath}">View full screen</a></div>
707
- <pre><code>${escapedContent}</code></pre>
706
+ <iframe src="${previewPath}" style="width: 100%; border: var(--stroke); min-height: 25rem; resize: vertical; overflow: auto;"></iframe>
707
+ <div class="swatchkit-preview-link"><a href="${previewLink}">View full screen</a></div>
708
+ <details>
709
+ <summary>View source</summary>
710
+ <pre><code>${escapedContent}</code></pre>
711
+ </details>
708
712
  </section>
709
713
  `;
710
714
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swatchkit",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "A lightweight tool for creating HTML pattern libraries.",
5
5
  "main": "build.js",
6
6
  "bin": {
package/src/layout.html CHANGED
@@ -10,7 +10,7 @@
10
10
  </head>
11
11
  <body>
12
12
  <div class="swatchkit-ui sidebar">
13
- <nav class="wrapper flow">
13
+ <nav class="wrapper region flow">
14
14
  <header>
15
15
  <h2>SwatchKit</h2>
16
16
  </header>