2026-05-19 09:47:13 +01:00
|
|
|
import type { Metadata, Viewport } from 'next';
|
2026-08-06 12:13:04 +01:00
|
|
|
import { Schibsted_Grotesk, Literata } from 'next/font/google';
|
2026-02-20 15:52:53 +00:00
|
|
|
import Script from 'next/script';
|
2026-02-02 20:34:35 +00:00
|
|
|
import { Navigation } from '@/components/Navigation';
|
|
|
|
|
import { Footer } from '@/components/Footer';
|
2026-03-05 09:33:47 +00:00
|
|
|
import { ComparisonToast } from '@/components/ComparisonToast';
|
2026-02-02 20:34:35 +00:00
|
|
|
import { ComparisonProvider } from '@/context/ComparisonProvider';
|
|
|
|
|
import './globals.css';
|
|
|
|
|
|
2026-08-06 12:13:04 +01:00
|
|
|
// Schibsted Grotesk carries the whole interface — headings, labels, and every
|
|
|
|
|
// figure. It was drawn for news brands, so its tabular numerals hold a column
|
|
|
|
|
// properly, which matters on a page that is mostly percentages.
|
|
|
|
|
const schibsted = Schibsted_Grotesk({
|
2026-02-02 21:39:40 +00:00
|
|
|
subsets: ['latin'],
|
|
|
|
|
weight: ['400', '500', '600', '700'],
|
2026-08-06 12:13:04 +01:00
|
|
|
variable: '--font-schibsted',
|
2026-02-02 21:39:40 +00:00
|
|
|
display: 'swap',
|
|
|
|
|
});
|
|
|
|
|
|
2026-08-06 12:13:04 +01:00
|
|
|
// Literata is for prose only — the admissions guide, methodology notes, the
|
|
|
|
|
// editorial sections. It never touches a number or a control.
|
|
|
|
|
const literata = Literata({
|
2026-02-02 21:39:40 +00:00
|
|
|
subsets: ['latin'],
|
2026-08-06 12:13:04 +01:00
|
|
|
weight: ['400', '600'],
|
|
|
|
|
style: ['normal', 'italic'],
|
|
|
|
|
variable: '--font-literata',
|
2026-02-02 21:39:40 +00:00
|
|
|
display: 'swap',
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-19 09:47:13 +01:00
|
|
|
export const viewport: Viewport = {
|
|
|
|
|
width: 'device-width',
|
|
|
|
|
initialScale: 1,
|
|
|
|
|
// viewport-fit=cover lets us paint behind the notch / Dynamic Island so
|
|
|
|
|
// env(safe-area-inset-*) values resolve to real numbers on iPhone.
|
|
|
|
|
viewportFit: 'cover',
|
2026-08-06 12:13:04 +01:00
|
|
|
// These must match --bg-primary in globals.css for each theme, or the
|
|
|
|
|
// browser chrome and the page disagree at the top edge of the screen.
|
2026-05-19 09:47:13 +01:00
|
|
|
themeColor: [
|
2026-08-06 12:13:04 +01:00
|
|
|
{ media: '(prefers-color-scheme: light)', color: '#f2f1ed' },
|
|
|
|
|
{ media: '(prefers-color-scheme: dark)', color: '#10151b' },
|
2026-05-19 09:47:13 +01:00
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-02 20:34:35 +00:00
|
|
|
export const metadata: Metadata = {
|
2026-05-19 09:47:13 +01:00
|
|
|
appleWebApp: {
|
|
|
|
|
capable: true,
|
|
|
|
|
title: 'SchoolCompare',
|
|
|
|
|
statusBarStyle: 'default',
|
|
|
|
|
},
|
2026-02-02 20:34:35 +00:00
|
|
|
title: {
|
2026-03-28 14:59:40 +00:00
|
|
|
default: 'SchoolCompare | Compare School Performance',
|
2026-02-02 20:34:35 +00:00
|
|
|
template: '%s | SchoolCompare',
|
|
|
|
|
},
|
2026-03-28 14:59:40 +00:00
|
|
|
description: 'Compare primary and secondary school SATs and GCSE performance across England',
|
|
|
|
|
keywords: 'school comparison, KS2 results, KS4 results, primary school, secondary school, England schools, SATs results, GCSE results',
|
2026-02-02 20:34:35 +00:00
|
|
|
authors: [{ name: 'SchoolCompare' }],
|
|
|
|
|
manifest: '/manifest.json',
|
2026-08-06 12:13:04 +01:00
|
|
|
// No `icons` key on purpose: setting it here would override the file
|
|
|
|
|
// conventions. app/icon.svg and app/apple-icon.tsx are the source, and
|
|
|
|
|
// app/opengraph-image.tsx supplies og:image and twitter:image.
|
|
|
|
|
metadataBase: new URL('https://schoolcompare.co.uk'),
|
2026-02-02 20:34:35 +00:00
|
|
|
openGraph: {
|
|
|
|
|
type: 'website',
|
2026-03-28 14:59:40 +00:00
|
|
|
title: 'SchoolCompare | Compare School Performance',
|
|
|
|
|
description: 'Compare primary and secondary school SATs and GCSE performance across England',
|
2026-02-02 20:34:35 +00:00
|
|
|
url: 'https://schoolcompare.co.uk',
|
|
|
|
|
siteName: 'SchoolCompare',
|
|
|
|
|
},
|
|
|
|
|
twitter: {
|
2026-08-06 12:13:04 +01:00
|
|
|
// summary_large_image now that there is an image worth showing.
|
|
|
|
|
card: 'summary_large_image',
|
2026-03-28 14:59:40 +00:00
|
|
|
title: 'SchoolCompare | Compare School Performance',
|
|
|
|
|
description: 'Compare primary and secondary school SATs and GCSE performance across England',
|
2026-02-02 20:34:35 +00:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function RootLayout({
|
|
|
|
|
children,
|
|
|
|
|
}: Readonly<{
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}>) {
|
|
|
|
|
return (
|
|
|
|
|
<html lang="en">
|
2026-02-20 15:52:53 +00:00
|
|
|
<head>
|
2026-06-02 13:46:45 +01:00
|
|
|
<link rel="preconnect" href="https://analytics.schoolcompare.co.uk" />
|
|
|
|
|
<link rel="preconnect" href="https://api.postcodes.io" />
|
2026-07-03 13:24:14 +01:00
|
|
|
{/* data-domains: the tracker only fires on the production hostnames,
|
|
|
|
|
so staging (same image, different host) never pollutes Umami */}
|
2026-02-20 15:52:53 +00:00
|
|
|
<Script
|
|
|
|
|
src="https://analytics.schoolcompare.co.uk/script.js"
|
|
|
|
|
data-website-id="d7fb0c95-bb6c-4336-8209-bd10077e50dd"
|
2026-07-03 13:24:14 +01:00
|
|
|
data-domains="schoolcompare.co.uk,www.schoolcompare.co.uk"
|
2026-05-19 22:56:33 +01:00
|
|
|
data-performance="true"
|
2026-02-20 15:52:53 +00:00
|
|
|
strategy="afterInteractive"
|
|
|
|
|
/>
|
2026-07-21 16:03:18 +01:00
|
|
|
{/* Heatmap / session recorder — same data-domains guard so staging
|
|
|
|
|
(same image, different host) never feeds the heatmap. */}
|
|
|
|
|
<Script
|
|
|
|
|
src="https://analytics.schoolcompare.co.uk/recorder.js"
|
|
|
|
|
data-website-id="d7fb0c95-bb6c-4336-8209-bd10077e50dd"
|
|
|
|
|
data-domains="schoolcompare.co.uk,www.schoolcompare.co.uk"
|
|
|
|
|
strategy="afterInteractive"
|
|
|
|
|
/>
|
2026-02-20 15:52:53 +00:00
|
|
|
</head>
|
2026-08-06 12:13:04 +01:00
|
|
|
<body className={`${schibsted.variable} ${literata.variable}`}>
|
2026-02-02 20:34:35 +00:00
|
|
|
<ComparisonProvider>
|
2026-03-25 20:28:03 +00:00
|
|
|
<a href="#main-content" className="skip-link">Skip to main content</a>
|
2026-02-02 21:39:40 +00:00
|
|
|
<Navigation />
|
2026-03-25 20:28:03 +00:00
|
|
|
<main id="main-content" className="main">
|
2026-02-02 21:39:40 +00:00
|
|
|
{children}
|
|
|
|
|
</main>
|
2026-03-05 09:33:47 +00:00
|
|
|
<ComparisonToast />
|
2026-02-02 21:39:40 +00:00
|
|
|
<Footer />
|
2026-02-02 20:34:35 +00:00
|
|
|
</ComparisonProvider>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|