Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/site/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { siteConfig } from "@/lib/config";
import { createSiteStructuredData } from "@/lib/structured-data";
import { getBaseUrl } from "@/lib/url";
import { SITE_HOME_DESCRIPTION, SITE_HOME_TITLE } from "@/lib/site-metadata";
import { BuildersDayBanner } from "@/components/builders-day-banner";
import { JsonLd } from "@prisma-docs/ui/components/json-ld";
import { GoogleTagManager } from "@prisma-docs/ui/components/google-tag-manager";
import { OpenAiPixel } from "@prisma-docs/ui/components/openai-pixel";
Expand Down Expand Up @@ -138,7 +137,6 @@ export default function RootLayout({
{/* The campaign landing pages under /lp carry their own header and
footer (app/lp/layout.tsx); SiteChrome drops the site's for them. */}
<SiteChrome>
<BuildersDayBanner />
<Header />
</SiteChrome>
<main id="content" className="min-h-screen">
Expand Down
3 changes: 2 additions & 1 deletion apps/site/src/components/homepage/home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export function HomePage({ variant }: { variant: Variant }) {
return (
<>
{variant === "test" ? <HeroHomeB /> : <HeroHome />}
<LogoCloud />
{/* Version B shows the customer logos inside its hero instead. */}
{variant === "test" ? null : <LogoCloud />}
<Comparison />
<HowItWorks />
<StackBento />
Expand Down
65 changes: 44 additions & 21 deletions apps/site/src/components/sections/hero-home-b.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
min-height: min(100vh, 1120px);
min-height: min(100svh, 1120px);
padding-top: clamp(112px, 14vh, 140px);
padding-bottom: clamp(36px, 6.3vh, 72px);
padding-bottom: clamp(20px, 3.6vh, 36px);
box-sizing: border-box;
}

Expand Down Expand Up @@ -117,8 +117,10 @@
.fadeBottom {
position: absolute;
inset: auto 0 0 0;
height: 200px;
background: linear-gradient(to top, #ffffff 0%, rgb(255 255 255 / 0) 100%);
/* Plain at the very bottom, where the proof and logos sit, so they read on
a calm ground; the glow fades in above them. */
height: 260px;
background: linear-gradient(to top, #ffffff 0%, #ffffff 32%, rgb(255 255 255 / 0) 100%);
}

@keyframes wash {
Expand Down Expand Up @@ -189,6 +191,7 @@
both CTAs and the proof line all fit in the frame; taller screens get the
full sizes. */
.heroSection {
margin-top: auto;
padding-bottom: clamp(25px, 4.5vh, 50px);
}

Expand Down Expand Up @@ -217,7 +220,9 @@
flex-direction: column;
gap: 16px;
max-width: 414px;
padding-bottom: 20px;
/* Margin, not padding, lifts the text off the headline's baseline, so the
rule beside it spans the text and stops with it. */
margin-bottom: 20px;
padding-left: 32px;
border-left: 1px solid rgb(21 21 21 / 0.14);
}
Expand Down Expand Up @@ -402,14 +407,14 @@ a:hover .arrow {

.tileArt {
display: flex;
height: clamp(158px, 21.6vh, 306px);
height: clamp(140px, 18vh, 290px);
align-items: center;
justify-content: center;
}

.tileArt img {
width: clamp(135px, 18.9vh, 252px);
height: clamp(135px, 18.9vh, 252px);
width: clamp(120px, 16vh, 240px);
height: clamp(120px, 16vh, 240px);
object-fit: contain;
}

Expand Down Expand Up @@ -510,14 +515,36 @@ a:hover .arrow {

.proof {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
column-gap: 16px;
row-gap: 8px;
margin: clamp(18px, 3.15vh, 43px) 0 0;
font-size: 13.5px;
color: #3a3b3c;
gap: 20px;
margin: 0 0 clamp(16px, 2.6vh, 26px);
font-size: 13px;
color: #55565a;
}

/* Hairlines either side of the caption, out to the logos' width: the caption
labels the divider between the product and the companies that use it. The
same grey as the card's inner border. */
.proof::before,
.proof::after {
content: "";
flex: 1;
height: 1px;
background: #e2e3dd;
}

/* Pinned to the bottom of the frame, like a sign-off: the auto margins here
and on the hero section split the spare height, so the headline, card and
proof stay centred and the logos sit near the bottom edge on any screen. */
.logosRow {
margin-top: auto;
padding-top: clamp(20px, 3.6vh, 40px);
}

/* Smaller than in the logo section further down: here they sign off the
frame rather than lead a section. */
.logos img {
height: calc(var(--logo-h) * 0.75);
}

.proofItem {
Expand All @@ -530,13 +557,9 @@ a:hover .arrow {
.proofStat {
font-family: var(--font-sora), Inter, sans-serif;
font-weight: 600;
font-size: 19px;
letter-spacing: -0.02em;
color: #151515;
}

.proofSep {
color: #b8b9b3;
font-size: 15px;
letter-spacing: -0.01em;
color: #3a3b3c;
}

.root a:focus-visible,
Expand Down
43 changes: 25 additions & 18 deletions apps/site/src/components/sections/hero-home-b.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import database3DImage from "@prisma-docs/ui/assets/brand/database-3d-cyan-top.w
import Image, { type StaticImageData } from "next/image";
import Link from "next/link";
import { Github } from "@/components/icons/forma";
import { siteConfig } from "@/lib/config";
import { getLiveProof } from "@/lib/github-stars";
import { CommandCopy, HeroCta } from "./hero-home-b-client";
import { LogoList } from "./logo-cloud";
import styles from "./hero-home-b.module.css";

const SIGN_UP = "https://console.prisma.io/sign-up";
Expand Down Expand Up @@ -72,8 +73,12 @@ function ArrowRight({ size }: { size: number }) {
* can do here, straight away. Get a Postgres database or deploy an app, from
* the Console or with one command; the ORM gets a quiet link.
*/
export function HeroHomeB() {
const [developers, stars] = siteConfig.proof;
export async function HeroHomeB() {
// The live GitHub star count, refreshed hourly, as on today's hero (see
// lib/github-stars.ts); "47,800+" if GitHub can't be reached.
const proof = await getLiveProof();
// No stars entry, no caption: never put another stat next to "stars on GitHub".
const stars = proof.find((entry) => entry.id === "github-stars");

return (
<div className={styles.root}>
Expand Down Expand Up @@ -158,22 +163,24 @@ export function HeroHomeB() {
))}
</div>
</div>

{/* Company-level proof, under the card so it reads as Prisma's, not one product's. */}
<p className={styles.proof}>
<span className={styles.proofItem}>
<span className={styles.proofStat}>{developers.stat}</span> {developers.label} build
with Prisma
</span>
<span className={styles.proofSep} aria-hidden>
·
</span>
<span className={styles.proofItem}>
<Github width={14} height={14} aria-hidden />
<span className={styles.proofStat}>{stars.stat}</span> stars on GitHub
</span>
</p>
</section>

{/* The customer logos, pinned to the bottom of the frame; version B
leaves out the separate logo section below the hero (see
home-page.tsx). */}
<div className={`${styles.wrap} ${styles.logosRow}`}>
{/* The live GitHub star count as the logos' caption, so the two read as one
sign-off. */}
{stars && (
<p className={styles.proof}>
<span className={styles.proofItem}>
<Github width={13} height={13} aria-hidden />
<span className={styles.proofStat}>{stars.stat}</span> stars on GitHub
</span>
</p>
)}
<LogoList className={styles.logos} label="Companies that use Prisma" />
</div>
</div>
);
}
57 changes: 36 additions & 21 deletions apps/site/src/components/sections/logo-cloud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,46 @@ const companies: CompanyLogo[] = [
{ name: "Rapha", src: "/logos/companies/rapha.svg", height: 36 },
];

// One still line of logos spread edge to edge across the content width from
// lg up; below that eight can't share a line, so they sit in a 4×2 grid
// (2×4 on phones). Logos run a little larger than their base heights from sm.
/**
* The logos on their own: one still line spread edge to edge across the
* content width from lg up; below that eight can't share a line, so they sit
* in a 4×2 grid (2×4 on phones). Logos run a little larger than their base
* heights from sm. Used by the logo section below and, above the fold, by
* version B of the homepage hero.
*/
export function LogoList({ className, label }: { className?: string; label?: string }) {
return (
<ul
// Named only where the list stands alone; inside LogoCloud the section
// already carries the name, and a second one would be announced twice.
aria-label={label}
className={`grid grid-cols-2 items-center justify-items-center gap-x-6 gap-y-10 sm:grid-cols-4 lg:flex lg:justify-between lg:gap-8 ${className ?? ""}`}
>
{companies.map((company) => (
<li key={company.name} className="flex">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={company.src}
alt={company.name}
// One shade for every mark: brightness(0) turns each file
// into a solid silhouette whatever its brand colours, and 77%
// of black over white lands on the body text colour (#3a3b3c).
className="h-[calc(var(--logo-h)*0.85)] w-auto opacity-[0.77] brightness-0 sm:h-[calc(var(--logo-h)*1.1)]"
style={{ "--logo-h": `${company.height}px` } as React.CSSProperties}
decoding="async"
draggable={false}
/>
</li>
))}
</ul>
);
}

export function LogoCloud() {
return (
<section aria-label="Companies that use Prisma" className="px-4 py-16 sm:px-8 lg:py-20">
<Reveal className="mx-auto max-w-site">
<ul className="grid grid-cols-2 items-center justify-items-center gap-x-6 gap-y-10 sm:grid-cols-4 lg:flex lg:justify-between lg:gap-8">
{companies.map((company) => (
<li key={company.name} className="flex">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={company.src}
alt={company.name}
// One shade for every mark: brightness(0) turns each file
// into a solid silhouette whatever its brand colours, and 77%
// of black over white lands on the body text colour (#3a3b3c).
className="h-[calc(var(--logo-h)*0.85)] w-auto opacity-[0.77] brightness-0 sm:h-[calc(var(--logo-h)*1.1)]"
style={{ "--logo-h": `${company.height}px` } as React.CSSProperties}
decoding="async"
draggable={false}
/>
</li>
))}
</ul>
<LogoList />
</Reveal>
</section>
);
Expand Down
Loading