Skip to content

Commit abc83c7

Browse files
TMHSDigitalclaude
andauthored
fix(site): finish the Pages review follow-ups (#209)
The first pass left the landing page cutting 19 skill and rule descriptions mid-clause, listing all 28 showcase props (10k px of page), and the gallery with three identical links per card, a zoom overlay that let focus escape behind it, and no 404 page for renamed examples. - build_site: descriptions shown whole up to 340 chars, else cut at a sentence boundary; backtick spans render as <code>; showcase honors featured_rank like examples; generate a root-absolute 404.html - showcase/gallery.json: feature six varied pieces on the landing page - build_gallery: zoom overlay is a <dialog> (focus trap, Esc, focus return, Close button); the image link on each card leaves the tab order; "View" links carry the entry name; the Tags toggle names the active tag on narrow screens; footer names the right source JSON; README content is substituted last so it can't hit other placeholders - both templates declare color-scheme: dark Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent f9af8cf commit abc83c7

86 files changed

Lines changed: 1860 additions & 1009 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ docs/site-upgrade-plan.md
3636
# Landing-page build outputs (generated at deploy time by scripts/site/build_site.py;
3737
# docs/gallery/ stays committed)
3838
docs/index.html
39+
docs/404.html
3940
docs/fonts/
4041
docs/assets/
4142

‎docs/gallery/anvil/index.html‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="canonical" href="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/anvil/" />
99
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
1010
<meta name="theme-color" content="#1a1b1e" />
11+
<meta name="color-scheme" content="dark" />
1112
<meta property="og:type" content="website" />
1213
<meta property="og:title" content="anvil — Showcase — Blender Developer Tools" />
1314
<meta property="og:description" content="A procedural blacksmith anvil on a timber stump through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract." />
@@ -30,6 +31,7 @@
3031

3132
/* Blender-viewport system, shared with the landing page. Dark only. */
3233
:root {
34+
color-scheme: dark;
3335
--bg: #1a1b1e; --surface: #222327; --surface-2: #2a2b30; --bg2: #131417;
3436
--border: #3a3b40; --text: #e8e9eb; --text-dim: #9698a0;
3537
--select: #ff8c19; --ok: #6dc96d;
@@ -171,6 +173,8 @@
171173
background: var(--bg2); padding: 0; display: block; width: 100%; cursor: zoom-in; line-height: 0; }
172174
.detail-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
173175
.zoom-hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 0.4rem; }
176+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
177+
white-space: nowrap; }
174178
.callout { border: 1px solid color-mix(in srgb, var(--select) 45%, var(--border));
175179
border-left: 3px solid var(--select); border-radius: var(--radius);
176180
background: color-mix(in srgb, var(--select) 7%, var(--surface));
@@ -213,10 +217,15 @@
213217
flex-wrap: wrap; margin-bottom: 0.6rem; color: var(--text-dim); font-size: 0.85rem; }
214218
.src-meta code { font-family: var(--font-mono); font-size: 0.82rem; }
215219

216-
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center;
217-
justify-content: center; background: rgba(0,0,0,0.85); padding: 2rem; cursor: zoom-out; }
218-
.lightbox.open { display: flex; }
220+
.lightbox { border: 0; margin: 0; padding: 2rem; width: 100%; height: 100%; max-width: none;
221+
max-height: none; background: rgba(0,0,0,0.85); cursor: zoom-out; }
222+
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
223+
.lightbox::backdrop { background: transparent; }
219224
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
225+
.lightbox-close { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--surface-2);
226+
color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
227+
font: 500 0.8rem var(--font-sans); padding: 0.4rem 0.75rem; cursor: pointer; }
228+
.lightbox-close:hover { border-color: var(--select); color: var(--select); }
220229

