- seed: real Rootline Trust content — no 'example figures' placeholder copy; home composed as split hero (hands-soil image) + stats + feature-grid + botanical divider + field note + newsletter; About gap filled with fern image + impact report between story and pull-quote; first article expanded to ~10 field-notes paragraphs with inline forest image; 6 Pixabay images seeded via seed/media (id+file+alt) - article.ninjatpl: header slot now full-bleed (was max-w-3xl wrapped — the boxed-header artifact bracketing the nav with vertical rules) - landing.ninjatpl: main slot full-bleed so composed sections span the page - SVG geometry guard: every <use>-icon svg now carries explicit width/height matching its size class (18 files) Co-Authored-By: Claude Fable 5 <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 width="16" height="16" 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 %}
|