From 42d62bf8a14dcde4c171bc1ec702214511c81789 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Wed, 4 Sep 2019 15:45:50 +0200 Subject: [PATCH] [docs] Remove wrong alternate languages --- docs/pages/_document.js | 4 +-- docs/pages/blog/material-ui-v1-is-out.md | 6 ++-- docs/src/modules/constants.js | 10 +++--- .../components/badges/CustomizedBadges.js | 4 +-- .../components/badges/CustomizedBadges.tsx | 4 +-- .../getting-started/templates/album/Album.js | 1 + .../templates/pricing/Pricing.js | 1 + .../onepirate/modules/views/AppFooter.js | 16 +++++++++- .../onepirate/modules/views/ProductHero.js | 2 +- .../premium-themes/paperbase/Paperbase.js | 32 ++++++++++++++++--- 10 files changed, 59 insertions(+), 21 deletions(-) diff --git a/docs/pages/_document.js b/docs/pages/_document.js index 25a577eef7d0da..49b4b831ba95f7 100644 --- a/docs/pages/_document.js +++ b/docs/pages/_document.js @@ -4,7 +4,7 @@ import React from 'react'; import { ServerStyleSheets } from '@material-ui/styles'; import Document, { Head, Main, NextScript } from 'next/document'; import { Router as Router2 } from 'next/router'; -import { LANGUAGES_LABEL } from 'docs/src/modules/constants'; +import { LANGUAGES_SSR } from 'docs/src/modules/constants'; import { pathnameToLanguage } from 'docs/src/modules/utils/helpers'; import { themeColor } from 'docs/src/modules/components/ThemeContext'; @@ -64,7 +64,7 @@ class MyDocument extends Document { href={`https://material-ui.com${Router2._rewriteUrlForNextExport(canonical)}`} hrefLang="x-default" /> - {LANGUAGES_LABEL.map(({ code: userLanguage2 }) => ( + {LANGUAGES_SSR.map(userLanguage2 => ( Our new documentation header & logo by @hai-cea

It has taken us two years to do it, but Material-UI v1 has finally arrived! -We are so excited about this release, as it’s setting a new course for the project. Thank you to *everyone*, especially to [the team](https://material-ui.com/discover-more/team/), and to everyone who’s contributed code, issue triage, and support. **Thank you.** +We are so excited about this release, as it’s setting a new course for the project. Thank you to *everyone*, especially to [the team](/discover-more/team/), and to everyone who’s contributed code, issue triage, and support. **Thank you.** ✨✨✨ See the [**1.0.0 Release Note**](https://github.com/mui-org/material-ui/releases/tag/v1.0.0) on GitHub. ✨✨✨ @@ -50,7 +50,7 @@ We have reduced the number of installation steps needed. It should be as simple - **Documentation**. We have made a huge investment in the documentation. We use [Next.js](https://github.com/zeit/next.js) for a blazingly fast navigation experience. It’s also allowing us to provide a first server-side support for the components. We had added a search bar powered by [Algolia’s DocSearch](https://community.algolia.com/docsearch/). (don’t miss the s shortcut to focus the search bar). We have added many new documentation sections: guides, FAQ, etc. We have made the demos more interactive thanks to a direct integration with [CodeSandbox](https://codesandbox.io/s/4j7m47vlm4). -- **DOM**. We have focused on providing low-level components, in this v1 rewrite. By low-level, we mean components as close as possible to the underlying DOM structure and as stateless as possible. It should help reduce the mental overhead of using the components, encourage interoperability, and simplify customizability. For instance with the TextField. The component was broken down into 4 components. Our Input exposes the same API than a native input. You can switch one for the other. Leveraging this structural choice, we were able to demonstrate 3 [autocomplete integration example](https://material-ui.com/demos/autocomplete/) with [Downshift](https://github.com/paypal/downshift), [react-autosuggest](https://github.com/moroshko/react-autosuggest), and [react-select](https://github.com/JedWatson/react-select). +- **DOM**. We have focused on providing low-level components, in this v1 rewrite. By low-level, we mean components as close as possible to the underlying DOM structure and as stateless as possible. It should help reduce the mental overhead of using the components, encourage interoperability, and simplify customizability. For instance with the TextField. The component was broken down into 4 components. Our Input exposes the same API than a native input. You can switch one for the other. Leveraging this structural choice, we were able to demonstrate 3 [autocomplete integration example](https://v1.material-ui.com/demos/autocomplete/) with [Downshift](https://github.com/paypal/downshift), [react-autosuggest](https://github.com/moroshko/react-autosuggest), and [react-select](https://github.com/JedWatson/react-select). ### Code quality @@ -84,7 +84,7 @@ There are so many new things, we can’t be exhaustive. Aside from what we have - New documentation - Right-To-Left support - First class server-side support -- [Premium themes](https://material-ui.com/premium-themes/) +- [Premium themes](https://themes.material-ui.com/) - First class TypeScript support - **And much, much more** diff --git a/docs/src/modules/constants.js b/docs/src/modules/constants.js index 7f84c0347cba14..3f2e7ef76919c9 100644 --- a/docs/src/modules/constants.js +++ b/docs/src/modules/constants.js @@ -8,7 +8,7 @@ const ACTION_TYPES = { }; // Valid languages to server-side render in production -const LANGUAGES = ['en', 'zh', 'ru', 'pt', 'fr', 'es', 'de', 'ja', 'aa']; +const LANGUAGES = ['en', 'zh', 'ru', 'pt', 'es', 'fr', 'de', 'ja', 'aa']; // Server side rendered languages const LANGUAGES_SSR = ['en', 'zh', 'ru', 'pt', 'es']; @@ -34,14 +34,14 @@ const LANGUAGES_LABEL = [ code: 'pt', text: '🇧🇷 Português', }, - { - code: 'fr', - text: '🇫🇷 Français', - }, { code: 'es', text: '🇪🇸 Español', }, + { + code: 'fr', + text: '🇫🇷 Français', + }, { code: 'de', text: '🇩🇪 Deutsch', diff --git a/docs/src/pages/components/badges/CustomizedBadges.js b/docs/src/pages/components/badges/CustomizedBadges.js index 7298c766581b1b..f781d09a53152a 100644 --- a/docs/src/pages/components/badges/CustomizedBadges.js +++ b/docs/src/pages/components/badges/CustomizedBadges.js @@ -79,9 +79,9 @@ export default function CustomizedBadges() { vertical: 'bottom', horizontal: 'right', }} - badgeContent={} + badgeContent={} > - + diff --git a/docs/src/pages/components/badges/CustomizedBadges.tsx b/docs/src/pages/components/badges/CustomizedBadges.tsx index 27246c3d132bd0..c28abe5d17e8ae 100644 --- a/docs/src/pages/components/badges/CustomizedBadges.tsx +++ b/docs/src/pages/components/badges/CustomizedBadges.tsx @@ -85,9 +85,9 @@ export default function CustomizedBadges() { vertical: 'bottom', horizontal: 'right', }} - badgeContent={} + badgeContent={} > - + diff --git a/docs/src/pages/getting-started/templates/album/Album.js b/docs/src/pages/getting-started/templates/album/Album.js index 4c24f1683e0d9d..43f40138138f6d 100644 --- a/docs/src/pages/getting-started/templates/album/Album.js +++ b/docs/src/pages/getting-started/templates/album/Album.js @@ -26,6 +26,7 @@ function Copyright() { ); } + const useStyles = makeStyles(theme => ({ icon: { marginRight: theme.spacing(2), diff --git a/docs/src/pages/getting-started/templates/pricing/Pricing.js b/docs/src/pages/getting-started/templates/pricing/Pricing.js index e41f9c8b612273..63da4a5eaf455c 100644 --- a/docs/src/pages/getting-started/templates/pricing/Pricing.js +++ b/docs/src/pages/getting-started/templates/pricing/Pricing.js @@ -27,6 +27,7 @@ function Copyright() { ); } + const useStyles = makeStyles(theme => ({ '@global': { body: { diff --git a/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js b/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js index 647d6c047d861f..19afadd94e9582 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js +++ b/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js @@ -6,6 +6,18 @@ import Container from '@material-ui/core/Container'; import Typography from '../components/Typography'; import TextField from '../components/TextField'; +function Copyright() { + return ( + + {'© '} + + Your Website + {' '} + {new Date().getFullYear()} + + ); +} + const useStyles = makeStyles(theme => ({ root: { display: 'flex', @@ -83,7 +95,9 @@ export default function AppFooter() { Twitter - © 2018 Onepirate + + + diff --git a/docs/src/pages/premium-themes/onepirate/modules/views/ProductHero.js b/docs/src/pages/premium-themes/onepirate/modules/views/ProductHero.js index 63fc0369719784..73689c1a0d88e1 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/views/ProductHero.js +++ b/docs/src/pages/premium-themes/onepirate/modules/views/ProductHero.js @@ -35,7 +35,7 @@ function ProductHero(props) { return ( {/* Increase the network loading priority of the background image. */} - + increase priority Upgrade your Sundays diff --git a/docs/src/pages/premium-themes/paperbase/Paperbase.js b/docs/src/pages/premium-themes/paperbase/Paperbase.js index f0dcc4688313e2..46426754f6ef80 100644 --- a/docs/src/pages/premium-themes/paperbase/Paperbase.js +++ b/docs/src/pages/premium-themes/paperbase/Paperbase.js @@ -4,10 +4,25 @@ import { createMuiTheme, withStyles } from '@material-ui/core/styles'; import { ThemeProvider } from '@material-ui/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import Hidden from '@material-ui/core/Hidden'; +import Typography from '@material-ui/core/Typography'; +import Link from '@material-ui/core/Link'; import Navigator from './Navigator'; import Content from './Content'; import Header from './Header'; +function Copyright() { + return ( + + {'Copyright © '} + + Your Website + {' '} + {new Date().getFullYear()} + {'.'} + + ); +} + let theme = createMuiTheme({ palette: { primary: { @@ -131,14 +146,18 @@ const styles = { flexShrink: 0, }, }, - appContent: { + app: { flex: 1, display: 'flex', flexDirection: 'column', }, - mainContent: { + main: { flex: 1, - padding: '48px 36px 0', + padding: theme.spacing(6, 4), + background: '#eaeff1', + }, + footer: { + padding: theme.spacing(2), background: '#eaeff1', }, }; @@ -168,11 +187,14 @@ function Paperbase(props) { -
+
-
+
+