Alex Dunmow 930199fd12 fix(magazine-bold): clamp hero headline, article H1, lookbook imagery, drop-cap clearance, SVG geometry guard
- cover_story: clamp headline to its reserved 8-col track (mb-cover-folio) so it
  never crosses the deck column or bleeds off-viewport; kicker + CTA stay in
  frame; deck in a reserved right column; wire duotone cover image.
- article template: render the page <h1> exactly once (was never rendered);
  fix the multi-line ninjatpl comment that failed theme registration.
- lookbook + hero + seed: add seed/media (sneakers, editorial-figure,
  streetwear-look, sneakers-street; studio-portrait avoided) and wire image
  slots; expand the offcut-method article to ~9 paragraphs.
- drop-cap: extra clearance so wrapped lines do not crowd the cap.
- SVG geometry guard: add explicit width/height to all icon <use> SVGs and
  replace icon shortcodes with sized <svg> markup (balloon guard).
- refresh gallery screenshots (home/about/article x light+dark, retina).

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

32 lines
2.3 KiB
Plaintext

{# auth-status (magazine-bold) — header login state; small-caps links, hairline monogram and quiet mb-panel dropdown. Driven by context.isPublicLoggedIn / context.publicDisplayName / context.publicUsername; logout posts /api/auth/logout. #}
{% if context.isPublicLoggedIn %}
<div data-block-override="magazine-bold:auth-status" class="auth-status relative">
<button type="button" onclick="this.nextElementSibling.classList.toggle('hidden')" class="mb-caps flex items-center gap-2 text-xs opacity-90 hover:opacity-100 px-3 py-1.5 transition-colors">
<span class="inline-flex h-7 w-7 items-center justify-center rounded-full text-[0.7rem] font-bold" style="border:1px solid hsl(var(--border));color:hsl(var(--accent));">{{ context.publicDisplayName|default:context.publicUsername|first|upper }}</span>
<span>{{ context.publicDisplayName|default:context.publicUsername }}</span>
<svg width="16" height="16" class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
</button>
<div id="auth-dropdown-menu" class="hidden absolute right-0 top-full mt-1 w-48 mb-panel bg-card py-1 z-50">
<a href="/account" class="block px-4 py-2 text-sm text-foreground hover:bg-accent">My profile</a>
<a href="/account/reviews" class="block px-4 py-2 text-sm text-foreground hover:bg-accent">My reviews</a>
<hr class="my-1 mb-rule"/>
<button hx-post="/api/auth/logout" hx-swap="none" class="block w-full text-left px-4 py-2 text-sm text-destructive hover:bg-accent">Sign out</button>
</div>
<script>
(function(){
document.addEventListener('click', function(e) {
var menu = document.getElementById('auth-dropdown-menu');
var btn = document.querySelector('.auth-status > button');
if (!menu || !btn) return;
if (!btn.contains(e.target) && !menu.contains(e.target)) { menu.classList.add('hidden'); }
});
})();
</script>
</div>
{% else %}
<div data-block-override="magazine-bold:auth-status" class="auth-status flex items-center gap-2">
<a href="/login" class="mb-caps text-xs px-3 py-1.5 opacity-80 hover:opacity-100 hover:text-[hsl(var(--accent))] transition-colors">Sign in</a>
<a href="/login?tab=register" class="mb-button text-xs">Reserve</a>
</div>
{% endif %}