style(post): polish post header + actions toolbar
Deploy / verify (push) Successful in 43s
Deploy / deploy (push) Successful in 1m4s

- PostActions: every item is a rounded-full pill with subtle border;
  the three icon-only actions (share/copy/print) cluster in one
  segmented control with divider lines, count + reading-time stand
  alone left and right
- Share button only renders when `navigator.share` is available so
  desktop doesn't get a duplicate of "Copy link"
- All action buttons drop their inline labels and use `title=` +
  `aria-label` for tooltip-only access; copy still flips icon to a
  checkmark for 1.5s on success
- Empty comment state stacks vertically on mobile (icon above), goes
  horizontal + left-aligned on ≥sm
- Post header rebuilt: image fixed at 150x150 (no more mobile blow-up),
  right column is `flex flex-col gap-3` so date/tags/actions share one
  rhythm instead of ad-hoc margins
- Reading-time now also walks `row*Content` and pulls `content`/`body`/
  `text` strings — Termin-Posts with empty body but markdown rows now
  show a meaningful estimate

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-04-28 15:08:04 +02:00
parent 6b2b7245f4
commit 6f14e4f150
4 changed files with 129 additions and 78 deletions
+25 -27
View File
@@ -24,10 +24,10 @@
{/if}
</svelte:head>
<div class="md:flex gap-2 items-end">
<div class="my-4 md:flex md:items-start md:gap-4">
{#if data.rawPostImageUrl}
<div
class="overflow-hidden inline-block my-4 border border-white self-start ring-1 ring-black/50 shadow-lg aspect-square"
class="w-[150px] shrink-0 overflow-hidden border border-white ring-1 ring-black/50 shadow-lg aspect-square"
>
<RustyImage
src={data.rawPostImageUrl}
@@ -44,7 +44,7 @@
</div>
{:else if data.postImageUrl}
<div
class="overflow-hidden inline-block my-4 border border-white self-start ring-1 ring-black/50 shadow-lg aspect-square"
class="w-[150px] shrink-0 overflow-hidden border border-white ring-1 ring-black/50 shadow-lg aspect-square"
>
<img
src={data.postImageUrl}
@@ -57,34 +57,32 @@
/>
</div>
{/if}
<div class="mt-2 mb-4! md:mb-1 min-w-0 gap-2">
{#if data.postDate || data.commentPageId}
<div class="flex flex-nowrap gap-2 items-center shrink-0 mb-2">
{#if data.postDate}
<Tag label={data.postDate} variant="date" />
{/if}
<!-- Right column: stacked rows with consistent rhythm -->
<div class="mt-3 md:mt-0 min-w-0 flex flex-col gap-3">
{#if data.postDate}
<div class="flex flex-wrap items-center gap-2">
<Tag label={data.postDate} variant="date" />
</div>
{/if}
<div
class="flex flex-nowrap gap-2 items-center shrink-0 p-1 pb-4 -ml-1 overflow-x-auto overflow-y-hidden"
>
<Tags
tags={data.post.postTag ?? []}
variant="green"
tagBase="/posts/tag"
/>
</div>
{#if (data.post.postTag ?? []).length > 0}
<div class="flex flex-wrap items-center gap-1.5 -ml-0.5">
<Tags
tags={data.post.postTag ?? []}
variant="green"
tagBase="/posts/tag"
/>
</div>
{/if}
<PostActions
url={data.canonicalUrl}
title={data.seoTitle}
readingTimeMinutes={data.readingTimeMinutes}
commentPageId={data.commentPageId}
commentTargetId="comments-section"
/>
</div>
</div>
<div class="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-zinc-600">
<PostActions
url={data.canonicalUrl}
title={data.seoTitle}
readingTimeMinutes={data.readingTimeMinutes}
commentPageId={data.commentPageId}
commentTargetId="comments-section"
/>
</div>
<article
class="mt-8 h-entry"