client:load + lightweight markdown.ts

This commit is contained in:
2026-05-14 18:00:53 +02:00
parent 5a0d847874
commit ceb3750add
5 changed files with 41 additions and 12 deletions
+4 -4
View File
@@ -61,7 +61,7 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
<h1 class="font-display italic font-semibold text-[var(--text)] text-5xl md:text-7xl lg:text-8xl leading-[0.95] tracking-tight mb-6">
{isAdmin ? (
<EditableText
client:load
client:visible
initial={siteConfig.welcome_title}
fieldKey="welcome_title"
isAdmin
@@ -73,7 +73,7 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
<p class="font-sans text-lg md:text-xl text-[var(--subtext1)] leading-relaxed max-w-xl">
{isAdmin ? (
<EditableText
client:load
client:visible
initial={siteConfig.welcome_subtitle}
fieldKey="welcome_subtitle"
isAdmin
@@ -90,7 +90,7 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="M12 5v14"/></svg>
New work
</a>
<AssetsButton client:load className="btn-ghost" iconSize={12} />
<AssetsButton client:idle className="btn-ghost" iconSize={12} />
<a href="/admin/messages" class="btn-ghost">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg>
Messages
@@ -123,5 +123,5 @@ const isAdmin = Astro.cookies.get('admin_session')?.value === '1';
</div>
)}
{posts.length > 0 && <PostList posts={posts} isAdmin={isAdmin} client:load />}
{posts.length > 0 && <PostList posts={posts} isAdmin={isAdmin} client:idle />}
</Layout>