Content fetching in the marketing section has been refactored to utilize the Next.js cache, which significantly improves performance. The date format of publishedAt has been updated to be more consistent across files. Code related to CSRF token, fonts, and metadata has been refactored into separate files for easier maintenance and readability.
31 lines
801 B
TypeScript
31 lines
801 B
TypeScript
import { Urbanist as HeadingFont, Inter as SansFont } from 'next/font/google';
|
|
|
|
/**
|
|
* @sans
|
|
* @description Define here the sans font.
|
|
* By default, it uses the Inter font from Google Fonts.
|
|
*/
|
|
const sans = SansFont({
|
|
subsets: ['latin'],
|
|
variable: '--font-sans',
|
|
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'],
|
|
preload: true,
|
|
weight: ['300', '400', '500', '600', '700'],
|
|
});
|
|
|
|
/**
|
|
* @heading
|
|
* @description Define here the heading font.
|
|
* By default, it uses the Urbanist font from Google Fonts.
|
|
*/
|
|
const heading = HeadingFont({
|
|
subsets: ['latin'],
|
|
variable: '--font-heading',
|
|
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'],
|
|
preload: true,
|
|
weight: ['500', '700'],
|
|
});
|
|
|
|
// we export these fonts into the root layout
|
|
export { sans, heading };
|