stacker.news/pages/_document.js

31 lines
817 B
JavaScript
Raw Normal View History

2021-11-09 22:43:56 +00:00
import Document, { Html, Head, Main, NextScript } from 'next/document'
2021-11-04 18:22:03 +00:00
2022-02-24 03:02:23 +00:00
const publicPrefix = process.env.NODE_ENV === 'development' ? '' : 'https://a.stacker.news'
2021-11-09 22:43:56 +00:00
class MyDocument extends Document {
render () {
return (
<Html>
2022-02-05 17:29:41 +00:00
<Head>
2022-02-24 03:02:23 +00:00
<link rel='preload' href={`${publicPrefix}/Lightningvolt-xoqm.ttf`} as='font' type='font/ttf' crossOrigin='' />
<style
dangerouslySetInnerHTML={{
__html:
` @font-face {
font-family: lightning;
src: url(${publicPrefix}/Lightningvolt-xoqm.ttf);
}`
}}
/>
2022-02-05 17:29:41 +00:00
</Head>
2021-11-09 22:43:56 +00:00
<body>
2021-11-16 20:55:40 +00:00
<script src='/darkmode.js' />
2021-11-09 22:43:56 +00:00
<Main />
<NextScript />
</body>
</Html>
)
2021-11-04 18:22:03 +00:00
}
}
2021-11-09 22:43:56 +00:00
export default MyDocument