221230
footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
222231
footer .statusbar { max-width: var(--maxw); margin: 0 auto; padding: 0.55rem 1.25rem;
@@ -1661,12 +1670,13 @@ <h2>Source</h2>
16611670
</pre>
16621671
</section>
16631672
</main>
1664-
<div class="lightbox" id="lightbox" role="dialog" aria-label="Full-size render">
1673+
<dialog class="lightbox" id="lightbox" aria-label="Full-size render">
1674+
<button class="lightbox-close" type="button" autofocus>Close</button>
16651675
<img src="../assets/anvil-hero.webp" alt="anvil render, full size" />
1666-
</div>
1676+
</dialog>
16671677
<footer>
16681678
<div class="statusbar">
1669-
<span>generated from <code>examples/gallery.json</code></span>
1679+
<span>generated from <code>showcase/gallery.json</code></span>
16701680
<span>CC-BY-NC-ND-4.0</span>
16711681
<span style="color: var(--ok);">exit 0</span>
16721682
</div>
@@ -1677,11 +1687,10 @@ <h2>Source</h2>
16771687
var hero = document.getElementById('heroZoom');
16781688
var box = document.getElementById('lightbox');
16791689
if (hero && box) {
1680-
hero.addEventListener('click', function () { box.classList.add('open'); });
1681-
box.addEventListener('click', function () { box.classList.remove('open'); });
1682-
document.addEventListener('keydown', function (e) {
1683-
if (e.key === 'Escape') box.classList.remove('open');
1684-
});
1690+
// <dialog>.showModal() traps focus, closes on Escape, and returns
1691+
// focus to the hero button on close. Any click inside closes it.
1692+
hero.addEventListener('click', function () { box.showModal(); });
1693+
box.addEventListener('click', function () { box.close(); });
16851694
}
16861695
var copy = document.getElementById('copyRun');
16871696
if (copy) {

‎docs/gallery/armature-bend/index.html‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="canonical" href="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/armature-bend/" />
99
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
1010
<meta name="theme-color" content="#1a1b1e" />
11+
<meta name="color-scheme" content="dark" />
1112
<meta property="og:type" content="website" />
1213
<meta property="og:title" content="armature-bend — Examples — Blender Developer Tools" />
1314
<meta property="og:description" content="Rigging end to end in the data API — edit_bones chain construction, name-bound vertex groups with smoothstep blend zones, posing, and depsgraph evaluation — bending a tapered tube through rest, half, and full curl." />
@@ -30,6 +31,7 @@
3031

3132
/* Blender-viewport system, shared with the landing page. Dark only. */
3233
:root {
34+
color-scheme: dark;
3335
--bg: #1a1b1e; --surface: #222327; --surface-2: #2a2b30; --bg2: #131417;
3436
--border: #3a3b40; --text: #e8e9eb; --text-dim: #9698a0;
3537
--select: #ff8c19; --ok: #6dc96d;
@@ -171,6 +173,8 @@
171173
background: var(--bg2); padding: 0; display: block; width: 100%; cursor: zoom-in; line-height: 0; }
172174
.detail-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
173175
.zoom-hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 0.4rem; }
176+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
177+
white-space: nowrap; }
174178
.callout { border: 1px solid color-mix(in srgb, var(--select) 45%, var(--border));
175179
border-left: 3px solid var(--select); border-radius: var(--radius);
176180
background: color-mix(in srgb, var(--select) 7%, var(--surface));
@@ -213,10 +217,15 @@
213217
flex-wrap: wrap; margin-bottom: 0.6rem; color: var(--text-dim); font-size: 0.85rem; }
214218
.src-meta code { font-family: var(--font-mono); font-size: 0.82rem; }
215219

216-
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center;
217-
justify-content: center; background: rgba(0,0,0,0.85); padding: 2rem; cursor: zoom-out; }
218-
.lightbox.open { display: flex; }
220+
.lightbox { border: 0; margin: 0; padding: 2rem; width: 100%; height: 100%; max-width: none;
221+
max-height: none; background: rgba(0,0,0,0.85); cursor: zoom-out; }
222+
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
223+
.lightbox::backdrop { background: transparent; }
219224
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
225+
.lightbox-close { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--surface-2);
226+
color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
227+
font: 500 0.8rem var(--font-sans); padding: 0.4rem 0.75rem; cursor: pointer; }
228+
.lightbox-close:hover { border-color: var(--select); color: var(--select); }
220229

