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

[website] Improve homepage rebranding #27663

Merged
merged 109 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
2e410e2
fix relative imports
siriwatknp Aug 9, 2021
1c9e1f6
remove scaling
siriwatknp Aug 9, 2021
6c1748f
fix references mobile columns
siriwatknp Aug 9, 2021
431c7e8
update ThemeToggle to new design
siriwatknp Aug 9, 2021
d7c088d
fix semantic issue
siriwatknp Aug 9, 2021
906648b
add meta tag
siriwatknp Aug 9, 2021
50032cd
fix heading descending order
siriwatknp Aug 9, 2021
2ed9431
wrap code demo with NoSsr to reduce DOM size
siriwatknp Aug 9, 2021
f3e331d
fix a11y issues
siriwatknp Aug 9, 2021
32e1e41
Add more sponsors and adjust img sizes
siriwatknp Aug 10, 2021
b62e48c
fix imports
siriwatknp Aug 10, 2021
ed82e20
fix lowercase and increase maxwidth
siriwatknp Aug 10, 2021
42246f3
add hidden store template images to load before hand
siriwatknp Aug 10, 2021
40717e3
load DesignKitBg before hand
siriwatknp Aug 10, 2021
c3c8d4d
change maxHeight to prevent layout shift
siriwatknp Aug 10, 2021
27de448
remove hardcoded year at Footer
siriwatknp Aug 10, 2021
bec25ef
add social links to Footer
siriwatknp Aug 10, 2021
5f5dbd0
switch to MUI send in blue
siriwatknp Aug 10, 2021
bd10fa8
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 11, 2021
deef192
add store routes
siriwatknp Aug 11, 2021
dcd604a
rework design kits section
siriwatknp Aug 11, 2021
7a45e73
add links to store for template section
siriwatknp Aug 11, 2021
0bbfe91
fix themed components
siriwatknp Aug 11, 2021
f7b9108
add new themed components
siriwatknp Aug 11, 2021
2310e39
refactor hero section
siriwatknp Aug 11, 2021
de61baf
add focus styles
siriwatknp Aug 11, 2021
167fad7
complete advanced showcase
siriwatknp Aug 12, 2021
924ebab
refactor images
siriwatknp Aug 12, 2021
3c531d0
rename compoents
siriwatknp Aug 12, 2021
0229769
fix references section
siriwatknp Aug 12, 2021
bd20641
adjust color
siriwatknp Aug 12, 2021
b4460d1
minor fixes
siriwatknp Aug 12, 2021
9fd022f
fix a11y
siriwatknp Aug 12, 2021
7cf0e13
fix a11y issues
siriwatknp Aug 12, 2021
6972016
add main section
siriwatknp Aug 12, 2021
600ada5
fix semantic and font
siriwatknp Aug 12, 2021
46f4dd0
add designkits branding prefetch
siriwatknp Aug 12, 2021
c04e34c
remove tabs to reduce motion
siriwatknp Aug 12, 2021
40a09ad
fix aria-label
siriwatknp Aug 12, 2021
3300fa3
fix wording
siriwatknp Aug 12, 2021
14fcff9
prevent focus on Hero components
siriwatknp Aug 12, 2021
164e61d
typo, missing space
oliviertassinari Aug 12, 2021
ac918e4
some overall design adjustments
danilo-leal Aug 12, 2021
66c3a67
success alert styling
danilo-leal Aug 12, 2021
94762bf
wording
danilo-leal Aug 12, 2021
0e1e703
Material-UI -> MUI
danilo-leal Aug 12, 2021
b8fbbe3
sponsors spacing tweak
danilo-leal Aug 12, 2021
e59073a
small adjustments
danilo-leal Aug 12, 2021
d79d749
more small tweaks and copywriting corrections
danilo-leal Aug 12, 2021
ab3006e
sponsors grid refinement
danilo-leal Aug 12, 2021
b0a6f90
minor fixes
siriwatknp Aug 13, 2021
5be2575
remove static images
siriwatknp Aug 13, 2021
b62e5c4
Merge branch 'rebranding/homepage2' of github.com:siriwatknp/material…
siriwatknp Aug 13, 2021
2934d70
fix margin and spacing
siriwatknp Aug 13, 2021
f12c03f
test new ux on the core showcase
siriwatknp Aug 13, 2021
12e85a5
fix layout
siriwatknp Aug 13, 2021
0669545
add transition
siriwatknp Aug 13, 2021
28f421c
support dark on core showcase
siriwatknp Aug 13, 2021
5bad676
run prettier and docs:formatted
siriwatknp Aug 13, 2021
37d79ab
move tooltip to local styling
siriwatknp Aug 13, 2021
2282a98
remove unused code
siriwatknp Aug 13, 2021
1a7f8fd
Update docs/src/components/home/Sponsors.tsx
siriwatknp Aug 14, 2021
052c524
Merge branch 'rebranding/homepage2' of github.com:siriwatknp/material…
siriwatknp Aug 14, 2021
86a871a
Merge branch 'next' of https://github.com/mui-org/material-ui into re…
siriwatknp Aug 14, 2021
33d604b
use xGrid in advanced showcase
siriwatknp Aug 14, 2021
68a3d65
skip tab in hero
siriwatknp Aug 14, 2021
cdf3dfb
minor adjustments
siriwatknp Aug 14, 2021
eed2696
fix types
siriwatknp Aug 14, 2021
3057944
fix switch thumb styles
siriwatknp Aug 14, 2021
38bc73c
add @media (prefers-reduced-motion)
oliviertassinari Aug 14, 2021
55d653c
capitalization convention
oliviertassinari Aug 14, 2021
11c27ee
use the full legal name
oliviertassinari Aug 14, 2021
92eef1b
We will have a third repository for the low-code effort
oliviertassinari Aug 14, 2021
6ab9e8c
add h3 section
oliviertassinari Aug 14, 2021
f06c93d
no jargon
oliviertassinari Aug 14, 2021
caf13be
English format
oliviertassinari Aug 14, 2021
07d0724
fix icons on ValueProposition
siriwatknp Aug 15, 2021
545009c
fix icons in WhatToExpect
siriwatknp Aug 15, 2021
d0174a6
fix icons on about
siriwatknp Aug 15, 2021
1458d93
fix icon color
siriwatknp Aug 15, 2021
1fad0fc
Merge branch 'rebranding/homepage2' of github.com:siriwatknp/material…
siriwatknp Aug 15, 2021
99ee152
add custom theme suggestion
siriwatknp Aug 15, 2021
7d160c5
design details
danilo-leal Aug 16, 2021
ff49213
tweaks on the hamburguer menu and other minor stuff
danilo-leal Aug 16, 2021
9e6a090
Merge branch 'next' into rebranding/homepage2
siriwatknp Aug 17, 2021
adccc60
fix colors
siriwatknp Aug 17, 2021
adca51b
cleanup outdated core showcase
siriwatknp Aug 17, 2021
d68fee9
run docs formatted
siriwatknp Aug 17, 2021
27a2fe7
fix stat number
siriwatknp Aug 17, 2021
c2d207a
Merge branch 'next' into rebranding/homepage2
siriwatknp Aug 17, 2021
ac06d82
Merge branch 'next' into rebranding/homepage2
siriwatknp Aug 17, 2021
2319f09
fix merge regression
siriwatknp Aug 17, 2021
4dfd675
fix typo
siriwatknp Aug 17, 2021
c60d682
remove unused code
siriwatknp Aug 17, 2021
7e76995
minor fixes
siriwatknp Aug 17, 2021
4a7abe7
fix switch demo bgcolor
siriwatknp Aug 17, 2021
60654e2
changing company logos to use their proper color
danilo-leal Aug 17, 2021
609664f
minor adjustments on CoreShocase
danilo-leal Aug 17, 2021
d86c922
remove end period in heading titles
danilo-leal Aug 17, 2021
8b642f6
svgs compression
danilo-leal Aug 17, 2021
ba5ff5b
remove x-grid
siriwatknp Aug 18, 2021
fa5bfe0
run prettier
siriwatknp Aug 18, 2021
9064d77
replace useRef with useCallback
siriwatknp Aug 18, 2021
7abb8a0
move demos to rebranding scope
siriwatknp Aug 18, 2021
f2d913e
fix documentation route
siriwatknp Aug 18, 2021
119851e
run prettier
siriwatknp Aug 18, 2021
2ad34fd
remove rebranding cards from demo
siriwatknp Aug 18, 2021
1f6ddd8
remove theme date picker
siriwatknp Aug 18, 2021
d9b090d
remove themeing section
siriwatknp Aug 18, 2021
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
7 changes: 7 additions & 0 deletions docs/pages/branding/home.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import Head from 'docs/src/modules/components/Head';
import ThemeProvider from 'docs/src/modules/ThemeContext';
import CssBaseline from '@material-ui/core/CssBaseline';
import Divider from '@material-ui/core/Divider';
Expand All @@ -17,6 +18,12 @@ export default function Home() {
return (
<ThemeProvider>
<CssBaseline />
<Head
title="Home - Material-UI"
siriwatknp marked this conversation as resolved.
Show resolved Hide resolved
description="The ultimate solution for your UI. MUI provides a robust, customizible and accessible library of foundational and
siriwatknp marked this conversation as resolved.
Show resolved Hide resolved
advanced components, enabling you to build your own design system and develop React
applications faster."
/>
<AppHeader />
<Hero />
<ReferencesCore />
Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/header/HeaderNavDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const Anchor = styled('a')<{ component?: React.ElementType }>(({ theme }) => ({
...theme.typography.body2,
fontWeight: 700,
textDecoration: 'none',
border: 'none',
width: '100%',
backgroundColor: 'transparent',
color: theme.palette.mode === 'dark' ? '#fff' : theme.palette.text.secondary,
cursor: 'pointer',
display: 'flex',
Expand Down Expand Up @@ -119,7 +122,7 @@ export default function HeaderNavDropdown() {
<UList>
<li>
<Anchor
component="button"
as="button"
onClick={() => setProductsOpen((bool) => !bool)}
sx={{ justifyContent: 'space-between' }}
>
Expand Down
101 changes: 16 additions & 85 deletions docs/src/components/header/ThemeModeToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,94 +1,25 @@
import * as React from 'react';
import { styled, alpha } from '@material-ui/core/styles';
import SwitchUnstyled, {
switchUnstyledClasses,
SwitchUnstyledProps,
} from '@material-ui/unstyled/SwitchUnstyled';
import IconButton from '@material-ui/core/IconButton';
import DarkModeOutlined from '@material-ui/icons/DarkModeOutlined';
import LightModeOutlined from '@material-ui/icons/LightModeOutlined';

const Root = styled('span')(({ theme }) => ({
fontSize: 0,
color: '#fff',
position: 'relative',
display: 'inline-block',
width: 40,
height: 17,
backgroundColor: theme.palette.grey[100],
borderRadius: 10,
margin: 10,
cursor: 'pointer',
transition: theme.transitions.create('background-color'),
[`& .${switchUnstyledClasses.thumb}`]: {
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
padding: 2,
width: 24,
height: 24,
top: -3,
left: 0,
borderRadius: 24,
backgroundColor: theme.palette.primary.main,
transform: 'rotate(-90deg)',
transition: theme.transitions.create(['transform', 'left']),
'& > svg': {
width: 18,
height: 18,
},
'&:before': {
content: '""',
display: 'block',
position: 'absolute',
borderRadius: '50%',
zIndex: -1,
top: 0,
left: 0,
right: 0,
bottom: 0,
transform: 'scale(0)',
transition: theme.transitions.create('transform'),
backgroundColor: alpha(theme.palette.primary.main, 0.4),
},
},
[`&.${switchUnstyledClasses.checked} .${switchUnstyledClasses.thumb}`]: {
left: 16,
transform: 'rotate(0deg)',
},
[`&.${switchUnstyledClasses.focusVisible} .${switchUnstyledClasses.thumb}`]: {
'&:before': {
transform: 'scale(1.3)',
},
},
[`& .${switchUnstyledClasses.input}`]: {
cursor: 'inherit',
position: 'absolute',
width: '100%',
height: '100%',
top: 0,
left: 0,
opacity: 0,
zIndex: 1,
margin: 0,
},
[`&.${switchUnstyledClasses.checked}`]: {
background: theme.palette.primary[200],
},
}));

const ThemeModeToggle = (props: SwitchUnstyledProps) => {
const ThemeModeToggle = (props: { checked: boolean; onChange: (checked: boolean) => void }) => {
return (
<SwitchUnstyled
{...props}
components={{ Root }}
componentsProps={{
thumb: {
children: props.checked ? <LightModeOutlined /> : <DarkModeOutlined />,
},
input: { 'aria-label': 'Theme mode toggle' },
<IconButton
disableTouchRipple
aria-label={`Switch to ${props.checked ? 'light' : 'dark'} mode`}
onClick={() => props.onChange(!props.checked)}
sx={{
color: (theme) => (theme.palette.mode === 'dark' ? '#fff' : 'primary.main'),
borderRadius: 1,
p: 0.5,
border: '1px solid',
bgcolor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.700' : 'transparent'),
borderColor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.500' : 'grey.200'),
}}
/>
>
{props.checked ? <LightModeOutlined /> : <DarkModeOutlined />}
</IconButton>
);
};

Expand Down
11 changes: 9 additions & 2 deletions docs/src/components/home/CompaniesGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import * as React from 'react';
import { styled } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';

const Img = styled('img')({
maxWidth: '100%',
height: 'auto',
});

export const CORE_COMPANIES = [
{
src: '/static/branding/companies/coursera.svg',
Expand Down Expand Up @@ -47,15 +53,16 @@ export default function CompaniesGrid({ data }: { data: Array<JSX.IntrinsicEleme
<Grid
key={imgProps.src}
item
xs={4}
xs={6}
sm={4}
md={2}
sx={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<img alt={imgProps.alt} loading="lazy" {...imgProps} />
<Img alt={imgProps.alt} loading="lazy" {...imgProps} />
</Grid>
))}
</Grid>
Expand Down
11 changes: 8 additions & 3 deletions docs/src/components/home/CoreShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ import ReplayRounded from '@material-ui/icons/ReplayRounded';
import HighlightedCode from 'docs/src/modules/components/HighlightedCode';
import { getDesignTokens, getThemedComponents } from 'docs/src/modules/brandingTheme';
import MarkdownElement from 'docs/src/components/markdown/MarkdownElement';
import MaterialDesignDemo, { demoCode as materialDemoCode } from './MaterialDesignDemo';
import ShowcaseContainer from './ShowcaseContainer';
import { getMaterialThemeFrames, produceThemeOptions } from './showcaseUtils';
import MaterialDesignDemo, {
demoCode as materialDemoCode,
} from 'docs/src/components/home/MaterialDesignDemo';
import ShowcaseContainer from 'docs/src/components/home/ShowcaseContainer';
import {
getMaterialThemeFrames,
produceThemeOptions,
} from 'docs/src/components/home/showcaseUtils';

const defaultTheme = createTheme();
const darkDesignTokens = getDesignTokens('dark');
Expand Down
9 changes: 1 addition & 8 deletions docs/src/components/home/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ const grid = [
height: 119,
},
{
ui: (
<Box sx={{ transform: { xs: 'scale(1.11)', lg: 'scale(1)' } }}>
<ThemeTabs />
</Box>
),
ui: <ThemeTabs />,
width: 310,
height: 50,
},
Expand Down Expand Up @@ -171,9 +167,6 @@ export default function Hero() {
'sans-serif',
].join(','),
},
transform: { xs: 'scale(0.9)', xl: 'scale(1)' },
transformOrigin: 'top left',
transition: 'transform 0.3s',
}}
>
{grid.map((config, index) => (
Expand Down
3 changes: 2 additions & 1 deletion docs/src/components/home/MaterialDesignDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function MaterialDesignDemo() {
Michael Scott
</Typography>
</Box>
<IconButton size="small" sx={{ alignSelf: 'flex-start' }}>
<IconButton aria-label="Edit" size="small" sx={{ alignSelf: 'flex-start' }}>
<Edit fontSize="small" />
</IconButton>
</Box>
Expand All @@ -135,6 +135,7 @@ export default function MaterialDesignDemo() {
{active ? 'Active' : 'Inactive'} account
</Typography>
<Switch
aria-label={active ? 'disable account' : 'activate account'}
checked={active}
onChange={(event) => setActive(event.target.checked)}
sx={{ ml: 'auto' }}
Expand Down
3 changes: 2 additions & 1 deletion docs/src/components/home/ShowcaseContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import Box from '@material-ui/core/Box';
import NoSsr from '@material-ui/core/NoSsr';
import Paper from '@material-ui/core/Paper';

export default function ShowcaseContainer({
Expand Down Expand Up @@ -58,7 +59,7 @@ export default function ShowcaseContainer({
borderBottomRightRadius: 10,
}}
>
{code}
<NoSsr>{code}</NoSsr>
</Box>
</Box>
);
Expand Down
5 changes: 3 additions & 2 deletions docs/src/components/home/Sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const Sponsors = () => {
noLinkStyle
href={item.href}
target="_blank"
rel="sponsored"
rel="sponsored noopener"
variant="outlined"
sx={{ height: '100%', display: 'flex', flexDirection: 'column' }}
>
Expand Down Expand Up @@ -157,6 +157,7 @@ const Sponsors = () => {
}}
>
<IconButton
aria-label="Become MUI sponsor"
component="a"
href="mailto:diamond@material-ui.com"
target="_blank"
Expand Down Expand Up @@ -192,7 +193,7 @@ const Sponsors = () => {
noLinkStyle
href={item.href}
target="_blank"
rel="sponsored"
rel="sponsored noopener"
variant="outlined"
sx={{ height: '100%', display: 'flex', flexDirection: 'column' }}
>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/home/Testimonials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const UserFeedback = ({
}) => {
return (
<div>
<Typography variant="subtitle1" color="#fff" sx={{ mb: 2 }}>
<Typography component="p" variant="subtitle1" color="#fff" sx={{ mb: 2 }}>
{quote}
</Typography>
<Box sx={{ display: 'flex' }}>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/layouts/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export default function AppHeader() {
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
const preferredMode = prefersDarkMode ? 'dark' : 'light';

const handleChangeThemeMode = (event: React.ChangeEvent<HTMLInputElement>) => {
const handleChangeThemeMode = (checked: boolean) => {
let paletteMode = 'system';
paletteMode = event.target.checked ? 'dark' : 'light';
paletteMode = checked ? 'dark' : 'light';
if (paletteMode === null) {
return;
}
Expand Down