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
+1 -1
View File
@@ -116,7 +116,7 @@ function obfuscateEmail(addr: string): { user: string; host: string; display: st
<h2 class="font-display italic text-2xl md:text-3xl text-[var(--text)] border-l-2 border-[var(--mauve)] pl-4 mb-6">
Or send a note directly
</h2>
<ContactForm client:load />
<ContactForm client:idle />
</div>
<div class="section-rule mt-16">
+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>
+1 -1
View File
@@ -95,7 +95,7 @@ const displayTitle = post ? (post.title || formatSlug(post.slug)) : 'Work';
<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"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>
Edit
</a>
<DeletePostButton slug={post.slug} title={displayTitle} client:load />
<DeletePostButton slug={post.slug} title={displayTitle} client:idle />
</div>
)}
</div>