mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-20 23:35:27 +00:00
style(website): tighten display-scale Paseo Hub lockup gap
This commit is contained in:
@@ -914,7 +914,7 @@ function HubSection() {
|
||||
>
|
||||
<div className="mb-10 space-y-3 md:mb-12">
|
||||
<h2 id="hub-section-heading">
|
||||
<PaseoHubLockup className="h-9 w-auto text-foreground md:h-11" />
|
||||
<PaseoHubLockup size="display" className="h-9 w-auto text-foreground md:h-11" />
|
||||
<span className="sr-only">{t("hub.title")}</span>
|
||||
</h2>
|
||||
<p className="max-w-xl text-base text-pretty text-muted-foreground">
|
||||
|
||||
@@ -50,6 +50,16 @@ describe("paseo brand assets", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("tightens symbol-to-wordmark spacing for display-scale lockups while keeping canonical paths", () => {
|
||||
const html = renderToStaticMarkup(<PaseoHubLockup size="display" className="h-12 w-auto" />);
|
||||
const canonical = readFileSync(path.join(BRAND_ROOT, "lockups/paseo-hub-white.svg"), "utf8");
|
||||
|
||||
expect(html).toContain('viewBox="0 0 798 144"');
|
||||
expect(html).toContain('width="798"');
|
||||
expect(html).toContain('transform="translate(-44 0)"');
|
||||
expect(extractPathData(html)).toEqual(extractPathData(canonical));
|
||||
});
|
||||
|
||||
it("keeps public/logo.svg and public/favicon.svg aligned with assets/brand", () => {
|
||||
const canonicalPaseo = readFileSync(path.join(BRAND_ROOT, "marks/paseo-white.svg"), "utf8");
|
||||
const publicLogo = readFileSync(path.join(WEBSITE_PUBLIC, "logo.svg"), "utf8");
|
||||
|
||||
@@ -99,22 +99,34 @@ function BrandMark({ asset, props }: { asset: ParsedMark; props: React.SVGProps<
|
||||
);
|
||||
}
|
||||
|
||||
function BrandLockup({
|
||||
asset,
|
||||
props,
|
||||
}: {
|
||||
asset: ParsedLockup;
|
||||
props: React.SVGProps<SVGSVGElement>;
|
||||
}) {
|
||||
/**
|
||||
* Optical horizontal tightening (in 144-unit lockup coordinates) for display-scale lockups.
|
||||
* Canonical lockups have a ~91-unit ink-to-ink gap calibrated for ~18–22px header sizes; at
|
||||
* 36–48px display sizes that gap reads ~25–30px wide, so `size="display"` pulls the wordmark
|
||||
* 44 units closer (~14–16px visual gap, ~1/3 of the mark width) and trims the viewBox to match.
|
||||
*/
|
||||
const DISPLAY_GAP_TIGHTEN_UNITS = 44;
|
||||
|
||||
export interface BrandLockupProps extends React.SVGProps<SVGSVGElement> {
|
||||
/** Optical spacing scale: `"default"` for small UI/header lockups, `"display"` for large headings. */
|
||||
size?: "default" | "display";
|
||||
}
|
||||
|
||||
function BrandLockup({ asset, props }: { asset: ParsedLockup; props: BrandLockupProps }) {
|
||||
const { size = "default", ...svgProps } = props;
|
||||
const tighten = size === "display" ? DISPLAY_GAP_TIGHTEN_UNITS : 0;
|
||||
const width = asset.width - tighten;
|
||||
const viewBox = tighten > 0 ? `0 0 ${width} ${asset.height}` : asset.viewBox;
|
||||
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={asset.width}
|
||||
width={width}
|
||||
height={asset.height}
|
||||
viewBox={asset.viewBox}
|
||||
viewBox={viewBox}
|
||||
fill="none"
|
||||
aria-hidden="true"
|
||||
{...props}
|
||||
{...svgProps}
|
||||
>
|
||||
<path
|
||||
d={asset.path}
|
||||
@@ -123,7 +135,11 @@ function BrandLockup({
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<path d={asset.wordmarkPath} fill="currentColor" />
|
||||
<path
|
||||
d={asset.wordmarkPath}
|
||||
fill="currentColor"
|
||||
transform={tighten > 0 ? `translate(-${tighten} 0)` : undefined}
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -139,16 +155,16 @@ export function PaseoHubMark(props: React.SVGProps<SVGSVGElement>) {
|
||||
}
|
||||
|
||||
/** Canonical Paseo lockup (butterfly mark at 94% optical scale + Plus Jakarta Sans SemiBold). */
|
||||
export function PaseoLockup(props: React.SVGProps<SVGSVGElement>) {
|
||||
export function PaseoLockup(props: BrandLockupProps) {
|
||||
return <BrandLockup asset={PASEO_LOCKUP} props={props} />;
|
||||
}
|
||||
|
||||
/** Canonical Paseo Hub lockup (flower mark + Plus Jakarta Sans SemiBold). */
|
||||
export function PaseoHubLockup(props: React.SVGProps<SVGSVGElement>) {
|
||||
export function PaseoHubLockup(props: BrandLockupProps) {
|
||||
return <BrandLockup asset={PASEO_HUB_LOCKUP} props={props} />;
|
||||
}
|
||||
|
||||
/** Canonical Hub lockup (flower mark + "Hub"), used where Paseo is already on screen. */
|
||||
export function HubLockup(props: React.SVGProps<SVGSVGElement>) {
|
||||
export function HubLockup(props: BrandLockupProps) {
|
||||
return <BrandLockup asset={HUB_LOCKUP} props={props} />;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ function HubHero() {
|
||||
return (
|
||||
<header className="space-y-6">
|
||||
<h1>
|
||||
<PaseoHubLockup className="h-10 w-auto text-foreground md:h-12" />
|
||||
<PaseoHubLockup size="display" className="h-10 w-auto text-foreground md:h-12" />
|
||||
<span className="sr-only">{t("hub.title")}</span>
|
||||
</h1>
|
||||
<p className="max-w-2xl text-lg leading-relaxed text-white/70">{t("hub.intro")}</p>
|
||||
|
||||
Reference in New Issue
Block a user