forked from web3templates/nextly-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
img blur, revert twin.macro, optimize font import
- Loading branch information
1 parent
ce3a25c
commit 241d793
Showing
8 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ | |
@tailwind utilities; | ||
|
||
@layer base { | ||
@import url("https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap"); | ||
|
||
html, | ||
body { | ||
@apply dark:bg-trueGray-900; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,42 @@ | ||
import Document, { Html, Head, Main, NextScript } from "next/document"; | ||
import { extractCritical } from "@emotion/server"; | ||
// import Document, { Html, Head, Main, NextScript } from "next/document"; | ||
// import { extractCritical } from "@emotion/server"; | ||
|
||
export default class MyDocument extends Document { | ||
static async getInitialProps(ctx) { | ||
const initialProps = await Document.getInitialProps(ctx); | ||
const page = await ctx.renderPage(); | ||
const styles = extractCritical(page.html); | ||
return { ...initialProps, ...page, ...styles }; | ||
} | ||
// export default class MyDocument extends Document { | ||
// static async getInitialProps(ctx) { | ||
// const initialProps = await Document.getInitialProps(ctx); | ||
// const page = await ctx.renderPage(); | ||
// const styles = extractCritical(page.html); | ||
// return { ...initialProps, ...page, ...styles }; | ||
// } | ||
|
||
// render() { | ||
// return ( | ||
// <Html lang="en"> | ||
// <Head> | ||
// <style | ||
// data-emotion-css={this.props.ids.join(" ")} | ||
// dangerouslySetInnerHTML={{ __html: this.props.css }} | ||
// /> | ||
// </Head> | ||
// <body> | ||
// <Main /> | ||
// <NextScript /> | ||
// </body> | ||
// </Html> | ||
// ); | ||
// } | ||
// } | ||
|
||
import Document, { Html, Head, Main, NextScript } from "next/document"; | ||
|
||
class MyDocument extends Document { | ||
render() { | ||
return ( | ||
<Html lang="en"> | ||
<Html> | ||
<Head> | ||
<style | ||
data-emotion-css={this.props.ids.join(" ")} | ||
dangerouslySetInnerHTML={{ __html: this.props.css }} | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</Head> | ||
<body> | ||
|
@@ -26,3 +47,5 @@ export default class MyDocument extends Document { | |
); | ||
} | ||
} | ||
|
||
export default MyDocument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
}; |