{#
Centralized managed footer link row (enhanced).
Rendered from the in-memory cache via the global `footerData`
(footer-manager.getPublicFooter) — no external requests, very fast.
Features:
- Only ACTIVE links, sorted by position.
- Per-link styling: color, bold, italic, font-size (inline style;
color is validated hex-only server-side, so it is safe to embed).
- Global layout: alignment (left/center/right), gap between links,
and a maximum number of links per row (per_row, capped at 15).
A hard row break is forced after every per_row-th link, so each
row shows at most per_row links; extra links continue on the next
row, and every row is aligned per the chosen alignment.
- Separators (" | ") are generated programmatically BETWEEN links
within a row only: the last item of each row (and the very last
item overall) has no trailing separator, so there is never a
dangling "|". Correct automatically when links are disabled/deleted.
- All text is auto-escaped by Nunjucks (no |safe), preventing XSS.
#}
{% if footerData and footerData.links and footerData.links.length > 0 %}
{% set _align = footerData.settings.align or 'center' %}
{% set _gap = footerData.settings.gap %}
{% set _per = footerData.settings.per_row %}
{% set _justify = 'center' %}
{% if _align == 'left' %}{% set _justify = 'flex-start' %}{% endif %}
{% if _align == 'right' %}{% set _justify = 'flex-end' %}{% endif %}
{% endif %}