mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
remove CustomFont as its not being used
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
import React from 'react'
|
||||
import Head from 'next/head'
|
||||
import * as types from '../lib/types'
|
||||
|
||||
export const CustomFont: React.FC<{ site: types.Site }> = ({ site }) => {
|
||||
if (!site.fontFamily) {
|
||||
return null
|
||||
}
|
||||
|
||||
// https://developers.google.com/fonts/docs/css2
|
||||
const fontFamilies = [site.fontFamily]
|
||||
const googleFontFamilies = fontFamilies
|
||||
.map((font) => font.replace(/ /g, '+'))
|
||||
.map((font) => `family=${font}:ital,wght@0,200..700;1,200..700`)
|
||||
.join('&')
|
||||
const googleFontsLink = `https://fonts.googleapis.com/css?${googleFontFamilies}&display=swap`
|
||||
const cssFontFamilies = fontFamilies.map((font) => `"${font}"`).join(', ')
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel='stylesheet' href={googleFontsLink} />
|
||||
|
||||
<style>{`
|
||||
.notion.notion-app {
|
||||
font-family: ${cssFontFamilies}, -apple-system, BlinkMacSystemFont,
|
||||
'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif,
|
||||
'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
}
|
||||
`}</style>
|
||||
</Head>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -24,7 +24,6 @@ import * as types from 'lib/types'
|
||||
import * as config from 'lib/config'
|
||||
|
||||
// components
|
||||
import { CustomFont } from './CustomFont'
|
||||
import { Loading } from './Loading'
|
||||
import { Page404 } from './Page404'
|
||||
import { PageHead } from './PageHead'
|
||||
@@ -273,8 +272,6 @@ export const NotionPage: React.FC<types.PageProps> = ({
|
||||
url={canonicalPageUrl}
|
||||
/>
|
||||
|
||||
<CustomFont site={site} />
|
||||
|
||||
{isLiteMode && <BodyClassName className='notion-lite' />}
|
||||
|
||||
<NotionRenderer
|
||||
|
||||
Reference in New Issue
Block a user