Deliver the full conservation-nonprofit theme per OVERRIDE-CONTRACT (Wave A).
- 49 mandatory builtin overrides in templates/overrides/earthen/ (chrome,
marketing, primitives, commerce, blog family, auth surface, page-suggestions),
re-skinned from the frozen builtins into botanical/paper-grain chrome with
all content fields, custom tags, provider vars, HTMX/auth wiring and JS
preserved verbatim. Stale button/card/image/text/heading overrides fixed to
the new field contract (link/style/label, media/text via {% img %}).
- 7 page templates: default, full-width, landing, article, blog-index, contact,
auth.
- Blocks rework: impact_metrics/partner_logos/botanical_divider/footer converted
to builtin overrides (deleted as theme blocks); donation_cta and field_note
kept; impact_report added. Persona blocks now 3.
- 5 presets (all 19 tokens; mossbed/sage-morning/ember-loam are dual-mode).
- Bundled Fraunces + Work Sans woff2 (OFL) in assets/fonts/; fonts.json,
RECOMMENDED_FONTS.md, RECOMMENDED_ICONS.md; required_icon_packs=[lucide].
- Seed: home/about/blog(3 posts)/contact/login as Rootline Trust, contact-form
formConfig.targetTable=contact_submissions + row_inserted email-admins workflow.
- Themed email-safe wrapper; on-theme master pages; CSS-first botanical motion.
Verified: make (build) exit 0, make archive-check exit 0, check-safety exit 0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
2.4 KiB
Plaintext
32 lines
2.4 KiB
Plaintext
{# auth-status override — header login state. Logged-out: Sign in / Join links. Logged-in: moss monogram + dropdown (logout posts /api/auth/logout). Wiring UNTOUCHABLE: context.isPublicLoggedIn / context.publicDisplayName / context.publicUsername reads, #auth-dropdown-menu, onclick toggle, outside-click <script>, hx-post /api/auth/logout. Only classes/styles/copy reskinned to earthen. #}
|
|
{% if context.isPublicLoggedIn %}
|
|
<div data-block-override="earthen:auth-status" class="auth-status relative">
|
|
<button type="button" onclick="this.nextElementSibling.classList.toggle('hidden')" class="flex items-center gap-2 text-sm font-medium 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 earthen-panel py-1 z-50">
|
|
<a href="/account" class="block px-4 py-2 text-sm text-foreground hover:bg-muted">My profile</a>
|
|
<a href="/account/reviews" class="block px-4 py-2 text-sm text-foreground hover:bg-muted">My reviews</a>
|
|
<hr class="my-1 border-border"/>
|
|
<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-muted">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="earthen:auth-status" class="auth-status flex items-center gap-2">
|
|
<a href="/login" class="text-sm px-3 py-1.5 opacity-80 hover:opacity-100 hover:text-primary transition-colors">Sign in</a>
|
|
<a href="/login?tab=register" class="earthen-cta text-sm">Join us</a>
|
|
</div>
|
|
{% endif %}
|