fix lightning font loading
This commit is contained in:
parent
8e857fd8a7
commit
6ec1aa1a1f
|
@ -1,11 +1,21 @@
|
||||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||||
|
|
||||||
|
const publicPrefix = process.env.NODE_ENV === 'development' ? '' : 'https://a.stacker.news'
|
||||||
class MyDocument extends Document {
|
class MyDocument extends Document {
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<Html>
|
<Html>
|
||||||
<Head>
|
<Head>
|
||||||
<link rel='preload' href='/Lightningvolt-xoqm.ttf' as='font' type='font/ttf' crossOrigin='' />
|
<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);
|
||||||
|
}`
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<body>
|
<body>
|
||||||
<script src='/darkmode.js' />
|
<script src='/darkmode.js' />
|
||||||
|
|
|
@ -53,11 +53,6 @@ $tooltip-bg: #5c8001;
|
||||||
|
|
||||||
@import "~bootstrap/scss/bootstrap";
|
@import "~bootstrap/scss/bootstrap";
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: lightning;
|
|
||||||
src: url(/Lightningvolt-xoqm.ttf);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 767px) {
|
@media screen and (min-width: 767px) {
|
||||||
.table-sm th, .table-sm td {
|
.table-sm th, .table-sm td {
|
||||||
padding: .3rem .75rem;
|
padding: .3rem .75rem;
|
||||||
|
|
Loading…
Reference in New Issue