Skip to content

Commit

Permalink
[docs] Batch small changes (mui#22646)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Sep 21, 2020
1 parent 13a676a commit 2a9a80c
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 77 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@

[React](https://reactjs.org/) components for faster and simpler web development. Build your own design system, or start with [Material Design](https://material.io/design/introduction/).

[![npm package](https://img.shields.io/npm/v/@material-ui/core/latest.svg)](https://www.npmjs.com/package/@material-ui/core)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mui-org/material-ui/blob/master/LICENSE)
[![npm latest package](https://img.shields.io/npm/v/@material-ui/core/latest.svg)](https://www.npmjs.com/package/@material-ui/core)
[![npm next package](https://img.shields.io/npm/v/@material-ui/core/next.svg)](https://www.npmjs.com/package/@material-ui/core)
[![npm downloads](https://img.shields.io/npm/dm/@material-ui/core.svg)](https://www.npmjs.com/package/@material-ui/core)
[![CircleCI](https://img.shields.io/circleci/project/github/mui-org/material-ui/master.svg)](https://circleci.com/gh/mui-org/material-ui/tree/master)
[![Build Status](https://dev.azure.com/mui-org/Material-UI/_apis/build/status/mui-org.material-ui?branchName=master)](https://dev.azure.com/mui-org/Material-UI/_build/latest?definitionId=1&branchName=master)
[![Coverage Status](https://img.shields.io/codecov/c/github/mui-org/material-ui/master.svg)](https://codecov.io/gh/mui-org/material-ui/branch/master)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1320/badge)](https://bestpractices.coreinfrastructure.org/projects/1320)
![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)
[![CircleCI](https://img.shields.io/circleci/project/github/mui-org/material-ui/next.svg)](https://app.circleci.com/pipelines/github/mui-org/material-ui?branch=next)
[![Coverage Status](https://img.shields.io/codecov/c/github/mui-org/material-ui/next.svg)](https://codecov.io/gh/mui-org/material-ui/branch/next)
[![Follow on Twitter](https://img.shields.io/twitter/follow/MaterialUI.svg?label=follow+Material-UI)](https://twitter.com/MaterialUI)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=mui-org/material-ui)](https://dependabot.com)
[![PeerDependencies](https://david-dm.org/mui-org/material-ui/master/peer-status.svg?path=packages/material-ui)](https://david-dm.org/mui-org/material-ui/master?type=peer&path=packages/material-ui)
[![Dependencies](https://david-dm.org/mui-org/material-ui/master/status.svg?path=packages/material-ui)](https://david-dm.org/mui-org/material-ui/master?path=packages/material-ui)
[![DevDependencies](https://david-dm.org/mui-org/material-ui/master/dev-status.svg?path=packages/material-ui)](https://david-dm.org/mui-org/material-ui/master?type=dev)
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mui-org/material-ui.svg)](https://isitmaintained.com/project/mui-org/material-ui 'Average time to resolve an issue')
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/material-ui-docs/localized.svg?cache=v1)](https://translate.material-ui.com/project/material-ui-docs)
[![Crowdin](https://badges.crowdin.net/material-ui-docs/localized.svg)](https://translate.material-ui.com/project/material-ui-docs)
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/material-ui)](https://opencollective.com/material-ui)

</div>

Expand Down
4 changes: 3 additions & 1 deletion docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ function AppWrapper(props) {

const activePage = findActivePage(pages, router.pathname);

let fonts = ['https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap'];
let fonts = [
'https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,700&display=swap',
];
if (router.pathname.match(/onepirate/)) {
fonts = [
'https://fonts.googleapis.com/css?family=Roboto+Condensed:700|Work+Sans:300,400&display=swap',
Expand Down
107 changes: 56 additions & 51 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
# Proxies
/fr/* /:splat 200
/de/* /:splat 200
/ja/* /:splat 200

# For Google
# Link used in the demos, avoid 404
/drafts / 301
/inbox* / 301
/trash / 301
/spam / 301

/size-snapshot https://s3.eu-central-1.amazonaws.com/eps1lon-material-ui/artifacts/master/latest/size-snapshot.json 200

# To add when we finish work on v5.
# To add when we finish work on v5
# https://next.material-ui.com/* https://material-ui.com/:splat 301!

# We like to have multiple domains O:)
https://material-ui-next.com/* https://material-ui.com/:splat 301!
# Support multiple domains
https://material-ui.dev/* https://material-ui.com/:splat 301!

# link shortener
# For links hosted in the code published on npm
/r/styles-instance-warning /getting-started/faq/#i-have-several-instances-of-styles-on-the-page 302
/r/caveat-with-refs-guide /guides/composition/#caveat-with-refs 302
/r/pseudo-classes-guide /customization/components/#pseudo-classes 302
Expand All @@ -28,42 +22,9 @@ https://material-ui.dev/* https://material-ui.com/:splat 301!
/r/custom-component-variants /customization/components/#adding-new-component-variants
/r/x-license https://material-ui.com/store/items/material-ui-x/

# Added in chronological order, to be removed at some point.
/css-in-js/* /styles/:splat 301
/customization/css-in-js/ /styles/basics/ 301
/customization/overrides/ /customization/components/ 301
/demos/selection-controls/ /components/radio-buttons/ 301
/demos/* /components/:splat 301
/getting-started/page-layout-examples/* /getting-started/templates/:splat 301
/guides/csp/ /styles/advanced/#what-is-csp-and-why-is-it-useful 301
/guides/migration-v0.x /guides/migration-v0x/ 301
/lab/about/ /components/about-the-lab/ 301
/lab/api/* /api/:splat 301
/lab/* /components/:splat 301
/layout/basics/ /guides/responsive-ui/ 301
/layout/breakpoints/ /customization/breakpoints/ 301
/layout/css-in-js/ /styles/basics/ 301
/layout/* /components/:splat 301
/page-layout-examples/* /getting-started/templates/:splat 301
/style/color/ /customization/color/ 301
/style/reboot/ /components/css-baseline/ 301
/style/typography https://v3.material-ui.com/style/typography/#migration-to-typography-v2 301
/style/* /components/:splat 301
/utils/modals/ /components/modal/ 301
/utils/popovers/ /components/popover/ 301
/utils/* /components/:splat 301
/api/mui-theme-provider/ /styles/api/ 301
/components/expansion-panels/ /components/accordion/ 301
/api/expansion-panel/ /api/accordion/ 301
/api/expansion-panel-actions/ /api/accordion-actions/ 301
/api/expansion-panel-details/ /api/accordion-details/ 301
/api/expansion-panel-summary/ /api/accordion-summary/ 301
/premium-themes* https://material-ui.com/store/ 301
/customization/themes/ /customization/theming/ 301
https://v1-5-0.material-ui.com/* https://v1.material-ui.com/:splat 301!
https://v3-9-0.material-ui.com/* https://v3.material-ui.com/:splat 301!

# Legacy
# Legacy redirection
# Added in chronological order
# To be removed at some point
/v0.20.0 https://v0.material-ui.com/v0.20.0
/v0.19.4 https://v0.material-ui.com/v0.19.4
/v0.19.3 https://v0.material-ui.com/v0.19.3
Expand Down Expand Up @@ -134,14 +95,58 @@ https://v3-9-0.material-ui.com/* https://v3.material-ui.com/:splat 301!
/v0.3.2 https://v0.material-ui.com/v0.3.2
/v0.3.1 https://v0.material-ui.com/v0.3.1
/v0.3.0 https://v0.material-ui.com/v0.3.0
/css-in-js/* /styles/:splat 301
/customization/css-in-js/ /styles/basics/ 301
/customization/overrides/ /customization/components/ 301
/demos/selection-controls/ /components/radio-buttons/ 301
/demos/* /components/:splat 301
/getting-started/page-layout-examples/* /getting-started/templates/:splat 301
/guides/csp/ /styles/advanced/#what-is-csp-and-why-is-it-useful 301
/guides/migration-v0.x /guides/migration-v0x/ 301
/lab/about/ /components/about-the-lab/ 301
/lab/api/* /api/:splat 301
/lab/* /components/:splat 301
/layout/basics/ /guides/responsive-ui/ 301
/layout/breakpoints/ /customization/breakpoints/ 301
/layout/css-in-js/ /styles/basics/ 301
/layout/* /components/:splat 301
/page-layout-examples/* /getting-started/templates/:splat 301
/style/color/ /customization/color/ 301
/style/reboot/ /components/css-baseline/ 301
/style/typography https://v3.material-ui.com/style/typography/#migration-to-typography-v2 301
/style/* /components/:splat 301
/utils/modals/ /components/modal/ 301
/utils/popovers/ /components/popover/ 301
/utils/* /components/:splat 301
/api/mui-theme-provider/ /styles/api/ 301
/components/expansion-panels/ /components/accordion/ 301
/api/expansion-panel/ /api/accordion/ 301
/api/expansion-panel-actions/ /api/accordion-actions/ 301
/api/expansion-panel-details/ /api/accordion-details/ 301
/api/expansion-panel-summary/ /api/accordion-summary/ 301
/premium-themes* https://material-ui.com/store/ 301
/customization/themes/ /customization/theming/ 301
https://v1-5-0.material-ui.com/* https://v1.material-ui.com/:splat 301!
https://v3-9-0.material-ui.com/* https://v3.material-ui.com/:splat 301!
/:lang/components/data-grid/* /components/data-grid/:splat 302
/:lang/api/data-grid/ /api/data-grid/ 302
/:lang/api/x-grid/ /api/x-grid/ 302

# Proxies

## Localization
/fr/* /:splat 200
/de/* /:splat 200
/ja/* /:splat 200

## Store
/store/* https://material-ui-store.netlify.app/:splat 200
/store-staging/* https://master--material-ui-store.netlify.app/:splat 200
/components/data-grid/* https://material-ui-x.netlify.app/components/data-grid/:splat 200
/api/data-grid/ https://material-ui-x.netlify.app/api/data-grid/ 200
/api/x-grid/ https://material-ui-x.netlify.app/api/x-grid/ 200
# Unlike the store that expect to be hosted under a subfolder,
# material-ui-x is configured to be hosted at the root.

## material-ui-x
## Unlike the store that expect to be hosted under a subfolder,
## material-ui-x is configured to be hosted at the root.
/api/*/ https://material-ui-x.netlify.app/api/:splat/ 200
/components/* https://material-ui-x.netlify.app/components/:splat 200
/_next/* https://material-ui-x.netlify.app/_next/:splat 200
/static/x/* https://material-ui-x.netlify.app/static/x/:splat 200
4 changes: 2 additions & 2 deletions docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,8 @@ const useStyles = makeStyles(
(theme) => ({
root: {
marginBottom: 40,
marginLeft: -theme.spacing(2),
marginRight: -theme.spacing(2),
marginLeft: theme.spacing(-2),
marginRight: theme.spacing(-2),
[theme.breakpoints.up('sm')]: {
padding: theme.spacing(0, 1),
marginLeft: 0,
Expand Down
5 changes: 5 additions & 0 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ const styles = (theme) => ({
// To prevent the link to get the focus.
display: 'none',
},
'& a:not(.anchor-link-style):hover': {
color: 'currentColor',
borderBottom: '1px solid currentColor',
textDecoration: 'none',
},
'&:hover .anchor-link-style': {
display: 'inline-block',
padding: '0 8px',
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function pageToTitle(page) {
const path = page.subheader || page.pathname;
const name = path.replace(/.*\//, '');

if (path.indexOf('/api/') !== -1) {
if (path.indexOf('/api') === 0) {
return upperFirst(camelCase(name));
}

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/icons/icons.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: React Icon Component
components: Icon, SvgIcon
githubLabel: components: SvgIcon
githubLabel: 'components: SvgIcon'
materialDesign: https://material.io/design/iconography/system-icons.html
---

Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/material-icons/material-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
title: Material Icons
components: Icon, SvgIcon
materialDesign: https://material.io/design/iconography/system-icons.html
packageName: @material-ui/icons
githubLabel: package: icons
packageName: '@material-ui/icons'
githubLabel: 'package: icons'
---

# Material Icons
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Media queries in React for responsive design
githubLabel: hook: useMediaQuery
githubLabel: 'hook: useMediaQuery'
---

# useMediaQuery
Expand Down
5 changes: 1 addition & 4 deletions docs/src/pages/premium-themes/paperbase/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ const styles = (theme) => ({
secondaryBar: {
zIndex: 0,
},
menuButton: {
marginLeft: -theme.spacing(1),
},
iconButtonAvatar: {
padding: 4,
},
Expand Down Expand Up @@ -55,7 +52,7 @@ function Header(props) {
color="inherit"
aria-label="open drawer"
onClick={onDrawerToggle}
className={classes.menuButton}
edge="start"
>
<MenuIcon />
</IconButton>
Expand Down
5 changes: 1 addition & 4 deletions docs/src/pages/premium-themes/paperbase/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ const styles = (theme: Theme) =>
secondaryBar: {
zIndex: 0,
},
menuButton: {
marginLeft: -theme.spacing(1),
},
iconButtonAvatar: {
padding: 4,
},
Expand Down Expand Up @@ -64,7 +61,7 @@ function Header(props: HeaderProps) {
color="inherit"
aria-label="open drawer"
onClick={onDrawerToggle}
className={classes.menuButton}
edge="start"
>
<MenuIcon />
</IconButton>
Expand Down

0 comments on commit 2a9a80c

Please sign in to comment.