{% set page_title = 'Links' %} {% include '_header.html' %} {#- The shared toolbox (ADR-0030). Not documentation and not a runbook — a subject's runbook lives on the check that watches it — but the two or three dashboards and tools somebody mid-incident wants *now*, without hunting through a wiki. So: a launcher. One flat level of groups flowed into columns, each entry a mark and a title, curated order preserved exactly as written. Everything on it comes from the deployment's own `config/links.yaml`; this file owns only how it looks. -#} {%- macro icon_image(link, file, variant, favicon, side) -%} {#- One image. `file` is what the search path resolved for this background; where it resolved nothing we fall through to the entry's own origin favicon, the step before the neutral glyph (ADR-0030 §3). A remote icon keeps its own URL — the route never proxies one. -#} {%- set source = (file.url or url_for('link_icon', variant=variant, name=link.icon)) if file else favicon -%} {%- if source %}{% endif -%} {%- endmacro -%} {%- macro icon_mark(link, icon) -%} {#- A brand logo does not theme: a black mark vanishes on the dark themes and a white one on the light. So an icon that declared a **pair** emits both files and CSS hides one — the choice cannot be made here, because under the `auto` theme the server does not know what the OS will resolve to. Anything else — one file, a favicon — rides a **theme-invariant light chip**, which is what keeps a single-file mark legible in every theme. The chip is the floor, the pair is the upgrade (ADR-0030 §4). -#} {%- set live = icon if icon and not icon.suppressed else none -%} {%- set light = live.file_for('on-light') if live else none -%} {%- set dark = live.file_for('on-dark') if live else none -%} {%- set paired = live and live.paired -%} {%- set favicon = (link.url | site_origin) ~ '/favicon.ico' if link.url | site_origin else '' -%} {%- if paired -%} {{ icon_image(link, light, 'on-light', favicon, 'light') }} {{ icon_image(link, dark, 'on-dark', favicon, 'dark') }} {%- else -%} {#- One file serves both backgrounds, so one image serves both: a second copy would be the same bytes fetched twice. -#} {{ icon_image(link, light, 'on-light', favicon, '') }} {%- endif -%} {%- endmacro -%} {#- The last step of the search path. An icon that fails to load is replaced by this, so the page never shows a browser's broken-image glyph — the failure the reference implementation was showing three of. It is a template rather than an `onerror` attribute because links.js wires the swap: an inline handler would be the one reason a Content-Security-Policy could not be turned on later. It draws in `currentColor`, so it needs neither a chip nor a pair. -#} {% include '_page_end.html' %}