Re-persona noir from photography to the locked detective/true-crime
direction: case-file panels, typewriter type, redaction bars, evidence
board, film grain. High-key gallery (light) / darkroom black + amber
safelight (dark).
- 49 mandatory builtin overrides (chrome, marketing, primitives,
commerce, blog family, auth, page-suggestions), re-skinned from the
frozen builtin defaults with every field/provider/tag/JS preserved;
legacy button/card field reads reconciled to the new contract.
- 7 page templates (default, full-width, landing, article, blog-index,
contact, auth) + themed email wrapper.
- 4 persona blocks (case_file, evidence_board, redacted_quote,
case_dossier); old photography blocks deleted (now overrides).
- 5 dual-mode presets (19 tokens, light+dark tuned).
- Bundled OFL fonts (Source Serif 4, IBM Plex Mono) + licenses;
RECOMMENDED_FONTS/ICONS updated; required_icon_packs=lucide.
- Master pages + seed demo ("The Cold File": home/about/blog x3/contact
with case_tips data table + row_inserted email-admins workflow/login).
- noir CSS vocabulary via manifest css.input_css_append; MID motion
(scroll-reveal + gallery lightbox, reduced-motion honored, no canvas).
Verified: make build exit 0; check-safety 32 checks 19 ok 13 skip -> OK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
2.2 KiB
Plaintext
32 lines
2.2 KiB
Plaintext
{# noir override — auth-status; preserves context.isPublicLoggedIn/publicDisplayName/publicUsername, dropdown onclick, #auth-dropdown-menu, /api/auth/logout, outside-click <script> verbatim. #}
|
|
{% if context.isPublicLoggedIn %}
|
|
<div data-block-override="noir:auth-status" class="auth-status relative">
|
|
<button type="button" onclick="this.nextElementSibling.classList.toggle('hidden')" class="noir-label flex items-center gap-2 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="background-color:hsl(var(--primary));color:hsl(var(--primary-foreground));">{{ context.publicDisplayName|default:context.publicUsername|first|upper }}</span>
|
|
<span>{{ context.publicDisplayName|default:context.publicUsername }}</span>
|
|
<svg 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 noir-file 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 noir-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="noir:auth-status" class="auth-status flex items-center gap-2">
|
|
<a href="/login" class="noir-label px-3 py-1.5 opacity-80 hover:opacity-100 hover:text-primary transition-colors">Sign in</a>
|
|
<a href="/login?tab=register" class="noir-btn noir-btn-solid text-xs">Register</a>
|
|
</div>
|
|
{% endif %}
|