feat: inline critical css

This commit is contained in:
2023-08-08 11:18:54 +02:00
parent 899f5bca85
commit 6123956f08
5 changed files with 40 additions and 38 deletions

View File

@ -7,6 +7,41 @@ export default function App({ Component }: AppProps) {
<Head>
<link href="/global.css" rel="stylesheet" />
<link href="/prism-material-dark.css" rel="stylesheet" />
<style>
{`
/* work-sans-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Work Sans';
font-style: normal;
font-weight: 400;
src: url('/fonts/work-sans-v18-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* work-sans-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Work Sans';
font-style: normal;
font-weight: 700;
src: url('/fonts/work-sans-v18-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
body {
background: #141218;
padding: 0px 20px;
}
pre {
font-family:Work Sans;
}
a {
color: cadetblue;
font-family: Work Sans;
}
`}
</style>
</Head>
<Component />
</>

View File

@ -28,7 +28,7 @@ export default function Greet(props: PageProps<Series[] | null>) {
Back
</a>
<h3 class="text-2xl text-white font-light">🍿 Movies</h3>
<h3 class="text-2xl text-white font-light">🎥 Series</h3>
</header>
<Grid>
{props.data?.map((doc) => {