Refine site hero copy and reusable badge
This commit is contained in:
@@ -36,7 +36,12 @@ export default async function AboutPage({ params: { locale } }: AboutPageProps)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHero title={t("title")} description={t("intro")} />
|
<PageHero
|
||||||
|
locale={localeKey}
|
||||||
|
badge={t("heroBadge")}
|
||||||
|
title={t("heroTitle")}
|
||||||
|
description={t("intro")}
|
||||||
|
/>
|
||||||
|
|
||||||
<Container className="flex flex-col gap-section pb-12 lg:pb-16">
|
<Container className="flex flex-col gap-section pb-12 lg:pb-16">
|
||||||
<MotionFade delay={0.05}>
|
<MotionFade delay={0.05}>
|
||||||
|
|||||||
@@ -50,7 +50,12 @@ export default async function ContactPage({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHero title={t("title")} description={t("intro")} />
|
<PageHero
|
||||||
|
locale={localeKey}
|
||||||
|
badge={t("heroBadge")}
|
||||||
|
title={t("heroTitle")}
|
||||||
|
description={t("intro")}
|
||||||
|
/>
|
||||||
|
|
||||||
<Container className="grid gap-6 pb-12 lg:grid-cols-2 lg:pb-16">
|
<Container className="grid gap-6 pb-12 lg:grid-cols-2 lg:pb-16">
|
||||||
<MotionFade>
|
<MotionFade>
|
||||||
|
|||||||
@@ -57,7 +57,12 @@ export default async function PortfolioPage({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHero title={t("title")} description={t("intro")} />
|
<PageHero
|
||||||
|
locale={localeKey}
|
||||||
|
badge={t("heroBadge")}
|
||||||
|
title={t("heroTitle")}
|
||||||
|
description={t("intro")}
|
||||||
|
/>
|
||||||
|
|
||||||
<Container className="flex flex-col gap-section pb-12 lg:pb-16">
|
<Container className="flex flex-col gap-section pb-12 lg:pb-16">
|
||||||
<section className="flex flex-wrap gap-3">
|
<section className="flex flex-wrap gap-3">
|
||||||
|
|||||||
@@ -38,7 +38,12 @@ export default async function ProductsPage({ params: { locale } }: ProductsPageP
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHero title={t("title")} description={t("intro")} />
|
<PageHero
|
||||||
|
locale={localeKey}
|
||||||
|
badge={t("heroBadge")}
|
||||||
|
title={t("heroTitle")}
|
||||||
|
description={t("intro")}
|
||||||
|
/>
|
||||||
|
|
||||||
<Container className="flex flex-col gap-section pb-12 lg:pb-16">
|
<Container className="flex flex-col gap-section pb-12 lg:pb-16">
|
||||||
<section className="grid gap-4 md:grid-cols-3">
|
<section className="grid gap-4 md:grid-cols-3">
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import type { ReactNode } from "react";
|
||||||
|
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
type HeroBadgeProps = {
|
||||||
|
children: ReactNode;
|
||||||
|
className?: string;
|
||||||
|
trailing?: ReactNode;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function HeroBadge({ children, className, trailing }: HeroBadgeProps) {
|
||||||
|
return (
|
||||||
|
<p
|
||||||
|
className={cn(
|
||||||
|
"inline-flex items-center gap-1.5 rounded-pill border border-border/70 bg-background/75 px-3 py-1 text-[0.84rem] font-medium tracking-[-0.01em] text-foreground/82 shadow-xs backdrop-blur-chrome sm:px-3.5 sm:py-1 sm:text-[0.9rem]",
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<span>{children}</span>
|
||||||
|
{trailing}
|
||||||
|
</p>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { motion, useReducedMotion } from "framer-motion";
|
import { motion, useReducedMotion } from "framer-motion";
|
||||||
|
|
||||||
|
import { HeroBadge } from "@/components/layout/hero-badge";
|
||||||
import {
|
import {
|
||||||
HeroContentMotion,
|
HeroContentMotion,
|
||||||
HeroMotionItem,
|
HeroMotionItem,
|
||||||
@@ -70,8 +71,8 @@ export function HomeHero({
|
|||||||
<HeroShell showBridges>
|
<HeroShell showBridges>
|
||||||
<HeroContentMotion variant="home">
|
<HeroContentMotion variant="home">
|
||||||
<HeroMotionItem variant="home">
|
<HeroMotionItem variant="home">
|
||||||
<p className="inline-flex items-center gap-1.5 rounded-pill border border-border/70 bg-background/75 px-3 py-1 text-[0.84rem] font-medium tracking-[-0.01em] text-foreground/82 shadow-xs backdrop-blur-chrome sm:px-3.5 sm:py-1 sm:text-[0.9rem]">
|
<HeroBadge
|
||||||
<span>{kicker}</span>
|
trailing={
|
||||||
<motion.span
|
<motion.span
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
className="text-[0.95rem] leading-none"
|
className="text-[0.95rem] leading-none"
|
||||||
@@ -99,7 +100,10 @@ export function HomeHero({
|
|||||||
>
|
>
|
||||||
👋
|
👋
|
||||||
</motion.span>
|
</motion.span>
|
||||||
</p>
|
}
|
||||||
|
>
|
||||||
|
{kicker}
|
||||||
|
</HeroBadge>
|
||||||
</HeroMotionItem>
|
</HeroMotionItem>
|
||||||
<HeroTitle locale={locale} lines={lines} />
|
<HeroTitle locale={locale} lines={lines} />
|
||||||
<HeroMotionItem variant="home">
|
<HeroMotionItem variant="home">
|
||||||
|
|||||||
@@ -1,20 +1,30 @@
|
|||||||
import { HeroContentMotion, HeroMotionItem, HeroShell, HeroTitle } from "@/components/layout/site-hero";
|
import { HeroBadge } from "@/components/layout/hero-badge";
|
||||||
|
import { HeroContentMotion, HeroMotionItem, HeroShell, HeroTitle, type HeroTitleLineValue } from "@/components/layout/site-hero";
|
||||||
|
|
||||||
type PageHeroProps = {
|
type PageHeroProps = {
|
||||||
|
badge?: string;
|
||||||
title: string;
|
title: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
lines?: HeroTitleLineValue[];
|
||||||
|
locale?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function PageHero({ title, description }: PageHeroProps) {
|
function getDefaultLines(title: string): HeroTitleLineValue[] {
|
||||||
|
return title.split("\n").filter(Boolean).map((line, index) => ({
|
||||||
|
text: line,
|
||||||
|
tone: index === 0 ? "soft" : "accent",
|
||||||
|
align: "center",
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
export function PageHero({ badge, title, description, lines, locale }: PageHeroProps) {
|
||||||
return (
|
return (
|
||||||
<HeroShell compactBackdrop variant="page">
|
<HeroShell compactBackdrop variant="page">
|
||||||
<HeroContentMotion variant="page">
|
<HeroContentMotion variant="page">
|
||||||
<HeroMotionItem variant="page">
|
<HeroMotionItem variant="page">
|
||||||
<p className="inline-flex items-center rounded-pill border border-border/70 bg-background/75 px-4 py-2 text-sm font-medium tracking-[-0.01em] text-foreground/82 shadow-xs backdrop-blur-chrome">
|
<HeroBadge>{badge ?? title}</HeroBadge>
|
||||||
{title}
|
|
||||||
</p>
|
|
||||||
</HeroMotionItem>
|
</HeroMotionItem>
|
||||||
<HeroTitle lines={[{ text: title }]} variant="page" />
|
<HeroTitle lines={lines ?? getDefaultLines(title)} locale={locale} variant="page" />
|
||||||
{description ? (
|
{description ? (
|
||||||
<HeroMotionItem variant="page">
|
<HeroMotionItem variant="page">
|
||||||
<p className="mx-auto mt-6 max-w-[34rem] text-base leading-7 text-foreground/72">
|
<p className="mx-auto mt-6 max-w-[34rem] text-base leading-7 text-foreground/72">
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ const lineAlignClasses: Record<HeroLineAlign, string> = {
|
|||||||
end: "self-center text-center lg:self-end lg:text-end",
|
end: "self-center text-center lg:self-end lg:text-end",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type HeroTitleLineValue = HeroTitleLine;
|
||||||
|
|
||||||
export function HeroShell({
|
export function HeroShell({
|
||||||
children,
|
children,
|
||||||
className,
|
className,
|
||||||
@@ -189,9 +191,9 @@ export function HeroTitle({
|
|||||||
"text-balance font-semibold text-[hsl(var(--hero-ink))]",
|
"text-balance font-semibold text-[hsl(var(--hero-ink))]",
|
||||||
variant === "home"
|
variant === "home"
|
||||||
? isArabic
|
? isArabic
|
||||||
? "mt-6 flex w-full max-w-[20rem] flex-col gap-y-1 text-[clamp(3rem,11vw,5.9rem)] leading-[1.06] tracking-[-0.03em] sm:max-w-[24rem] md:max-w-[30rem] lg:max-w-[32rem]"
|
? "mt-6 flex w-full max-w-[26rem] flex-col gap-y-1 px-4 text-[clamp(2.85rem,11vw,5.9rem)] leading-[1.06] tracking-[-0.03em] sm:max-w-[30rem] sm:px-0 md:max-w-[36rem] lg:max-w-[32rem]"
|
||||||
: "mt-6 flex w-full max-w-[20rem] flex-col gap-y-1 text-[clamp(3.1rem,11vw,6.3rem)] leading-[0.94] tracking-[-0.06em] sm:max-w-[24rem] md:max-w-[30rem] lg:max-w-[32rem]"
|
: "mt-6 flex w-full max-w-[26rem] flex-col gap-y-1 px-4 text-[clamp(2.7rem,12vw,6.3rem)] leading-[0.94] tracking-[-0.045em] sm:max-w-[30rem] sm:px-0 md:max-w-[36rem] lg:max-w-[32rem]"
|
||||||
: "mt-4 flex w-full max-w-[20rem] flex-col gap-y-1 text-[clamp(2.8rem,10vw,4.9rem)] leading-[0.96] tracking-[-0.06em] sm:max-w-[24rem] md:max-w-[28rem] lg:max-w-[32rem]",
|
: "mt-4 flex w-full max-w-[30rem] flex-col gap-y-1 px-4 text-[clamp(2.55rem,9vw,4.9rem)] leading-[0.96] tracking-[-0.05em] sm:px-0 md:max-w-[36rem] lg:max-w-[40rem]",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
},
|
},
|
||||||
"portfolioPage": {
|
"portfolioPage": {
|
||||||
"title": "الأعمال",
|
"title": "الأعمال",
|
||||||
|
"heroBadge": "شغل مختار",
|
||||||
|
"heroTitle": "شغل\nمختار",
|
||||||
"intro": "مجموعة مشاريع مختارة مع تركيز على الوضوح والنتائج.",
|
"intro": "مجموعة مشاريع مختارة مع تركيز على الوضوح والنتائج.",
|
||||||
"open": "فتح المشروع",
|
"open": "فتح المشروع",
|
||||||
"all": "كل التصنيفات",
|
"all": "كل التصنيفات",
|
||||||
@@ -55,11 +57,15 @@
|
|||||||
},
|
},
|
||||||
"productsPage": {
|
"productsPage": {
|
||||||
"title": "المنتجات",
|
"title": "المنتجات",
|
||||||
|
"heroBadge": "حلول جاهزة",
|
||||||
|
"heroTitle": "باقات\nجاهزة",
|
||||||
"intro": "باقات للفرق من البداية حتى التوسع.",
|
"intro": "باقات للفرق من البداية حتى التوسع.",
|
||||||
"open": "فتح المنتج"
|
"open": "فتح المنتج"
|
||||||
},
|
},
|
||||||
"aboutPage": {
|
"aboutPage": {
|
||||||
"title": "من أنا",
|
"title": "من أنا",
|
||||||
|
"heroBadge": "خلّيني عرّفك عليّي",
|
||||||
|
"heroTitle": "عنّي\nأكتر",
|
||||||
"intro": "أبني تجارب رقمية واضحة للعلامات والمنتجات والفرق.",
|
"intro": "أبني تجارب رقمية واضحة للعلامات والمنتجات والفرق.",
|
||||||
"valuesTitle": "كيف أعمل",
|
"valuesTitle": "كيف أعمل",
|
||||||
"valueA": "الاستراتيجية أولاً",
|
"valueA": "الاستراتيجية أولاً",
|
||||||
@@ -75,6 +81,8 @@
|
|||||||
},
|
},
|
||||||
"contactPage": {
|
"contactPage": {
|
||||||
"title": "تواصل",
|
"title": "تواصل",
|
||||||
|
"heroBadge": "خلّينا نحكي",
|
||||||
|
"heroTitle": "خلّينا\nنحكي",
|
||||||
"intro": "ابعث لي هدفك باختصار وسأعود إليك بسرعة.",
|
"intro": "ابعث لي هدفك باختصار وسأعود إليك بسرعة.",
|
||||||
"name": "الاسم",
|
"name": "الاسم",
|
||||||
"email": "البريد الإلكتروني",
|
"email": "البريد الإلكتروني",
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
},
|
},
|
||||||
"portfolioPage": {
|
"portfolioPage": {
|
||||||
"title": "Portfolio",
|
"title": "Portfolio",
|
||||||
|
"heroBadge": "Ausgewaehlte Arbeiten",
|
||||||
|
"heroTitle": "Ausgewaehlte\nProjekte",
|
||||||
"intro": "Eine Auswahl von Projekten mit Fokus auf Klarheit und Ergebnis.",
|
"intro": "Eine Auswahl von Projekten mit Fokus auf Klarheit und Ergebnis.",
|
||||||
"open": "Projekt oeffnen",
|
"open": "Projekt oeffnen",
|
||||||
"all": "Alle Kategorien",
|
"all": "Alle Kategorien",
|
||||||
@@ -55,11 +57,15 @@
|
|||||||
},
|
},
|
||||||
"productsPage": {
|
"productsPage": {
|
||||||
"title": "Produkte",
|
"title": "Produkte",
|
||||||
|
"heroBadge": "Pakete und Loesungen",
|
||||||
|
"heroTitle": "Klare\nAngebote",
|
||||||
"intro": "Pakete fuer Teams von Start bis Skalierung.",
|
"intro": "Pakete fuer Teams von Start bis Skalierung.",
|
||||||
"open": "Produkt oeffnen"
|
"open": "Produkt oeffnen"
|
||||||
},
|
},
|
||||||
"aboutPage": {
|
"aboutPage": {
|
||||||
"title": "Ueber mich",
|
"title": "Ueber mich",
|
||||||
|
"heroBadge": "Mehr ueber mich",
|
||||||
|
"heroTitle": "Ueber\nmich",
|
||||||
"intro": "Ich baue klare digitale Erlebnisse fuer Marken, Produkte und Teams.",
|
"intro": "Ich baue klare digitale Erlebnisse fuer Marken, Produkte und Teams.",
|
||||||
"valuesTitle": "Wie ich arbeite",
|
"valuesTitle": "Wie ich arbeite",
|
||||||
"valueA": "Strategie zuerst",
|
"valueA": "Strategie zuerst",
|
||||||
@@ -75,6 +81,8 @@
|
|||||||
},
|
},
|
||||||
"contactPage": {
|
"contactPage": {
|
||||||
"title": "Kontakt",
|
"title": "Kontakt",
|
||||||
|
"heroBadge": "Lass uns reden",
|
||||||
|
"heroTitle": "Lass uns\nreden",
|
||||||
"intro": "Schreib mir kurz dein Ziel und ich melde mich zeitnah.",
|
"intro": "Schreib mir kurz dein Ziel und ich melde mich zeitnah.",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"email": "E-Mail",
|
"email": "E-Mail",
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
},
|
},
|
||||||
"portfolioPage": {
|
"portfolioPage": {
|
||||||
"title": "Portfolio",
|
"title": "Portfolio",
|
||||||
|
"heroBadge": "Selected work",
|
||||||
|
"heroTitle": "Selected\nwork",
|
||||||
"intro": "Selected projects with a focus on clarity and outcomes.",
|
"intro": "Selected projects with a focus on clarity and outcomes.",
|
||||||
"open": "Open project",
|
"open": "Open project",
|
||||||
"all": "All categories",
|
"all": "All categories",
|
||||||
@@ -55,11 +57,15 @@
|
|||||||
},
|
},
|
||||||
"productsPage": {
|
"productsPage": {
|
||||||
"title": "Products",
|
"title": "Products",
|
||||||
|
"heroBadge": "Packages and offers",
|
||||||
|
"heroTitle": "Clear\noffers",
|
||||||
"intro": "Packages for teams from early stage to scale.",
|
"intro": "Packages for teams from early stage to scale.",
|
||||||
"open": "Open product"
|
"open": "Open product"
|
||||||
},
|
},
|
||||||
"aboutPage": {
|
"aboutPage": {
|
||||||
"title": "About",
|
"title": "About",
|
||||||
|
"heroBadge": "A bit more about me",
|
||||||
|
"heroTitle": "About\nme",
|
||||||
"intro": "I build clear digital experiences for brands, products, and teams.",
|
"intro": "I build clear digital experiences for brands, products, and teams.",
|
||||||
"valuesTitle": "How I work",
|
"valuesTitle": "How I work",
|
||||||
"valueA": "Strategy first",
|
"valueA": "Strategy first",
|
||||||
@@ -75,6 +81,8 @@
|
|||||||
},
|
},
|
||||||
"contactPage": {
|
"contactPage": {
|
||||||
"title": "Contact",
|
"title": "Contact",
|
||||||
|
"heroBadge": "Let us talk",
|
||||||
|
"heroTitle": "Let us\ntalk",
|
||||||
"intro": "Share your goal and I will get back quickly.",
|
"intro": "Share your goal and I will get back quickly.",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
|
|||||||
Reference in New Issue
Block a user