| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- import React from "react";
- import Document, { Head, Main, NextScript } from "next/document";
- import { ServerStyleSheet } from "styled-components";
- import { Colors } from "../consts";
- interface Props {
- styleTags: any;
- }
- class AppDocument extends Document<Props> {
- static getInitialProps({ renderPage }) {
- const sheet = new ServerStyleSheet();
- const page = renderPage(App => props =>
- sheet.collectStyles(<App {...props} />)
- );
- const styleTags = sheet.getStyleElement();
- return { ...page, styleTags };
- }
- render() {
- return (
- <html lang="en">
- <Head>
- <meta charSet="utf-8" />
- <meta
- name="viewport"
- content="width=device-width, initial-scale=1, viewport-fit=cover"
- />
- <meta
- name="description"
- content="Kutt.it is a free and open source URL shortener with custom domains and stats."
- />
- <link
- href="https://fonts.googleapis.com/css?family=Nunito:300,400,700"
- rel="stylesheet"
- />
- <link rel="icon" sizes="196x196" href="/images/favicon-196x196.png" />
- <link rel="icon" sizes="32x32" href="/images/favicon-32x32.png" />
- <link rel="icon" sizes="16x16" href="/images/favicon-16x16.png" />
- <link rel="apple-touch-icon" href="/images/favicon-196x196.png" />
- <link rel="mask-icon" href="/images/icon.svg" color="blue" />
- <link rel="manifest" href="manifest.webmanifest" />
- <meta name="theme-color" content="#f3f3f3" />
- <meta property="fb:app_id" content="123456789" />
- <meta property="og:url" content="https://kutt.it" />
- <meta property="og:type" content="website" />
- <meta property="og:title" content="Kutt.it" />
- <meta property="og:image" content="https://kutt.it/images/card.png" />
- <meta
- property="og:description"
- content="Free & Open Source Modern URL Shortener"
- />
- <meta name="twitter:url" content="https://kutt.it" />
- <meta name="twitter:title" content="Kutt.it" />
- <meta
- name="twitter:description"
- content="Free & Open Source Modern URL Shortener"
- />
- <meta
- name="twitter:image"
- content="https://kutt.it/images/card.png"
- />
- {this.props.styleTags}
- <script
- dangerouslySetInnerHTML={{
- __html: `window.recaptchaCallback = function() { window.isCaptchaReady = true; }`
- }}
- />
- <script
- src="https://www.google.com/recaptcha/api.js?render=explicit"
- async
- defer
- />
- <script src="static/analytics.js" />
- </Head>
- <body
- style={{
- margin: 0,
- backgroundColor: Colors.Bg,
- font: '16px/1.45 "Nunito", sans-serif',
- overflowX: "hidden",
- color: Colors.Text
- }}
- >
- <Main />
- <NextScript />
- </body>
- </html>
- );
- }
- }
- export default AppDocument;
|