Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true, "displayName": true }]]
}
8,439 changes: 5,602 additions & 2,837 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
"author": "",
"license": "ISC",
"dependencies": {
"next": "^8.0.3",
"next": "^9.2.1",
"next-fonts": "^0.17.0",
"react": "^16.8.5",
"react-dom": "^16.8.5",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"styled-components": "^4.1.3"
},
"devDependencies": {
"babel-plugin-styled-components": "^1.10.7"
}
}
22 changes: 22 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { createGlobalStyle } from "styled-components";

const GlobalStyle = createGlobalStyle`
@font-face {
font-family: 'Pangram';
src: url('/static/fonts/Pangram-Regular.ttf');
src: url('/static/fonts/Pangram-Bold.ttf');
src: url('/static/fonts/Pangram-Black.ttf');
src: url('/static/fonts/Pangram-ExtraLight.ttf');
}
`;

const MyApp = ({ Component, pageProps }) => {
return (
<>
<GlobalStyle />
<Component {...pageProps} />
</>
);
};

export default MyApp;
33 changes: 2 additions & 31 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import Document, { Html, Head, Main, NextScript } from 'next/document';
import Document from "next/document";

import { ServerStyleSheet, createGlobalStyle } from 'styled-components';

const GlobalStyle = createGlobalStyle`
@font-face {
font-family: 'Pangram';
src: url('/static/fonts/Pangram-Regular.ttf');
src: url('/static/fonts/Pangram-Bold.ttf');
src: url('/static/fonts/Pangram-Black.ttf');
src: url('/static/fonts/Pangram-ExtraLight.ttf');
}
`;
import { ServerStyleSheet } from "styled-components";

export default class MyDocument extends Document {
static async getInitialProps(ctx) {
Expand All @@ -37,23 +27,4 @@ export default class MyDocument extends Document {
sheet.seal();
}
}

render() {
return (
<Html>
<Head>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0"
/>
</Head>
<body>
<GlobalStyle />
<Main />
<NextScript />
</body>
</Html>
);
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.