← Commit history
add the other half: page-owned HTML sections, declared out of order, one reaching a widget as a raw element
5 files changed
+53−7
README.md+7@@ -4,6 +4,13 @@ A deliberately awkward page, built for testing the markdown tag and section ordering shipped in adom/wiki#152. Nothing here is a real part page: it exists to be difficult. +**Both paths are on this page.** The tags below are markdown, in this README. The+sections named `zulu`, `midway` and `alpha` are page-owned HTML declared in+`page.json`, and `zulu` reaches the same pinout widget as a raw custom element+with its own script tag instead of a markdown tag. Declared order is+`zulu, hero, readme, midway, info, alpha`, which is scrambled on purpose: an HTML+section first, the built-ins interleaved, and the alphabetically-first file last.+ What it exercises: - **Every registered widget**, at least once
page.json+9−7@@ -4,14 +4,16 @@ "type": "app", "brief": "A deliberately awkward page for testing the markdown widget tag and section ordering (adom/wiki#152)", "sections": [- "readme",+ "zulu", "hero",- "info"+ "readme",+ "midway",+ "info",+ "alpha" ],- "hero": {- "type": "billboard",- "auto": true,- "headline": "Widget order lab",- "subhead": "A deliberately awkward page for testing the markdown widget tag and section ordering (adom/wiki#152)"+ "section_sources": {+ "zulu": "sections/zulu.html",+ "midway": "sections/midway.html",+ "alpha": "sections/alpha.html" } }
sections/alpha.htmladded+5@@ -0,0 +1,5 @@+<h2>alpha (an HTML section, declared LAST)</h2>+<p>Declared after everything, including <code>info</code>. Its filename sorts+first. If the declared order is honoured, this renders at the bottom of the page.</p>+<p>Empty-ish on purpose: a short section between two tall ones is where a frame+that mis-reports its height becomes obvious.</p>
sections/midway.htmladded+15@@ -0,0 +1,15 @@+<h2>midway (an HTML section, between readme and info)</h2>+<p>This one sits between two built-in sections rather than at either end, which+is the case that a simple "custom sections go after the built-ins" implementation+would get wrong.</p>+<ul>+ <li>A list, so the block is not just one paragraph</li>+ <li>Followed by a table, since a wide child is what makes a frame scroll</li>+</ul>+<table>+ <thead><tr><th>path</th><th>how the widget is reached</th><th>where</th></tr></thead>+ <tbody>+ <tr><td>markdown tag</td><td><code>::adom-pinout{src="..."}</code></td><td>README.md</td></tr>+ <tr><td>raw element</td><td><code><adom-pinout></code> + script tag</td><td>sections/zulu.html</td></tr>+ </tbody>+</table>
sections/zulu.htmladded+17@@ -0,0 +1,17 @@+<h2>zulu (an HTML section, declared FIRST)</h2>+<p>This block is page-owned HTML, not markdown. It is declared before every other+section in <code>page.json</code> even though its file sorts last, so if anything+orders sections by filename or by insertion rather than by the declared array,+this is the block that will show it.</p>+<p>It also carries a widget as a <em>raw custom element</em> rather than a markdown+tag, which is the other half of the comparison: the same widget, reached two+different ways, on one page.</p>+<adom-pinout heading="via raw HTML element, not a markdown tag">+ <script type="application/json">+ {"mpn":"NE555","package":"DIP-8","pins":[+ {"number":1,"name":"GND"},{"number":2,"name":"TRIG"},{"number":3,"name":"OUT"},+ {"number":4,"name":"RESET"},{"number":5,"name":"CTRL"},{"number":6,"name":"THRES"},+ {"number":7,"name":"DISCH"},{"number":8,"name":"VCC"}]}+ <\/script>+</adom-pinout>+<script src="https://wiki.adom.inc/adom/component-widgets/render/widgets/pinout-widget.js"><\/script>