Replace the gruvbox palette with everforest, using the "paper" light background (#efe6cd) rather than everforest's stock #fffbef, which read too bright. - gray is remapped to the everforest neutral ramp: 50-300 are the paper background steps, 900/950 the dark canvas (#2d353b / #232a2e). - primary-* variables now carry everforest green (#8da101 light, #a7c080 dark) instead of gruvbox blue. - article prose gets explicit --tw-prose-* / --tw-prose-invert-* overrides. The typography plugin ships Tailwind's own grays, so without this the body copy, headings, rules and code blocks stayed slate on a warm background. - inline code is hardcoded to indigo-500 by the plugin, so it needs a rule of its own; links keep primary-400 via the typography config. - theme-color meta and the logo mark follow the palette. - the 404 button and the active theme-menu chip were white-on-accent, which is unreadable on lime (2.9:1); they now use dark text on primary-500 (5.0:1 light, 7.3:1 dark).
94 lines
3.1 KiB
TypeScript
94 lines
3.1 KiB
TypeScript
import 'css/tailwind.css'
|
|
import 'pliny/search/algolia.css'
|
|
import 'remark-github-blockquote-alert/alert.css'
|
|
|
|
import { Space_Grotesk } from 'next/font/google'
|
|
import { Analytics, AnalyticsConfig } from 'pliny/analytics'
|
|
import { SearchProvider, SearchConfig } from 'pliny/search'
|
|
import Header from '@/components/Header'
|
|
import SectionContainer from '@/components/SectionContainer'
|
|
import Footer from '@/components/Footer'
|
|
import siteMetadata from '@/data/siteMetadata'
|
|
import { ThemeProviders } from './theme-providers'
|
|
import { Metadata } from 'next'
|
|
|
|
const space_grotesk = Space_Grotesk({
|
|
subsets: ['latin'],
|
|
display: 'swap',
|
|
variable: '--font-space-grotesk',
|
|
})
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL(siteMetadata.siteUrl),
|
|
title: {
|
|
default: siteMetadata.title,
|
|
template: `%s | ${siteMetadata.title}`,
|
|
},
|
|
description: siteMetadata.description,
|
|
openGraph: {
|
|
title: siteMetadata.title,
|
|
description: siteMetadata.description,
|
|
url: './',
|
|
siteName: siteMetadata.title,
|
|
images: [siteMetadata.socialBanner],
|
|
locale: 'en_US',
|
|
type: 'website',
|
|
},
|
|
alternates: {
|
|
canonical: './',
|
|
types: {
|
|
'application/rss+xml': `${siteMetadata.siteUrl}/feed.xml`,
|
|
},
|
|
},
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
googleBot: {
|
|
index: true,
|
|
follow: true,
|
|
'max-video-preview': -1,
|
|
'max-image-preview': 'large',
|
|
'max-snippet': -1,
|
|
},
|
|
},
|
|
twitter: {
|
|
title: siteMetadata.title,
|
|
card: 'summary_large_image',
|
|
images: [siteMetadata.socialBanner],
|
|
},
|
|
}
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
const basePath = process.env.BASE_PATH || ''
|
|
|
|
return (
|
|
<html
|
|
lang={siteMetadata.language}
|
|
className={`${space_grotesk.variable} scroll-smooth`}
|
|
suppressHydrationWarning
|
|
>
|
|
<link rel="icon" type="image/png" href="/static/favicons/favicon-96x96.png" sizes="96x96" />
|
|
<link rel="icon" type="image/svg+xml" href="/static/favicons/favicon.svg" />
|
|
<link rel="shortcut icon" href="/static/favicons/favicon.ico" />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/favicons/apple-touch-icon.png" />
|
|
<link rel="manifest" href="/static/favicons/site.webmanifest" />
|
|
<meta name="msapplication-TileColor" content="#2d353b" />
|
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#efe6cd" />
|
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2d353b" />
|
|
<link rel="alternate" type="application/rss+xml" href={`${basePath}/feed.xml`} />
|
|
<body className="bg-gray-50 pl-[calc(100vw-100%)] text-gray-900 antialiased dark:bg-gray-950 dark:text-gray-200">
|
|
<ThemeProviders>
|
|
<Analytics analyticsConfig={siteMetadata.analytics as AnalyticsConfig} />
|
|
<SectionContainer>
|
|
<SearchProvider searchConfig={siteMetadata.search as SearchConfig}>
|
|
<Header />
|
|
<main className="mb-auto">{children}</main>
|
|
</SearchProvider>
|
|
<Footer />
|
|
</SectionContainer>
|
|
</ThemeProviders>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|