diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 3fcd265..725cc39 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -43,7 +43,10 @@ export default async function BlogOverviewPage() { {featured && ( - + // -mt-8, not pt-10 — pulls the card up to slightly overlap the + // hero section's bottom edge instead of sitting flush below it. + // relative z-10 keeps it stacked above the hero's own photo. + {featured.category} {featured.readTime} Min + + {formatDate(featured.publishedAt)}

- - - ); -} - const steps = [ { icon: , @@ -294,8 +286,18 @@ export default function ChallengePage() { , i < steps.length - 1 ? ( -

- + // Same /icon-arrow-connector.svg asset and rotate-on-stack + // pattern as todo-cards/newsletter's HowItWorks — this + // used to be its own hand-drawn SVG arrow, inconsistent + // with those two. Always visible (rotated 90° while + // stacked below lg, this page's own structural + // breakpoint) rather than hidden below lg like before. +
+
) : null, ])} diff --git a/app/lib/payload.ts b/app/lib/payload.ts index 3d727e3..f3e9545 100644 --- a/app/lib/payload.ts +++ b/app/lib/payload.ts @@ -10,6 +10,7 @@ export type BlogPost = { excerpt: string; thumbnail: string | null; publishedAt: string; + featured: boolean; }; type PayloadPost = { @@ -21,12 +22,18 @@ type PayloadPost = { excerpt: string; thumbnail: { url: string } | number | null; publishedAt: string; + featured: boolean; }; +// sort: "-featured,-publishedAt" — Payload's multi-field sort puts any +// featured post(s) first, most-recently-published first among those, then +// the rest by date. Callers that just want posts[0] as "the" featured post +// (e.g. /blog) get a deterministic pick even if more than one post was +// accidentally marked featured — no special-casing needed here. export async function getBlogPosts(limit = 3): Promise { const params = new URLSearchParams({ "where[tenant.slug][equals]": TENANT_SLUG, - sort: "-publishedAt", + sort: "-featured,-publishedAt", depth: "2", limit: String(limit), }); @@ -56,6 +63,7 @@ export async function getBlogPosts(limit = 3): Promise { ? post.thumbnail.url : null, publishedAt: post.publishedAt, + featured: post.featured, })); } @@ -96,6 +104,7 @@ export async function getPostBySlug(slug: string): Promise { typeof doc.thumbnail === "object" && doc.thumbnail ? doc.thumbnail.url : null, content: doc.content, publishedAt: doc.publishedAt, + featured: doc.featured, }; } diff --git a/app/newsletter/components/HowItWorks.tsx b/app/newsletter/components/HowItWorks.tsx index 6e551d0..d5ffa67 100644 --- a/app/newsletter/components/HowItWorks.tsx +++ b/app/newsletter/components/HowItWorks.tsx @@ -57,7 +57,11 @@ export function HowItWorks() {

{step.desc}

{i < steps.length - 1 && ( -
+ // md:mt-[1.625rem] (26px) centers the arrow on the h-16 + // (64px) icon above it — same margin-based centering + // technique as Challenge's step connector and todo-cards' + // identical HowItWorks, not just the same icon asset. +
{step.desc}

{i < steps.length - 1 && ( -
+ // md:mt-[1.625rem] (26px) centers the arrow on the h-16 + // (64px) icon above it — (64 - arrow's own 12px height) / 2 + // — same margin-based centering technique as Challenge's + // step connector, not just the same icon asset. +