-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.tsx
More file actions
77 lines (70 loc) · 2.08 KB
/
Copy pathlayout.tsx
File metadata and controls
77 lines (70 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import type { Metadata } from 'next'
import { Barlow_Condensed, Space_Mono, Inter } from 'next/font/google'
import Script from 'next/script'
import './globals.css'
import Header from '@/components/layout/Header'
import Footer from '@/components/layout/Footer'
import AnnouncementBanner from '@/components/layout/AnnouncementBanner'
const barlowCondensed = Barlow_Condensed({
weight: ['600', '700', '800'],
subsets: ['latin'],
variable: '--font-barlow-condensed',
display: 'swap',
})
const spaceMono = Space_Mono({
weight: ['400', '700'],
subsets: ['latin'],
variable: '--font-space-mono',
display: 'swap',
})
const inter = Inter({
subsets: ['latin'],
variable: '--font-inter',
display: 'swap',
})
export const metadata: Metadata = {
title: {
default: '256 Foundation',
template: '%s | 256 Foundation',
},
description:
'Building the open-source Bitcoin mining ecosystem. The 256 Foundation funds developers creating open-source Bitcoin mining hardware and software.',
metadataBase: new URL(
process.env.NEXT_PUBLIC_SITE_URL ?? 'https://256foundation.org'
),
openGraph: {
siteName: '256 Foundation',
type: 'website',
},
twitter: {
site: '@256FOUNDATION',
card: 'summary_large_image',
},
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
const umamiId = process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID
const umamiUrl = process.env.NEXT_PUBLIC_UMAMI_URL
return (
<html lang="en" className={`${barlowCondensed.variable} ${spaceMono.variable} ${inter.variable}`}>
<body className="min-h-screen flex flex-col bg-white dark:bg-[#1a1a1a] text-gray-800 dark:text-gray-100 font-sans antialiased">
<Header />
<main className="flex-1 site-main">
<AnnouncementBanner />
{children}
</main>
<Footer />
{process.env.NODE_ENV === 'production' && umamiId && umamiUrl && (
<Script
src={`${umamiUrl}/script.js`}
data-website-id={umamiId}
strategy="afterInteractive"
/>
)}
</body>
</html>
)
}