fix lightning font loading
This commit is contained in:
parent
8e857fd8a7
commit
3e977c020d
|
@ -1,11 +1,21 @@
|
|||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
const publicPrefix = process.env.NODE_ENV === 'development' ? '' : 'https://a.stacker.news'
|
||||
class MyDocument extends Document {
|
||||
render () {
|
||||
return (
|
||||
<Html>
|
||||
<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>
|
||||
<body>
|
||||
<script src='/darkmode.js' />
|
||||
|
|
|
@ -21,7 +21,7 @@ export default async function handler (req, res) {
|
|||
const searchQ = req.query.q ? `?q=${req.query.q}` : ''
|
||||
const s3PathPUT = s3PathPrefix + (joinedPath === '.' ? '_' : joinedPath) + searchQ
|
||||
const s3PathGET = s3PathPrefix + (joinedPath === '.' ? '_' : joinedPath) + encodeS3URI(searchQ)
|
||||
const url = process.env.SELF_URL + '/' + joinedPath + searchQ
|
||||
const url = process.env.PUBLIC_URL + '/' + joinedPath + searchQ
|
||||
const aws = new AWS.S3({apiVersion: '2006-03-01'})
|
||||
|
||||
// check to see if we have a recent version of the object
|
||||
|
|
|
@ -53,11 +53,6 @@ $tooltip-bg: #5c8001;
|
|||
|
||||
@import "~bootstrap/scss/bootstrap";
|
||||
|
||||
@font-face {
|
||||
font-family: lightning;
|
||||
src: url(/Lightningvolt-xoqm.ttf);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 767px) {
|
||||
.table-sm th, .table-sm td {
|
||||
padding: .3rem .75rem;
|
||||
|
|
Loading…
Reference in New Issue