Skip to content

Commit

Permalink
[website] Improve lighthouse score (mui#39011)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Sep 17, 2023
1 parent 89635d1 commit 53b9656
Show file tree
Hide file tree
Showing 35 changed files with 229 additions and 527 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default function BaseButtonPlainCss() {
<style type="text/css">{css}</style>
<Stack spacing={2} direction="row" className="demo">
<Button className="github-button">Create Repository</Button>

<button type="button" {...getRootProps()} className="github-button">
Create Repository
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default function BaseButtonPlainCss() {
<style type="text/css">{css}</style>
<Stack spacing={2} direction="row" className="demo">
<Button className="github-button">Create Repository</Button>

<button type="button" {...getRootProps()} className="github-button">
Create Repository
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<style type="text/css">{css}</style>
<Stack spacing={2} direction="row" className="demo">
<Button className="github-button">Create Repository</Button>

<button type="button" {...getRootProps()} className="github-button">
Create Repository
</button>
Expand Down
106 changes: 0 additions & 106 deletions docs/data/joy/customization/dark-mode/dark-mode-pt.md

This file was deleted.

106 changes: 0 additions & 106 deletions docs/data/joy/customization/dark-mode/dark-mode-zh.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/data/joy/customization/dark-mode/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ import { getInitColorSchemeScript } from '@mui/joy/styles';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Html data-color-scheme="light">
<Head>...</Head>
<body>
{getInitColorSchemeScript()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { getInitColorSchemeScript } from '@mui/joy/styles';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Html data-color-scheme="light">
<Head>...</Head>
<body>
{getInitColorSchemeScript()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ import { getInitColorSchemeScript } from '@mui/material/styles';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Html data-color-scheme="light">
<Head>...</Head>
<body>
{getInitColorSchemeScript()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ import { getInitColorSchemeScript } from '@mui/material/styles';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Html data-color-scheme="light">
<Head>...</Head>
<body>
{getInitColorSchemeScript()}
Expand Down
9 changes: 8 additions & 1 deletion docs/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class MyDocument extends Document {
const { canonicalAsServer, userLanguage } = this.props;

return (
<Html lang={userLanguage}>
<Html lang={userLanguage} data-mui-color-scheme="light" data-joy-color-scheme="light">
<Head>
{/*
manifest.json provides metadata used when your web app is added to the
Expand Down Expand Up @@ -146,6 +146,13 @@ export default class MyDocument extends Document {
'.mode-dark .only-dark-mode': {
display: 'block',
},
// TODO migrate to .only-dark-mode to .only-dark-mode-v2
'[data-mui-color-scheme="light"] .only-dark-mode-v2': {
display: 'none',
},
'[data-mui-color-scheme="dark"] .only-light-mode-v2': {
display: 'none',
},
'.plan-pro, .plan-premium': {
display: 'inline-block',
height: '1em',
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ function AboutContent() {
"Excellence. We're aiming high, and we know it.",
].map((text) => (
<Box key={text} sx={{ display: 'flex', alignItems: 'center', mt: 1 }}>
<IconImage name="yes" />
<IconImage name="pricing/yes" />
<Typography variant="body2" color="text.primary" fontWeight={600} sx={{ ml: 1.5 }}>
{text}
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/blog/first-look-at-joy.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ import { getInitColorSchemeScript } from '@mui/joy/styles';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Html data-color-scheme="light">
<Head>...</Head>
<body>
{getInitColorSchemeScript()}
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ function CareersContent() {
'Autonomy. We want to create a safe, high-trust team.',
].map((text) => (
<Box key={text} sx={{ display: 'flex', alignItems: 'center', mt: 1 }}>
<IconImage name="yes" />
<IconImage name="pricing/yes" />
<Typography variant="body2" color="text.primary" fontWeight={600} sx={{ ml: 1 }}>
{text}
</Typography>
Expand Down Expand Up @@ -381,7 +381,7 @@ function CareersContent() {
['Time off:', 'We provide 33 days of paid time off globally.'],
].map((textArray) => (
<Box key={textArray[0]} sx={{ display: 'flex', alignItems: 'center', mt: 1 }}>
<IconImage name="yes" />
<IconImage name="pricing/yes" />
<Typography variant="body2" color="text.primary" sx={{ ml: 1 }}>
<span style={{ fontWeight: 600 }}>{`${textArray[0]} `}</span>
{textArray[1]}
Expand Down
7 changes: 0 additions & 7 deletions docs/public/static/branding/companies/nasa-light.svg

This file was deleted.

11 changes: 0 additions & 11 deletions docs/public/static/branding/companies/netflix-light.svg

This file was deleted.

Loading

0 comments on commit 53b9656

Please sign in to comment.