Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Remove wrong alternate languages #17311

Merged
Merged
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: 2 additions & 2 deletions docs/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 => (
<link
key={userLanguage2}
rel="alternate"
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/blog/material-ui-v1-is-out.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: Material-UI v1 is out 🎉
<p class="blog-description">Our new documentation header & logo by @hai-cea</p>

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. ✨✨✨

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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**

Expand Down
10 changes: 5 additions & 5 deletions docs/src/modules/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/badges/CustomizedBadges.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export default function CustomizedBadges() {
vertical: 'bottom',
horizontal: 'right',
}}
badgeContent={<SmallAvatar src="/static/images/avatar/1.jpg" />}
badgeContent={<SmallAvatar alt="Stock avatar" src="/static/images/avatar/1.jpg" />}
>
<Avatar src="/static/images/avatar/2.jpg" />
<Avatar alt="Stock avatar" src="/static/images/avatar/2.jpg" />
</Badge>
</Box>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/badges/CustomizedBadges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export default function CustomizedBadges() {
vertical: 'bottom',
horizontal: 'right',
}}
badgeContent={<SmallAvatar src="/static/images/avatar/1.jpg" />}
badgeContent={<SmallAvatar alt="Stock avatar" src="/static/images/avatar/1.jpg" />}
>
<Avatar src="/static/images/avatar/2.jpg" />
<Avatar alt="Stock avatar" src="/static/images/avatar/2.jpg" />
</Badge>
</Box>
</Box>
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/getting-started/templates/album/Album.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function Copyright() {
</Typography>
);
}

const useStyles = makeStyles(theme => ({
icon: {
marginRight: theme.spacing(2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function Copyright() {
</Typography>
);
}

const useStyles = makeStyles(theme => ({
'@global': {
body: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ import Container from '@material-ui/core/Container';
import Typography from '../components/Typography';
import TextField from '../components/TextField';

function Copyright() {
return (
<React.Fragment>
{'© '}
<Link color="inherit" href="https://material-ui.com/">
Your Website
</Link>{' '}
{new Date().getFullYear()}
</React.Fragment>
);
}

const useStyles = makeStyles(theme => ({
root: {
display: 'flex',
Expand Down Expand Up @@ -83,7 +95,9 @@ export default function AppFooter() {
<img src="/static/themes/onepirate/appFooterTwitter.png" alt="Twitter" />
</a>
</Grid>
<Grid item>© 2018 Onepirate</Grid>
<Grid item>
<Copyright />
</Grid>
</Grid>
</Grid>
<Grid item xs={6} sm={4} md={2}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function ProductHero(props) {
return (
<ProductHeroLayout backgroundClassName={classes.background}>
{/* Increase the network loading priority of the background image. */}
<img style={{ display: 'none' }} src={backgroundImage} alt="" />
<img style={{ display: 'none' }} src={backgroundImage} alt="increase priority" />
<Typography color="inherit" align="center" variant="h2" marked="center">
Upgrade your Sundays
</Typography>
Expand Down
32 changes: 27 additions & 5 deletions docs/src/pages/premium-themes/paperbase/Paperbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<Link color="inherit" href="https://material-ui.com/">
Your Website
</Link>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
);
}

let theme = createMuiTheme({
palette: {
primary: {
Expand Down Expand Up @@ -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',
},
};
Expand Down Expand Up @@ -168,11 +187,14 @@ function Paperbase(props) {
<Navigator PaperProps={{ style: { width: drawerWidth } }} />
</Hidden>
</nav>
<div className={classes.appContent}>
<div className={classes.app}>
<Header onDrawerToggle={handleDrawerToggle} />
<main className={classes.mainContent}>
<main className={classes.main}>
<Content />
</main>
<footer className={classes.footer}>
<Copyright />
</footer>
</div>
</div>
</ThemeProvider>
Expand Down