Restore original wide photo for homepage About section; fix Weiterlesen
About section goes back to the original wide banner image (its own new file, about-banner.jpg) — the new bjoern.png headshot is a square close-up that never suited this wide/short strip. Blog posts keep the new photo via about-author.jpg, unaffected. Also fixes /blog/[slug]'s "Weiterlesen" card: it picked the first of the 4 most-recent posts that wasn't the current one, so nearly every post converged on the same one or two most-recent articles. Now picks the chronologically next-older post (wrapping to the newest from the oldest), so every post points somewhere different. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8
This commit is contained in:
@@ -57,11 +57,17 @@ export default async function BlogDetailPage({
|
||||
const post = await getPostBySlug(slug, { draft: isPreview });
|
||||
if (!post) notFound();
|
||||
|
||||
// "Weiterlesen" — any other post, most recent first. Not the current
|
||||
// one; falls back to nothing (section just doesn't render) rather than
|
||||
// showing a fake/duplicate card when this is the only post.
|
||||
const otherPosts = await getBlogPosts(4);
|
||||
const nextPost = otherPosts.find((p) => p.slug !== post.slug) ?? null;
|
||||
// "Weiterlesen" — the chronologically next-older post, wrapping around
|
||||
// to the newest post from the oldest one. Not getBlogPosts()'s own
|
||||
// -featured,-publishedAt order: picking "the first of the top 4 that
|
||||
// isn't this one" made nearly every post's Weiterlesen converge on the
|
||||
// same one or two most-recent posts (reported 2026-08-29). Sorting
|
||||
// purely by publishedAt here instead makes every post point somewhere
|
||||
// different, cycling through the whole archive one post at a time.
|
||||
const allPosts = await getBlogPosts(100);
|
||||
const byDate = [...allPosts].sort((a, b) => new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime());
|
||||
const currentIndex = byDate.findIndex((p) => p.slug === post.slug);
|
||||
const nextPost = currentIndex === -1 || byDate.length < 2 ? null : byDate[(currentIndex + 1) % byDate.length];
|
||||
const seller = await getCompanySettings();
|
||||
const articleSchema = buildArticleSchema(post, seller);
|
||||
|
||||
|
||||
@@ -96,21 +96,17 @@ export function About() {
|
||||
>
|
||||
<Image
|
||||
alt="Björn"
|
||||
src="/about-author.jpg"
|
||||
src="/about-banner.jpg"
|
||||
fill
|
||||
sizes="(min-width: 640px) 58vw, 100vw"
|
||||
// object-contain, not object-cover — about-author.jpg is a square
|
||||
// close-up portrait (1254x1254) and this banner is wide and
|
||||
// comparatively short, so object-cover scales the square up to
|
||||
// fill the width and then crops most of the height away: the
|
||||
// face fills the entire strip, way too large (reported
|
||||
// 2026-08-29; simulated the exact crop with sharp to confirm
|
||||
// before switching — a plain object-position tweak only moves
|
||||
// which part of the face is blown up, it doesn't fix the zoom
|
||||
// itself). contain shows the whole photo at its real proportions;
|
||||
// the empty sides fall back to the section's own bg-dark behind
|
||||
// the image, which reads as a deliberate frame rather than a gap.
|
||||
className="object-contain pointer-events-none"
|
||||
// Reverted to the original wide banner photo (2448x896) per
|
||||
// 2026-08-29 request — the real bjoern.png headshot is a square
|
||||
// close-up that doesn't suit this wide/short strip (see git
|
||||
// history on this line for that whole detour). Blog posts keep
|
||||
// using the new photo via about-author.jpg; this section alone
|
||||
// goes back to its own dedicated file, about-banner.jpg, whose
|
||||
// wide aspect was always the right shape for object-cover here.
|
||||
className="object-cover object-center pointer-events-none"
|
||||
/>
|
||||
{/* Left gradient — from sm: up, not just lg:. Even without the
|
||||
-ml-48 overlap at Tablet, the photo sits directly against the
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 403 KiB |
Reference in New Issue
Block a user