feat(portfolio): real project-detail hero, no wasted space
The detail page rendered an empty <PageHero /> (blank gradient band) with the real title buried in a card lower down (Phase 0 finding). - Populate the detail PageHero with the project category (badge), title and summary, so the top of the page is a proper header. - Slim the in-content ProjectHeader to back-link + meta chips + preview button, removing the now-duplicated title and summary. Applies across all three detail templates (grid/story/case-study). Verified: eslint clean, no new type errors.
This commit is contained in:
@@ -58,10 +58,18 @@ export default async function PortfolioItemPage({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const t = await getTranslations({ locale: localeKey, namespace: "portfolioDetail" });
|
const t = await getTranslations({ locale: localeKey, namespace: "portfolioDetail" });
|
||||||
|
const title = getLocalizedValue(item.title, localeKey);
|
||||||
|
const category = getLocalizedValue(item.category.name, localeKey);
|
||||||
|
const summary = getLocalizedValue(item.summary, localeKey);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHero />
|
<PageHero
|
||||||
|
locale={localeKey}
|
||||||
|
badge={category}
|
||||||
|
lines={[{ text: title, tone: "soft", align: "center" }]}
|
||||||
|
description={summary}
|
||||||
|
/>
|
||||||
|
|
||||||
<Container size="wide" className="pb-12 lg:pb-16">
|
<Container size="wide" className="pb-12 lg:pb-16">
|
||||||
<PortfolioProjectDetail
|
<PortfolioProjectDetail
|
||||||
|
|||||||
@@ -235,14 +235,7 @@ function ProjectHeader({
|
|||||||
<Link href={getLocalizedPath(locale, "/portfolio", defaultLocale)}>{t("back")}</Link>
|
<Link href={getLocalizedPath(locale, "/portfolio", defaultLocale)}>{t("back")}</Link>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<h1 className="mt-5 text-3xl font-semibold text-foreground sm:text-4xl lg:text-5xl">
|
<div className="mt-6">
|
||||||
{getLocalizedValue(item.title, locale)}
|
|
||||||
</h1>
|
|
||||||
<p className="mt-4 max-w-3xl text-base leading-8 text-muted-foreground sm:text-lg">
|
|
||||||
{getLocalizedValue(item.summary, locale)}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="mt-8">
|
|
||||||
<ProjectMeta item={item} locale={locale} />
|
<ProjectMeta item={item} locale={locale} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user