Alex Dunmow 2f7239b76a fix(noir): reveal race, light-mode legibility, spacing, media, SVG guard
- Reveal: shorten scroll-reveal safety timeout below the capture settle and
  reveal-all when viewport height is unknown (headless), so main content is no
  longer stranded mid-fade at ~0.25 opacity in both modes; give the article
  template the robust reveal script it was missing. Fixes the washed-out
  light-mode body/quote copy AND the H1-over-first-line overlap (the translateY
  mid-transition was dropping the heading onto the body).
- Headings: add bottom margin per level so H1 no longer butts the first paragraph.
- Article: collapse the aside rail (and its divider border) when empty; populate
  each case article's aside with case-file marginalia.
- Light mode: bump muted-foreground contrast across all five presets (~L38->L30)
  for comfortable AA on secondary text; dark palettes untouched.
- Media: wire 6 licensed noir stock shots as seed media — harbour-night hero
  (with readable light-on-scrim hero text in both modes), per-article lead
  photos, typewriter on About.
- SVG geometry guard: explicit width/height on 26 <use> icon SVGs; replace 15
  unsized ::icon:: shortcodes with sized <svg><use> markup.
- Declare required_icon_packs (lucide, simple-icons).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:47:59 +08:00

13 lines
2.2 KiB
Plaintext

{# button override — square case-file button. Fields (new builtin contract, OVERRIDE-CONTRACT §4): link, style, label, size, icon, iconPosition, newTab, align. The builtin {% button %} tag is replaced by a styled <a> so the noir square-outline look applies. #}
{% with align=align|default:"left" %}
<div data-block-override="noir:button" class="bn-button flex {% if align == "center" %}justify-center{% elif align == "right" %}justify-end{% else %}justify-start{% endif %}{% if class %} {{ class }}{% endif %}">
{% if style == "ghost" or style == "link" %}
<a href="{{ link|default:'#' }}"{% if newTab %} target="_blank" rel="noopener"{% endif %} class="noir-link inline-flex items-center gap-2 text-sm">{% if icon and iconPosition != "right" %}<svg width="16" height="16" aria-hidden="true"><use href="/icons/{{ icon|split:":"|first }}.svg#{{ icon|split:":"|last }}"></use></svg>{% endif %}{{ label|default:"Learn more" }}{% if icon and iconPosition == "right" %}<svg width="16" height="16" aria-hidden="true"><use href="/icons/{{ icon|split:":"|first }}.svg#{{ icon|split:":"|last }}"></use></svg>{% endif %}</a>
{% elif style == "secondary" or style == "outline" %}
<a href="{{ link|default:'#' }}"{% if newTab %} target="_blank" rel="noopener"{% endif %} class="noir-btn">{% if icon and iconPosition != "right" %}<svg width="16" height="16" aria-hidden="true"><use href="/icons/{{ icon|split:":"|first }}.svg#{{ icon|split:":"|last }}"></use></svg>{% endif %}{{ label|default:"Learn more" }}{% if icon and iconPosition == "right" %}<svg width="16" height="16" aria-hidden="true"><use href="/icons/{{ icon|split:":"|first }}.svg#{{ icon|split:":"|last }}"></use></svg>{% endif %}</a>
{% else %}
<a href="{{ link|default:'#' }}"{% if newTab %} target="_blank" rel="noopener"{% endif %} class="noir-btn noir-btn-solid">{% if icon and iconPosition != "right" %}<svg width="16" height="16" aria-hidden="true"><use href="/icons/{{ icon|split:":"|first }}.svg#{{ icon|split:":"|last }}"></use></svg>{% endif %}{{ label|default:"Learn more" }}{% if icon and iconPosition == "right" %}<svg width="16" height="16" aria-hidden="true"><use href="/icons/{{ icon|split:":"|first }}.svg#{{ icon|split:":"|last }}"></use></svg>{% endif %}</a>
{% endif %}
</div>
{% endwith %}