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 +8 -4
- package/package.json +1 -1
- package/src/layout.html +1 -1
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
|
-
<
|
|
706
|
-
<div class="swatchkit-preview-link"><a href="${
|
|
707
|
-
<
|
|
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