221230
footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
222231
footer .statusbar { max-width: var(--maxw); margin: 0 auto; padding: 0.55rem 1.25rem;
@@ -620,9 +629,10 @@ <h2>Source</h2>
620629
</pre>
621630
</section>
622631
</main>
623-
<div class="lightbox" id="lightbox" role="dialog" aria-label="Full-size render">
632+
<dialog class="lightbox" id="lightbox" aria-label="Full-size render">
633+
<button class="lightbox-close" type="button" autofocus>Close</button>
624634
<img src="../assets/armature-bend-hero.webp" alt="armature-bend render, full size" />
625-
</div>
635+
</dialog>
626636
<footer>
627637
<div class="statusbar">
628638
<span>generated from <code>examples/gallery.json</code></span>
@@ -636,11 +646,10 @@ <h2>Source</h2>
636646
var hero = document.getElementById('heroZoom');
637647
var box = document.getElementById('lightbox');
638648
if (hero && box) {
639-
hero.addEventListener('click', function () { box.classList.add('open'); });
640-
box.addEventListener('click', function () { box.classList.remove('open'); });
641-
document.addEventListener('keydown', function (e) {
642-
if (e.key === 'Escape') box.classList.remove('open');
643-
});
649+
// <dialog>.showModal() traps focus, closes on Escape, and returns
650+
// focus to the hero button on close. Any click inside closes it.
651+
hero.addEventListener('click', function () { box.showModal(); });
652+
box.addEventListener('click', function () { box.close(); });
644653
}
645654
var copy = document.getElementById('copyRun');
646655
if (copy) {

‎docs/gallery/attribute-domain-shear/index.html‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="canonical" href="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/attribute-domain-shear/" />
99
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
1010
<meta name="theme-color" content="#1a1b1e" />
11+
<meta name="color-scheme" content="dark" />
1112
<meta property="og:type" content="website" />
1213
<meta property="og:title" content="attribute-domain-shear — Examples — Blender Developer Tools" />
1314
<meta property="og:description" content="POINT vs CORNER color-attribute domains on a shared-vertex pinwheel: CORNER stays exact per face while a naive per-wedge POINT loop shears to the last write at the hub. Crisp petals versus a smeared swirl in one frame; the measured shear equals the palette closed form." />
@@ -30,6 +31,7 @@
3031

3132
/* Blender-viewport system, shared with the landing page. Dark only. */
3233
:root {
34+
color-scheme: dark;
3335
--bg: #1a1b1e; --surface: #222327; --surface-2: #2a2b30; --bg2: #131417;
3436
--border: #3a3b40; --text: #e8e9eb; --text-dim: #9698a0;
3537
--select: #ff8c19; --ok: #6dc96d;
@@ -171,6 +173,8 @@
171173
background: var(--bg2); padding: 0; display: block; width: 100%; cursor: zoom-in; line-height: 0; }
172174
.detail-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
173175
.zoom-hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 0.4rem; }
176+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
177+
white-space: nowrap; }
174178
.callout { border: 1px solid color-mix(in srgb, var(--select) 45%, var(--border));
175179
border-left: 3px solid var(--select); border-radius: var(--radius);
176180
background: color-mix(in srgb, var(--select) 7%, var(--surface));
@@ -213,10 +217,15 @@
213217
flex-wrap: wrap; margin-bottom: 0.6rem; color: var(--text-dim); font-size: 0.85rem; }
214218
.src-meta code { font-family: var(--font-mono); font-size: 0.82rem; }
215219

216-
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center;
217-
justify-content: center; background: rgba(0,0,0,0.85); padding: 2rem; cursor: zoom-out; }
218-
.lightbox.open { display: flex; }
220+
.lightbox { border: 0; margin: 0; padding: 2rem; width: 100%; height: 100%; max-width: none;
221+
max-height: none; background: rgba(0,0,0,0.85); cursor: zoom-out; }
222+
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
223+
.lightbox::backdrop { background: transparent; }
219224
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
225+
.lightbox-close { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--surface-2);
226+
color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
227+
font: 500 0.8rem var(--font-sans); padding: 0.4rem 0.75rem; cursor: pointer; }
228+
.lightbox-close:hover { border-color: var(--select); color: var(--select); }
220229

