cauldron/cauldron/templates/me.html
Kayos dd9cc266fa ui: extract templates + add /recipes browse + sulkta-meets-gothic palette
Cobb feedback: pull back from cWHO terminal-coded look, blend Abby's gothic
witch with sulkta.com polish. 'burn tokens till we nail it.'

Style direction:
- Polished dark base like sulkta.com — soft purple/green radial glows on
  near-black, faint witchy pentagram-circle SVG bg pattern at 5% opacity
- NO scanlines, NO CRT vignette overlay (cWHO is too terminal for this)
- Inter for body (sulkta.com), Cinzel SERIF for h1/h2/brand/recipe-card
  titles (gothic flourish), JetBrains Mono for code/labels/uppercase chips
- Soft glow shadows (rgba box-shadow) instead of hard cWHO 3px offsets
- Rounded corners 4-6px throughout
- Smooth fade-in animations on .panel and .page-head
- Pills with subtle background tint (sulkta pill style)
- KV labels in mono uppercase purple — kept the gothic occult-tag feel
- Recipe cards lift on hover with purple glow shadow

Templates extracted from server.py to cauldron/templates/:
- _base.html — full layout shell, topbar, scanlines REMOVED, animation
- me.html — uses {extends '_base.html'}
- connect.html — same
- recipes.html — NEW, paginated grid view
- recipe_detail.html — NEW, full recipe with ingredients + instructions
- stub.html — NEW, placeholder for /plan and /list (v0.3)

Routes added:
- GET /recipes        — user-tier: list via current_user_mealie()
- GET /recipes/<slug> — user-tier: detail view
- GET /plan, /list    — stubs so nav doesn't 404

Server:
- render_template_string → render_template (proper Jinja file lookup)
- Stripped inline _PALETTE_CSS / ME_TEMPLATE / CONNECT_TEMPLATE constants
- Added current_user_mealie() helper to all user-facing routes
2026-04-28 20:38:54 -07:00

54 lines
1.9 KiB
HTML

{% extends "_base.html" %}
{% block title %}{{ user.name or user.email }} · Cauldron{% endblock %}
{% block content %}
<div class="page-head">
<div class="crumb">// account</div>
<h1><span class="accent">{{ user.name or user.email.split('@')[0] }}</span></h1>
<div class="lede">welcome back to the coven.</div>
</div>
<section class="panel">
<div class="panel-head">
<h2>identity</h2>
<span class="ctx">authentik</span>
</div>
<dl class="kv">
<dt>email</dt><dd>{{ user.email }}</dd>
<dt>subject</dt><dd>{{ user.sub }}</dd>
</dl>
</section>
<section class="panel green">
<div class="panel-head">
<h2>mealie</h2>
{% if connected %}<span class="pill pill-ok">connected</span>{% else %}<span class="pill pill-warn">not connected</span>{% endif %}
</div>
{% if connected and mealie_user %}
<dl class="kv">
<dt>logged in as</dt><dd>{{ mealie_user.username or mealie_user.email }}</dd>
<dt>full name</dt><dd>{{ mealie_user.fullName or '—' }}</dd>
<dt>role</dt><dd>{{ 'admin' if mealie_user.admin else 'member' }}</dd>
</dl>
<form method="post" action="/disconnect-mealie" class="btn-row">
<button class="btn btn-purple" type="submit">Disconnect</button>
<span class="muted">revoking on mealie's side also works.</span>
</form>
{% elif connected %}
<p class="muted">token stored, but mealie didn't return profile data. probably revoked or rotated.</p>
<form method="post" action="/disconnect-mealie" class="btn-row">
<button class="btn btn-purple" type="submit">Reset</button>
</form>
{% else %}
<p>connect mealie so cauldron can act on your behalf — your recipes, your meal plan, your shopping list. one-time, ~30 seconds.</p>
<p><a class="btn btn-primary" href="/connect-mealie">Connect mealie →</a></p>
{% endif %}
</section>
<hr>
<form method="post" action="/logout">
<button class="btn" type="submit">Sign out</button>
</form>
{% endblock %}