← Commit history

Move the datasheet back into the README as its final section, so it renders below the README instead of above it

AravK ·a6507d6bce ·2mo ago ·parent 340c4d8
2 files changed +79−11
README.html+47
@@ -3736,6 +3736,53 @@ var META={&quot;pasteApertures&quot;:2,&quot;pasteDots&quot;:2};   </section>  +  <!-- ============================ DATASHEET =========================== -->+  <section id="datasheet">+    <div class="sec-head">+      <h2>Datasheet</h2>+      <span class="sub">the source of every number on this page</span>+    </div>+    <div class="ds-prov">+      <div class="field"><span class="k">Document</span><span class="v">IN-S42AT series — Top View SMD LED 0402 PCB Type</span></div>+      <div class="field"><span class="k">Version</span><span class="v">V1.1</span></div>+      <div class="field"><span class="k">Revised</span><span class="v">25 April 2017</span></div>+      <div class="field"><span class="k">Pages</span><span class="v">14</span></div>+      <div class="field"><span class="k">Publisher</span><span class="v">Inolux Corporation</span></div>+      <div class="spacer"></div>+      <span class="age" id="ds-age" data-revised="2017-04-25"><span class="dot"></span><span id="ds-age-text">&mdash;</span></span>+    </div>+    <!-- Page images, not an <iframe src="....pdf">. A sandboxed browsing context may not+         instantiate the PDF viewer: preview/pdf-probe.mjs showed the same URL in the same+         browser loading unsandboxed and failing net::ERR_BLOCKED_BY_CLIENT under the wiki's+         sandbox string. object-src 'none' rules out <embed>/<object> as well. img-src has no+         such restriction, so the pages are WebP and the real PDF is one click away. -->+    <div class="ds-frame" id="ds-scroll">+      <div class="ds-page" data-page="1"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-01.webp" alt="Datasheet page 1 of 14" loading="eager" decoding="async" width="1240" height="1755"><span class="num">1</span></div>+      <div class="ds-page" data-page="2"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-02.webp" alt="Datasheet page 2 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">2</span></div>+      <div class="ds-page" data-page="3"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-03.webp" alt="Datasheet page 3 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">3</span></div>+      <div class="ds-page" data-page="4"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-04.webp" alt="Datasheet page 4 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">4</span></div>+      <div class="ds-page" data-page="5"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-05.webp" alt="Datasheet page 5 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">5</span></div>+      <div class="ds-page" data-page="6"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-06.webp" alt="Datasheet page 6 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">6</span></div>+      <div class="ds-page" data-page="7"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-07.webp" alt="Datasheet page 7 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">7</span></div>+      <div class="ds-page" data-page="8"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-08.webp" alt="Datasheet page 8 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">8</span></div>+      <div class="ds-page" data-page="9"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-09.webp" alt="Datasheet page 9 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">9</span></div>+      <div class="ds-page" data-page="10"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-10.webp" alt="Datasheet page 10 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">10</span></div>+      <div class="ds-page" data-page="11"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-11.webp" alt="Datasheet page 11 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">11</span></div>+      <div class="ds-page" data-page="12"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-12.webp" alt="Datasheet page 12 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">12</span></div>+      <div class="ds-page" data-page="13"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-13.webp" alt="Datasheet page 13 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">13</span></div>+      <div class="ds-page" data-page="14"><img src="https://wiki.adom.inc/blob/component/in-s42atr/ds/page-14.webp" alt="Datasheet page 14 of 14" loading="lazy" decoding="async" width="1240" height="1755"><span class="num">14</span></div>+    </div>+    <div class="ds-foot">+      <span class="pageno">Page <b id="ds-page">1</b> / 14</span>+      <a class="btn" href="https://wiki.adom.inc/download/aravk/in-s42atr/1.0.0/IN-S42ATR-datasheet.pdf" download>Download PDF</a>+      <a class="btn" href="https://www.inolux-corp.com/datasheet/SMDLED/Mono%20Color%20Top%20View/IN-S42AT%20Series_V1.1.pdf" target="_blank" rel="noopener">Read at Inolux &nearr;</a>+      <span>Retrieved 10 August 2026 from+        <a href="https://www.inolux-corp.com/datasheet/SMDLED/Mono%20Color%20Top%20View/IN-S42AT%20Series_V1.1.pdf" target="_blank" rel="noopener">inolux-corp.com</a>,+        byte-identical to the publisher's copy &mdash;+        <code>md5 0bfcecda84d3ef15fc6776f3c4296d8c</code></span>+    </div>+  </section>+ </div>  <script>
README.md+32−11
@@ -54,23 +54,44 @@ Inolux Corporation. Retrieved 10 August 2026 from [inolux-corp.com](https://www.inolux-corp.com/datasheet/SMDLED/Mono%20Color%20Top%20View/IN-S42AT%20Series_V1.1.pdf) and byte-identical to the publisher's copy — `md5 0bfcecda84d3ef15fc6776f3c4296d8c`. -The datasheet is shown by the **wiki's own native Datasheet section**, generated from-`IN-S42ATR-datasheet.pdf` at the repo root. `README.html` deliberately carries no datasheet-of its own — the two cannot coexist tidily, because the wiki generates its section from ANY-PDF anywhere in the repo (recursive scan, no manifest opt-out, measured 2026-08-10), so-"README only" would mean deleting the PDF and "native only" means what you see here.+The datasheet is the **README's own final section** — a strip of WebP page images in `ds/`,+under a provenance header (version, revision date, page count, publisher, and a live-computed+age chip). It is not the PDF itself: a sandboxed browsing context may not instantiate the+browser's PDF viewer, and the README CSP sets `object-src 'none'`. -> **Known gap.** The native section shows no version, revision date or age. The provenance-> strip that did (`V1.1 · 25 April 2017 · 14 pages · Inolux · "9 years 4 mo old"`) lived in-> the README build and is currently switched off. Colby is being asked whether provenance-> can be added to the native viewer. To bring the README version back in the meantime, set-> `INCLUDE_DATASHEET_SECTION = True` in `gen/build_readme.py` and remove the repo PDF.+The PDF is a **release asset**, not a file in this repo:+[download it](https://wiki.adom.inc/download/aravk/in-s42atr/1.0.0/IN-S42ATR-datasheet.pdf)+(`sha256 0ec2cca7d951c192472319d418649c2b6c7fdd21e6c4b7609c2a866781ff2dbe`).++That is deliberate, and it is what puts the datasheet at the BOTTOM of the page. The wiki+generates its own Datasheet section whenever the repo contains a PDF, and renders it+*above* the README — section order is hardcoded in the server template+(`3D Model → Symbol & Footprint → Datasheet → README`), with no `data-order` hook, no+layout field on the page record, and no way for a sandboxed README to reorder its parent.+The scan is **recursive and name-blind**: moving the PDF to `ds/` did not help (the path+just followed it), nor did renaming it away from "datasheet" (a probe named+`IN-S42ATR-source-document.pdf` was picked up just the same; measured 2026-08-10). So the+only way to have the datasheet last is for the README to own it and the repo to hold no PDF.++> **Ask for Colby.** Either (a) render the native Datasheet section *after* the README, or+> make section order configurable, or (b) add a `metadata.datasheet_section: false` opt-out+> so a page can keep the PDF in-repo — preserving `has_datasheet` and the sidebar's+> "Datasheet" asset chip, which this arrangement gives up — while owning the presentation+> itself. Adding version/date/age to the native viewer would close the gap from the other+> direction. To switch back to native-only: set `INCLUDE_DATASHEET_SECTION = False` in+> `gen/build_readme.py` and push `IN-S42ATR-datasheet.pdf` to the repo root.++Regenerate the page images with (fetch the release asset first):++```bash+python3 gen/render_datasheet_pages.py IN-S42ATR-datasheet.pdf ds+```  ## Downloads  | File | Description | |------|-------------|-| [IN-S42ATR-datasheet.pdf](/blob/component/in-s42atr/IN-S42ATR-datasheet.pdf) | Datasheet (V1.1) |+| [IN-S42ATR-datasheet.pdf](https://wiki.adom.inc/download/aravk/in-s42atr/1.0.0/IN-S42ATR-datasheet.pdf) | Datasheet (V1.1) — release asset | | [IN-S42ATR.kicad_sym](/blob/component/in-s42atr/IN-S42ATR.kicad_sym) | KiCad Symbol | | [IN-S42ATR.kicad_mod](/blob/component/in-s42atr/IN-S42ATR.kicad_mod) | KiCad Footprint | | [IN-S42ATR.step](/blob/component/in-s42atr/IN-S42ATR.step) | 3D STEP Model |