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>
37 lines
4.1 KiB
Plaintext
37 lines
4.1 KiB
Plaintext
{# pastel-dream auth-form — combined login/register in soft pastel chrome. Endpoints and panel
|
|
ids match the platform auth flow (/api/auth/login, /api/auth/register,
|
|
#auth-message, #login-panel/#register-panel). Auth state via the auth_state
|
|
provider (auth.logged_in / auth.display_name). Captcha, when enabled, is
|
|
emitted by the platform auth path. #}
|
|
{% if auth.logged_in %}
|
|
<div class="auth-form-logged-in pd-card mx-auto max-w-md p-6 text-center">
|
|
<p class="pd-body text-muted-foreground">You are logged in as <strong class="text-primary">{{ auth.display_name }}</strong></p>
|
|
<a href="/account" class="pd-tag mt-4">My account</a>
|
|
</div>
|
|
{% else %}
|
|
{% set defaultTab = default_tab|default:"login" %}
|
|
<div class="auth-form pd-card mx-auto max-w-md p-6">
|
|
<div id="auth-message"></div>
|
|
<div class="mb-5 flex border-b border-dashed border-border">
|
|
<button type="button" onclick="document.getElementById('login-panel').classList.remove('hidden');document.getElementById('register-panel').classList.add('hidden');this.className='pd-display flex-1 py-2 text-center border-b-2 border-primary text-primary';this.nextElementSibling.className='pd-display flex-1 py-2 text-center border-b-2 border-transparent text-muted-foreground'" class="pd-display flex-1 py-2 text-center border-b-2 {% if defaultTab == "register" %}border-transparent text-muted-foreground{% else %}border-primary text-primary{% endif %}">Login</button>
|
|
<button type="button" onclick="document.getElementById('register-panel').classList.remove('hidden');document.getElementById('login-panel').classList.add('hidden');this.className='pd-display flex-1 py-2 text-center border-b-2 border-primary text-primary';this.previousElementSibling.className='pd-display flex-1 py-2 text-center border-b-2 border-transparent text-muted-foreground'" class="pd-display flex-1 py-2 text-center border-b-2 {% if defaultTab == "register" %}border-primary text-primary{% else %}border-transparent text-muted-foreground{% endif %}">Register</button>
|
|
</div>
|
|
<div id="login-panel" class="{% if defaultTab == "register" %}hidden{% endif %}">
|
|
<form hx-post="/api/auth/login" hx-target="#auth-message" hx-swap="innerHTML">
|
|
<div class="mb-3"><label class="pd-hand mb-1 block text-lg text-accent">Email</label><input type="email" name="email" required class="pd-body w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"></div>
|
|
<div class="mb-4"><label class="pd-hand mb-1 block text-lg text-accent">Password</label><input type="password" name="password" required class="pd-body w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"></div>
|
|
<button type="submit" class="pd-tag w-full justify-center" hx-disabled-elt="this">Login</button>
|
|
<p class="pd-body mt-3 text-center text-sm"><a href="/forgot-password" class="text-accent underline decoration-dashed">Forgot password?</a></p>
|
|
</form>
|
|
</div>
|
|
<div id="register-panel" class="{% if defaultTab == "register" %}{% else %}hidden{% endif %}">
|
|
<form hx-post="/api/auth/register" hx-target="#auth-message" hx-swap="innerHTML">
|
|
<div class="mb-3"><label class="pd-hand mb-1 block text-lg text-accent">Username</label><input type="text" name="username" required pattern="[a-zA-Z0-9_-]{3,30}" class="pd-body w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"></div>
|
|
<div class="mb-3"><label class="pd-hand mb-1 block text-lg text-accent">Email</label><input type="email" name="email" required class="pd-body w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"></div>
|
|
<div class="mb-4"><label class="pd-hand mb-1 block text-lg text-accent">Password</label><input type="password" name="password" required minlength="8" class="pd-body w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"></div>
|
|
<button type="submit" class="pd-tag w-full justify-center" hx-disabled-elt="this">Create account</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|