From e34325872557b075d49cccb696ef6ecc9fe85cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Born=C3=B6?= Date: Fri, 26 Aug 2022 15:35:16 +0200 Subject: [PATCH] Use Font Optimization in examples --- examples/with-clerk/pages/_document.js | 18 ++++++++++++++++++ examples/with-clerk/styles/globals.css | 2 -- examples/with-deta-base/pages/_document.js | 18 ++++++++++++++++++ examples/with-deta-base/pages/index.js | 4 ---- examples/with-gsap/App.scss | 2 -- examples/with-gsap/pages/_document.js | 18 ++++++++++++++++++ examples/with-mongodb-mongoose/css/style.css | 2 -- .../with-mongodb-mongoose/pages/_document.js | 18 ++++++++++++++++++ .../with-react-hook-form/pages/_document.js | 18 ++++++++++++++++++ .../with-react-hook-form/styles/global.css | 2 -- 10 files changed, 90 insertions(+), 12 deletions(-) create mode 100644 examples/with-clerk/pages/_document.js create mode 100644 examples/with-deta-base/pages/_document.js create mode 100644 examples/with-gsap/pages/_document.js create mode 100644 examples/with-mongodb-mongoose/pages/_document.js create mode 100644 examples/with-react-hook-form/pages/_document.js diff --git a/examples/with-clerk/pages/_document.js b/examples/with-clerk/pages/_document.js new file mode 100644 index 000000000000000..04b8a932dd2f422 --- /dev/null +++ b/examples/with-clerk/pages/_document.js @@ -0,0 +1,18 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + + + + + +
+ + + + ) +} diff --git a/examples/with-clerk/styles/globals.css b/examples/with-clerk/styles/globals.css index c7903026590eaa3..a21f2833ca19815 100644 --- a/examples/with-clerk/styles/globals.css +++ b/examples/with-clerk/styles/globals.css @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap'); - html, body { font-family: 'Source Sans Pro', sans-serif; diff --git a/examples/with-deta-base/pages/_document.js b/examples/with-deta-base/pages/_document.js new file mode 100644 index 000000000000000..df17ebe6005312e --- /dev/null +++ b/examples/with-deta-base/pages/_document.js @@ -0,0 +1,18 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + + + + + +
+ + + + ) +} diff --git a/examples/with-deta-base/pages/index.js b/examples/with-deta-base/pages/index.js index 7fcc39ca6fd7c02..1ab3fa2fb577cdd 100644 --- a/examples/with-deta-base/pages/index.js +++ b/examples/with-deta-base/pages/index.js @@ -75,10 +75,6 @@ export default function Home() { deta + next.js -

diff --git a/examples/with-gsap/App.scss b/examples/with-gsap/App.scss index 586121d1a723be4..b14e9facdbc40c3 100644 --- a/examples/with-gsap/App.scss +++ b/examples/with-gsap/App.scss @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css?family=Bebas+Neue|Poppins:300,400&display=swap'); - .header { width: 100%; display: flex; diff --git a/examples/with-gsap/pages/_document.js b/examples/with-gsap/pages/_document.js new file mode 100644 index 000000000000000..c0219bc9e93dae6 --- /dev/null +++ b/examples/with-gsap/pages/_document.js @@ -0,0 +1,18 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + + + + + +
+ + + + ) +} diff --git a/examples/with-mongodb-mongoose/css/style.css b/examples/with-mongodb-mongoose/css/style.css index 908903d014e0a67..28a5d320e200cbf 100644 --- a/examples/with-mongodb-mongoose/css/style.css +++ b/examples/with-mongodb-mongoose/css/style.css @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap'); - * { font-family: 'Open Sans', sans-serif; box-sizing: border-box; diff --git a/examples/with-mongodb-mongoose/pages/_document.js b/examples/with-mongodb-mongoose/pages/_document.js new file mode 100644 index 000000000000000..191b81ba6fb60df --- /dev/null +++ b/examples/with-mongodb-mongoose/pages/_document.js @@ -0,0 +1,18 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + + + + + +
+ + + + ) +} diff --git a/examples/with-react-hook-form/pages/_document.js b/examples/with-react-hook-form/pages/_document.js new file mode 100644 index 000000000000000..f09767919e88599 --- /dev/null +++ b/examples/with-react-hook-form/pages/_document.js @@ -0,0 +1,18 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + + + + + +
+ + + + ) +} diff --git a/examples/with-react-hook-form/styles/global.css b/examples/with-react-hook-form/styles/global.css index 9cfcfe629d991cb..353439cdc1c8994 100644 --- a/examples/with-react-hook-form/styles/global.css +++ b/examples/with-react-hook-form/styles/global.css @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap'); - :root { --white: #fff; --light-border: #ccc;