Pivot from the wellness/spa WZ-021 state to the locked bakery/patisserie persona. Codeless .bnp, verified against cms a0f07e2ae (OVERRIDE-CONTRACT). - 49 mandatory template overrides (+ manifest entries), re-skinned from the field-correct coffee sibling: every content field, provider var, custom tag and JS preserved verbatim; only styling + copy changed. §4 button/card reads reconciled (link/style/label, text/media). - 7 page templates: default, landing, article, full-width, blog-index, contact, auth. - 4 persona blocks: seasonal_specials, cake_gallery, order_ribbon, bakers_note (old 6 duplicate-builtin blocks deleted -> now overrides). - 5 dual-mode presets (morning-haze/berry-cream/matcha-cream/lavender-honey/ peach-blossom), all 19 tokens, tuned dusk-berry dark. - Bundled OFL fonts: Fraunces (heading) + Quicksand (body); all font-family via var(--font-*). Themed email-safe wrapper. master_pages + demo seed (home, about, blog x3, contact w/ data-table + row_inserted email workflow, login). - CSS-FIRST motion: watercolor washes, scalloped edges, soft pills; reduced- motion honored. Gates: make -> exit 0 (codeless .bnp); check-safety -> 19 ok 13 skip, exit 0. Known limits per contract §11/§12 (auth trio + page-suggestions + provider- backed lists inert until cms fix). Visuals UNVERIFIED until Wave B. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
2.2 KiB
Plaintext
28 lines
2.2 KiB
Plaintext
{# pastel-dream auth-status — header login state. Auth state via the auth_state provider;
|
|
endpoints match the platform (/login, /login?tab=register, /api/auth/logout,
|
|
/api/auth/resend-verification). #}
|
|
{% if not auth.logged_in %}
|
|
<div class="auth-status flex items-center gap-2">
|
|
<a href="/login" class="pd-body rounded-lg px-3 py-1.5 text-sm font-medium opacity-80 transition-colors hover:bg-muted hover:opacity-100">Login</a>
|
|
<a href="/login?tab=register" class="pd-tag text-sm">Sign up</a>
|
|
</div>
|
|
{% else %}
|
|
{% if not auth.email_verified %}<div class="fixed inset-x-0 top-16 z-40 bg-accent px-4 py-2 text-center text-sm text-accent-foreground">Please verify your email address. <button hx-post="/api/auth/resend-verification" hx-swap="outerHTML" class="font-medium underline">Resend verification email</button></div>{% endif %}
|
|
<div class="auth-status relative">
|
|
<button type="button" onclick="this.nextElementSibling.classList.toggle('hidden')" class="pd-body flex items-center gap-2 rounded-lg px-3 py-1.5 text-sm font-medium opacity-90 transition-colors hover:bg-muted hover:opacity-100">
|
|
<span class="pd-hand flex h-7 w-7 items-center justify-center rounded-full bg-accent text-sm text-accent-foreground">{{ auth.display_name|first|upper }}</span>
|
|
<span>{{ auth.display_name }}</span>
|
|
<svg class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#chevron-down"></use></svg>
|
|
</button>
|
|
<div id="auth-dropdown-menu" class="pd-card absolute right-0 top-full z-50 mt-1 hidden w-48 py-1 shadow-lg">
|
|
<a href="/account" class="pd-body block px-4 py-2 text-sm text-foreground hover:bg-muted">My profile</a>
|
|
<a href="/account/reviews" class="pd-body block px-4 py-2 text-sm text-foreground hover:bg-muted">My reviews</a>
|
|
<hr class="my-1 border-dashed border-border">
|
|
<button hx-post="/api/auth/logout" hx-swap="none" class="pd-body block w-full px-4 py-2 text-left text-sm text-destructive hover:bg-muted">Logout</button>
|
|
</div>
|
|
</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>
|
|
{% endif %}
|