221230
footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
222231
footer .statusbar { max-width: var(--maxw); margin: 0 auto; padding: 0.55rem 1.25rem;
@@ -706,9 +715,10 @@ <h2>Source</h2>
706715
</pre>
707716
</section>
708717
</main>
709-
<div class="lightbox" id="lightbox" role="dialog" aria-label="Full-size render">
718+
<dialog class="lightbox" id="lightbox" aria-label="Full-size render">
719+
<button class="lightbox-close" type="button" autofocus>Close</button>
710720
<img src="../assets/attribute-domain-shear-hero.webp" alt="attribute-domain-shear render, full size" />
711-
</div>
721+
</dialog>
712722
<footer>
713723
<div class="statusbar">
714724
<span>generated from <code>examples/gallery.json</code></span>
@@ -722,11 +732,10 @@ <h2>Source</h2>
722732
var hero = document.getElementById('heroZoom');
723733
var box = document.getElementById('lightbox');
724734
if (hero && box) {
725-
hero.addEventListener('click', function () { box.classList.add('open'); });
726-
box.addEventListener('click', function () { box.classList.remove('open'); });
727-
document.addEventListener('keydown', function (e) {
728-
if (e.key === 'Escape') box.classList.remove('open');
729-
});
735+
// <dialog>.showModal() traps focus, closes on Escape, and returns
736+
// focus to the hero button on close. Any click inside closes it.
737+
hero.addEventListener('click', function () { box.showModal(); });
738+
box.addEventListener('click', function () { box.close(); });
730739
}
731740
var copy = document.getElementById('copyRun');
732741
if (copy) {

‎docs/gallery/bake-normal-high-to-low/index.html‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="canonical" href="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/bake-normal-high-to-low/" />
99
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
1010
<meta name="theme-color" content="#1a1b1e" />
11+
<meta name="color-scheme" content="dark" />
1112
<meta property="og:type" content="website" />
1213
<meta property="og:title" content="bake-normal-high-to-low — Examples — Blender Developer Tools" />
1314
<meta property="og:description" content="A collapse-decimated hatch plate receiving a Cycles cage-baked tangent normal map from a ribbed high-poly source" />
@@ -30,6 +31,7 @@
3031

3132
/* Blender-viewport system, shared with the landing page. Dark only. */
3233
:root {
34+
color-scheme: dark;
3335
--bg: #1a1b1e; --surface: #222327; --surface-2: #2a2b30; --bg2: #131417;
3436
--border: #3a3b40; --text: #e8e9eb; --text-dim: #9698a0;
3537
--select: #ff8c19; --ok: #6dc96d;
@@ -171,6 +173,8 @@
171173
background: var(--bg2); padding: 0; display: block; width: 100%; cursor: zoom-in; line-height: 0; }
172174
.detail-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
173175
.zoom-hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 0.4rem; }
176+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
177+
white-space: nowrap; }
174178
.callout { border: 1px solid color-mix(in srgb, var(--select) 45%, var(--border));
175179
border-left: 3px solid var(--select); border-radius: var(--radius);
176180
background: color-mix(in srgb, var(--select) 7%, var(--surface));
@@ -213,10 +217,15 @@
213217
flex-wrap: wrap; margin-bottom: 0.6rem; color: var(--text-dim); font-size: 0.85rem; }
214218
.src-meta code { font-family: var(--font-mono); font-size: 0.82rem; }
215219

216-
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center;
217-
justify-content: center; background: rgba(0,0,0,0.85); padding: 2rem; cursor: zoom-out; }
218-
.lightbox.open { display: flex; }
220+
.lightbox { border: 0; margin: 0; padding: 2rem; width: 100%; height: 100%; max-width: none;
221+
max-height: none; background: rgba(0,0,0,0.85); cursor: zoom-out; }
222+
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
223+
.lightbox::backdrop { background: transparent; }
219224
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
225+
.lightbox-close { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--surface-2);
226+
color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
227+
font: 500 0.8rem var(--font-sans); padding: 0.4rem 0.75rem; cursor: pointer; }
228+
.lightbox-close:hover { border-color: var(--select); color: var(--select); }
220229

221230
footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
222231
footer .statusbar { max-width: var(--maxw); margin: 0 auto; padding: 0.55rem 1.25rem;
@@ -824,9 +833,10 @@ <h2>Source</h2>
824833
</pre>
825834
</section>
826835
</main>
827-
<div class="lightbox" id="lightbox" role="dialog" aria-label="Full-size render">
836+
<dialog class="lightbox" id="lightbox" aria-label="Full-size render">
837+
<button class="lightbox-close" type="button" autofocus>Close</button>
828838
<img src="../assets/bake-normal-high-to-low-hero.webp" alt="bake-normal-high-to-low render, full size" />
829-
</div>
839+
</dialog>
830840
<footer>
831841
<div class="statusbar">
832842
<span>generated from <code>examples/gallery.json</code></span>
@@ -840,11 +850,10 @@ <h2>Source</h2>
840850
var hero = document.getElementById('heroZoom');
841851
var box = document.getElementById('lightbox');
842852
if (hero && box) {
843-
hero.addEventListener('click', function () { box.classList.add('open'); });
844-
box.addEventListener('click', function () { box.classList.remove('open'); });
845-
document.addEventListener('keydown', function (e) {
846-
if (e.key === 'Escape') box.classList.remove('open');
847-
});
853+
// <dialog>.showModal() traps focus, closes on Escape, and returns
854+
// focus to the hero button on close. Any click inside closes it.
855+
hero.addEventListener('click', function () { box.showModal(); });
856+
box.addEventListener('click', function () { box.close(); });
848857
}
849858
var copy = document.getElementById('copyRun');
850859
if (copy) {

0 commit comments

Comments
 (0)