diff --git a/library/components/info/MapInfo.vue b/library/components/info/MapInfo.vue index 5d3d429fb..609072f6f 100644 --- a/library/components/info/MapInfo.vue +++ b/library/components/info/MapInfo.vue @@ -30,10 +30,13 @@ * localStorage, read through a guard: private browsing and sandboxed frames throw on access, and a * hint must never be the thing that breaks a page. The button itself always stays. * - * ★ TEXT. The component's own words are in the 'mapInfo' catalogue area, in all eleven locales. - * The per-map words (lead, takeaway, note) belong to the map's owner and arrive as KEYS in the - * owner's own area, or as ready strings. Everything is resolved at render, never stored, so a live - * language switch re-translates it. A host without vue-i18n has only the page-global locale, which + * ★ TEXT. The component's own words are in the 'mapInfo' catalogue area, in all eleven locales, and + * so are the per-map words, as mapInfo.tab..lead / .takeaway / .note, passed in as KEYS (ready + * strings also work). NOT in each map's own area: a bundle ships only the catalogue areas its source + * names (internal/i18n-areas.mjs), and the gallery that mounts one of these per map names none of the + * maps' areas, so a key there would render blank; naming them would pull every map's whole catalogue + * into the gallery. Everything is resolved at render, never stored, so a live language switch + * re-translates it. A host without vue-i18n has only the page-global locale, which * nothing observes; pass `locale` from a host that tracks it, and the popup also re-reads the * global every time it opens. * @@ -133,6 +136,12 @@ async function hide() { } function onKey(e) { if (e.key === 'Escape') { e.stopPropagation(); hide() } } function toggle(i) { expanded[i] = !expanded[i] } +// ★ A MISSING EXAMPLE IMAGE DISAPPEARS, QUIETLY. The examples are pre-generated files that ship in the +// tree; if one is absent (a shoot not yet landed, a tree copied without it) the reader must see neither +// a broken-image icon nor an empty frame. An artefact whose lead image fails is dropped whole, title +// and all (failed[i]); a single page or card that fails later just hides itself. The text above the +// examples still reads on its own. +function dropImg(e) { const el = e && e.target; if (el) el.style.display = 'none' } // ── examples ───────────────────────────────────────────────────────────────────────────────────── function url(src) { @@ -210,7 +219,6 @@ useShadowStyles(` .mi-table th{ background:#f5f6f9; font-weight:600; } .mi-more{ margin:6px 0 0; font-size:13px; color:#556; } .mi-note{ margin:18px 0 0; padding:10px 12px; border-radius:8px; background:#fff7e6; color:#5a4300; font-size:14px; } - .mi-missing{ padding:24px; border-radius:8px; background:#f4f5f8; color:#556; text-align:center; font-size:14px; } .mi-foot{ padding:12px 20px; border-top:1px solid #e6e8ee; font-size:14px; } .mi-foot label{ display:inline-flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; } .mi-foot input{ width:20px; height:20px; } @@ -262,22 +270,18 @@ useShadowStyles(`

{{ text(leadKey, lead) }}

{{ t('mapInfo.takeaway') }} {{ text(takeawayKey, takeaway) }}

-
+

{{ titleOf(ex) }}