Skip to content

Commit

Permalink
move the minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 4, 2020
1 parent 7b21faf commit 0b0c2ac
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 26 deletions.
5 changes: 0 additions & 5 deletions docs/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ export default class MyDocument extends Document {
return (
<html lang={userLanguage}>
<Head>
{/* Use minimum-scale=1 to enable GPU rasterization. */}
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/>
{/*
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
Expand Down
5 changes: 5 additions & 0 deletions docs/src/modules/components/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export default function Head(props) {

return (
<NextHead>
{/* Use minimum-scale=1 to enable GPU rasterization. */}
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/>
<title>{title}</title>
<meta name="description" content={description} />
{/* Twitter */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
2 changes: 1 addition & 1 deletion examples/create-react-app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
8 changes: 1 addition & 7 deletions examples/nextjs-with-typescript/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ export default class MyApp extends App {
return (
<React.Fragment>
<Head>
<title>My page</title>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/>
<title>My page</title>
{/* PWA primary color */}
<meta name="theme-color" content={theme.palette.primary.main} />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
</Head>
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
Expand Down
10 changes: 9 additions & 1 deletion examples/nextjs-with-typescript/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
import { ServerStyleSheets } from '@material-ui/core/styles';
import theme from '../src/theme';

export default class MyDocument extends Document {
render() {
return (
<html lang="en">
<Head />
<Head>
{/* PWA primary color */}
<meta name="theme-color" content={theme.palette.primary.main} />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
</Head>
<body>
<Main />
<NextScript />
Expand Down
8 changes: 1 addition & 7 deletions examples/nextjs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ export default class MyApp extends App {
return (
<React.Fragment>
<Head>
<title>My page</title>
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/>
<title>My page</title>
{/* PWA primary color */}
<meta name="theme-color" content={theme.palette.primary.main} />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
</Head>
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
Expand Down
10 changes: 9 additions & 1 deletion examples/nextjs/pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
import { ServerStyleSheets } from '@material-ui/core/styles';
import theme from '../src/theme';

export default class MyDocument extends Document {
render() {
return (
<html lang="en">
<Head />
<Head>
{/* PWA primary color */}
<meta name="theme-color" content={theme.palette.primary.main} />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
</Head>
<body>
<Main />
<NextScript />
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<!--
Expand Down
3 changes: 1 addition & 2 deletions examples/ssr/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ function renderFullPage(html, css) {
<head>
<title>My page</title>
<style id="jss-server-side">${css}</style>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Fonts to support Material Design -->
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
</head>
<body>
Expand Down

0 comments on commit 0b0c2ac

Please sign in to comment.