website: one picture viewer (assets/gallery.js) for app and dashboard pictures — declared data-gallery sets, a click on the big picture closes, JS-off still opens the file; site gate 20 + 4 decoys; demo-hp language read back (hu); R-908 (old Resend key in homelab-manifests history); 131 -> 132
gates / gates (push) Successful in 4m25s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
2026-10-08 13:14:24 +02:00
parent 460135a15a
commit 79c53b5f1a
27 changed files with 711 additions and 734 deletions
+30 -1
View File
@@ -29,6 +29,8 @@ Gates (all must pass; non-zero exit on any failure):
17. faq-ld — each FAQ page's FAQPage JSON-LD carries exactly its visible questions and answers
18. tail — nothing after </html> (a stray file-dump summary sat visible below technologiak.html)
19. dash-lang — a page shows dashboard pictures only in its own language (`dashboard-*-hu.webp` / `-en.webp`)
20. viewer — data-gallery openers are <a href> to existing assets; gallery.js (with ?v=) exactly where openers are;
no inline viewer copy
"""
import html as _html, io, json, os, re, sys, unicodedata
@@ -452,8 +454,35 @@ for p, s in pages.items():
fail("%s: a %s dashboard picture (%s) on a %s page — use the page's own language" % (p, m.group(1), m.group(0), want))
print(" dashboard pictures: %d references, each in its page's language" % _dash_n)
# gate 20: the one picture viewer (2026-10-08). A set is declared in the page: every opener is an <a href> to a file
# that exists under website/assets/, carrying data-gallery. A page with openers loads assets/gallery.js with a ?v=; a
# page that loads it has openers; the old inline viewer script appears on no page.
_OPENER_RE = re.compile(r"<(\w+)\b[^>]*\bdata-gallery=\"[^\"]*\"[^>]*>")
_GJS_RE = re.compile(r'<script defer src="/assets/gallery\.js(\?v=[0-9]+)?"></script>')
_open_n = 0
for p, s in pages.items():
openers = [m.group(0) for m in _OPENER_RE.finditer(s)]
_open_n += len(openers)
js = _GJS_RE.findall(s)
if openers and not js:
fail("%s: %d picture opener(s) (data-gallery) but no <script defer src=\"/assets/gallery.js?v=N\">" % (p, len(openers)))
if js and not js[0]:
fail("%s: assets/gallery.js loaded without ?v=" % p)
if js and not openers:
fail("%s: loads assets/gallery.js but declares no data-gallery picture" % p)
for o in openers:
m = re.match(r'<a\b[^>]*\bhref="(/assets/[^"]+)"', o)
if not m:
fail("%s: a data-gallery opener that is not an <a href=\"/assets/…\">: %s" % (p, o[:120]))
continue
if not os.path.exists(os.path.join(W, m.group(1).lstrip("/"))):
fail("%s: a data-gallery opener points at a missing file: %s" % (p, m.group(1)))
if "Screenshot Gallery / Lightbox" in s:
fail("%s: an inline copy of the picture viewer — it lives only in assets/gallery.js" % p)
print(" picture viewer: %d openers, every one a link to an existing file" % _open_n)
if fails:
print("\nSITE GATES FAILED: %d problem(s)" % len(fails))
sys.exit(1)
print("site gates OK — BOM, emoji=0, nav/footer per language, analytics, no CDN, no legacy tokens, no <style>, "
"cache-busted assets, twins + hreflang + globe, lang, same apps, no Hungarian in English, FAQ JSON-LD, clean tail, dashboard pictures per language")
"cache-busted assets, twins + hreflang + globe, lang, same apps, no Hungarian in English, FAQ JSON-LD, clean tail, dashboard pictures per language, one picture viewer")