PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m3s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 13s
PR Checks / Build Frontend (no push) (pull_request) Successful in 44s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 4m29s
Implements the supplied brand guideline: the pin-and-leaf mark, the lowercase schoolcompare wordmark, Manrope for headings and Inter for everything a person reads a number from, the deep-teal/coral/mustard/sage palette, and the rounder geometry the guideline asks for. The landing hero is rebuilt to the concept: a Sand panel carrying the proposition, the search and a trust line, with the brand landscape bleeding to the panel's right edge, followed by the four value props. Concept vs reality — where the guideline describes something this product does not have, the real feature takes its place and the decision is recorded in a code comment next to it: - The Thriving Score is not implemented. Four of its five sub-scores (pastoral, enrichment, community, facilities) have no source in DfE or Ofsted data, and its band names are Ofsted's own, which would sit beside the real Ofsted grade and be indistinguishable from it. - Guides, About, Favourites and Sign in are not added to the nav — there are no such pages and no accounts system. Rankings and Admissions, which the guideline omits, keep their places because they exist. - The fourth value prop is "Never miss a deadline" rather than "Save & revisit", which would need shortlisting. Two deviations from the supplied swatches, both forced by contrast and both confined to text and fills. Coral #F97360 under a white label measures 2.75:1 against a 4.5 floor, so --action is a darkened #BE3C27 and the original coral survives as --coral for tints, borders and illustration. Mustard #F2C94C is 1.5:1 as text, so --mustard-ink carries labels while --mustard stays exact for fills and rings. Every token clears AA on all three light grounds; Sand is the binding one, so several values sit a step darker than white alone would need. The guideline is light-only, but the site already ships a dark theme, so it is rebuilt from the same tokens rather than dropped. Verified: tsc clean, 159/159 unit tests, production build green, and the generated share card and app icon render from the new mark. The hero and the site chrome were rendered from the compiled CSS and the prerendered markup to confirm Manrope and Inter actually resolve — a font token that silently falls back has shipped here before.
106 lines
3.9 KiB
TypeScript
106 lines
3.9 KiB
TypeScript
import { readFile } from 'node:fs/promises';
|
|
import { join } from 'node:path';
|
|
import { ImageResponse } from 'next/og';
|
|
import { markDataUri } from '@/components/Logo';
|
|
|
|
/**
|
|
* The site had no og:image at all, so every link pasted into a class WhatsApp
|
|
* group or a Slack channel rendered as a bare grey text card — on the highest
|
|
* intent channel this product has.
|
|
*
|
|
* The card is the brand's own proposition on the Sand ground, with the mark
|
|
* and a suggestion of the illustration's rolling landscape along the bottom.
|
|
* It states the promise rather than decorating it.
|
|
*/
|
|
export const alt = 'schoolcompare — find the school where your child will flourish';
|
|
export const size = { width: 1200, height: 630 };
|
|
export const contentType = 'image/png';
|
|
|
|
const SAND = '#F5EFE6';
|
|
const INK = '#1C2731';
|
|
const MUTED = '#5F6A75';
|
|
const TEAL = '#0F766E';
|
|
const SAGE = '#A7D7C5';
|
|
const SAGE_DEEP = '#7FC3AC';
|
|
const SAGE_PALE = '#D6EDE2';
|
|
|
|
async function font(file: string) {
|
|
return readFile(join(process.cwd(), 'assets', file));
|
|
}
|
|
|
|
export default async function OpengraphImage() {
|
|
const [regular, bold] = await Promise.all([
|
|
font('Manrope-Regular.ttf'),
|
|
font('Manrope-Bold.ttf'),
|
|
]);
|
|
|
|
return new ImageResponse(
|
|
(
|
|
<div
|
|
style={{
|
|
width: '100%',
|
|
height: '100%',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
justifyContent: 'space-between',
|
|
background: SAND,
|
|
padding: '58px 72px 0',
|
|
fontFamily: 'Manrope',
|
|
position: 'relative',
|
|
}}
|
|
>
|
|
{/* Rolling hills along the bottom edge — the illustration style,
|
|
reduced to the one gesture that survives at thumbnail size. */}
|
|
<div style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height: 210, display: 'flex' }}>
|
|
<svg width="1200" height="210" viewBox="0 0 1200 210">
|
|
<path d="M0 92 C 200 56 380 100 560 78 C 760 54 940 92 1200 62 L1200 210 L0 210 Z" fill={SAGE_PALE} />
|
|
<path d="M0 132 C 230 96 420 140 620 118 C 830 94 1000 130 1200 106 L1200 210 L0 210 Z" fill={SAGE} />
|
|
<path d="M0 176 C 260 146 470 186 690 166 C 900 146 1040 174 1200 158 L1200 210 L0 210 Z" fill={SAGE_DEEP} />
|
|
</svg>
|
|
</div>
|
|
|
|
{/* Lockup */}
|
|
<div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
|
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
|
<img src={markDataUri(TEAL, SAND)} width={52} height={52} alt="" />
|
|
<div style={{ display: 'flex', fontSize: 34, fontWeight: 700, letterSpacing: '-0.04em' }}>
|
|
<span style={{ color: INK }}>school</span>
|
|
<span style={{ color: TEAL }}>compare</span>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Proposition. Sized so the headline holds two lines and the subhead
|
|
one — an orphaned word reads as an accident at this size. */}
|
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 18, paddingBottom: 236 }}>
|
|
<div
|
|
style={{
|
|
display: 'flex',
|
|
flexWrap: 'wrap',
|
|
fontSize: 72,
|
|
fontWeight: 700,
|
|
letterSpacing: '-0.035em',
|
|
lineHeight: 1.05,
|
|
color: INK,
|
|
maxWidth: 900,
|
|
}}
|
|
>
|
|
<span style={{ marginRight: 18 }}>Find the school where</span>
|
|
<span style={{ marginRight: 18 }}>your child will</span>
|
|
<span style={{ color: TEAL }}>flourish.</span>
|
|
</div>
|
|
<div style={{ display: 'flex', fontSize: 27, color: MUTED, letterSpacing: '-0.005em' }}>
|
|
24,000+ schools in England · SATs, GCSEs, Ofsted and admissions
|
|
</div>
|
|
</div>
|
|
</div>
|
|
),
|
|
{
|
|
...size,
|
|
fonts: [
|
|
{ name: 'Manrope', data: regular, weight: 400, style: 'normal' },
|
|
{ name: 'Manrope', data: bold, weight: 700, style: 'normal' },
|
|
],
|
|
}
|
|
);
|
|
}
|