Skip to content

Commit

Permalink
[website] Refine button design and other details (#41686)
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Mar 27, 2024
1 parent e803543 commit 6e36046
Show file tree
Hide file tree
Showing 22 changed files with 183 additions and 212 deletions.
86 changes: 45 additions & 41 deletions docs/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { styled, alpha } from '@mui/material/styles';
import Box from '@mui/material/Box';
import Divider from '@mui/material/Divider';
import Grid from '@mui/material/Grid';
import Grid from '@mui/material/Unstable_Grid2';
import Stack from '@mui/material/Stack';
import Paper from '@mui/material/Paper';
import Button from '@mui/material/Button';
Expand Down Expand Up @@ -339,12 +339,13 @@ function RemoteAwardCard() {
>
<Box
sx={{
aspectRatio: '1/1',
mb: 2,
maxWidth: { xs: 315, sm: 325 },
maxHeight: 315,
border: '1px solid',
borderColor: 'divider',
borderRadius: '6px',
overflow: 'clip',
mb: 2,
}}
>
<Box
Expand Down Expand Up @@ -405,9 +406,9 @@ export default function Careers() {
<OurValues />
<Divider />
{/* Perks & benefits */}
<Section bg="gradient">
<Section bg="gradient" cozy>
<Grid container spacing={5} alignItems="center">
<Grid item md={6}>
<Grid md={6}>
<SectionHeadline
overline="Working at MUI"
title={
Expand Down Expand Up @@ -447,40 +448,43 @@ export default function Careers() {
))}
</Box>
</Grid>
<Grid item xs={12} md={6}>
<Grid container spacing={2}>
<Grid item xs={12} md={8}>
<RemoteAwardCard />
</Grid>
<Grid item xs={12} md={4}>
<Stack spacing={2} useFlexGap sx={{ height: '100%', width: '100%' }}>
{companyInfo.map(({ title, description, routeUrl }) => (
<Paper
component={Link}
href={routeUrl}
noLinkStyle
variant="outlined"
sx={{ p: 2, width: '100%', flexGrow: 1 }}
key={title}
>
<Typography variant="body2" fontWeight="bold" sx={{ mb: 0.5 }}>
{title}
</Typography>
<Typography variant="body2" color="text.secondary" sx={{ mb: 1 }}>
{description}
</Typography>
<Typography variant="body2" fontWeight="bold" color="primary">
Learn more{' '}
<KeyboardArrowRightRounded
fontSize="small"
sx={{ verticalAlign: 'middle' }}
/>
</Typography>
</Paper>
))}
</Stack>
</Grid>
</Grid>
<Grid
xs={12}
md={6}
sx={{
p: { xs: 2, sm: 0 },
display: 'flex',
flexDirection: { xs: 'column', sm: 'row' },
gap: 2,
}}
>
<RemoteAwardCard />
<Stack spacing={2} useFlexGap>
{companyInfo.map(({ title, description, routeUrl }) => (
<Paper
key={title}
component={Link}
href={routeUrl}
noLinkStyle
variant="outlined"
sx={{ p: 2, width: '100%', flexGrow: 1 }}
>
<Typography variant="body2" fontWeight="bold" sx={{ mb: 0.5 }}>
{title}
</Typography>
<Typography variant="body2" color="text.secondary" sx={{ mb: 1 }}>
{description}
</Typography>
<Typography variant="body2" fontWeight="bold" color="primary">
Learn more{' '}
<KeyboardArrowRightRounded
fontSize="small"
sx={{ verticalAlign: 'middle' }}
/>
</Typography>
</Paper>
))}
</Stack>
</Grid>
</Grid>
</Section>
Expand Down Expand Up @@ -584,11 +588,11 @@ export default function Careers() {
Frequently asked questions
</Typography>
<Grid container spacing={2}>
<Grid item xs={12} md={6}>
<Grid xs={12} md={6}>
{renderFAQItem(0, true)}
{renderFAQItem(1)}
</Grid>
<Grid item xs={12} md={6}>
<Grid xs={12} md={6}>
{renderFAQItem(2)}
<Paper
variant="outlined"
Expand Down
16 changes: 12 additions & 4 deletions docs/pages/experiments/website/branding-theme-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import * as React from 'react';
import Stack from '@mui/material/Stack';
import Chip from '@mui/material/Chip';
import Button from '@mui/material/Button';
import IconButton from '@mui/material/IconButton';
import Divider from '@mui/material/Divider';
import Head from 'docs/src/modules/components/Head';
import BrandingCssVarsProvider from 'docs/src/BrandingCssVarsProvider';
import AppHeader from 'docs/src/layouts/AppHeader';
import Section from 'docs/src/layouts/Section';
import AppFooter from 'docs/src/layouts/AppFooter';
import GitHubIcon from '@mui/icons-material/GitHub';

export default function BrandingThemeTest() {
return (
Expand All @@ -30,20 +32,26 @@ export default function BrandingThemeTest() {
</Stack>
<Stack direction="row" spacing={2} useFlexGap sx={{ width: 'fit-content', mt: 8 }}>
<Button variant="contained" size="small" color="primary">
This button
Contained primary
</Button>
<Button variant="contained" size="small" color="secondary">
This button
Contained secondary
</Button>
<Button variant="outlined" size="small" color="primary">
This button
Outlined primary
</Button>
<Button variant="outlined" size="small" color="secondary">
This button
Outlined secondary
</Button>
<Button variant="text" size="small" color="info">
This button
</Button>
<IconButton color="primary">
<GitHubIcon fontSize="small" />
</IconButton>
<IconButton color="info">
<GitHubIcon fontSize="small" />
</IconButton>
</Stack>
</Section>
<Divider />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/components/about/AboutEnd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function AboutEnd() {
alt="A map illustration with pins loosely positioned where team members from MUI are located."
loading="lazy"
sx={(theme) => ({
mt: -8,
mt: -20,
display: { xs: 'none', sm: 'block' },
width: '100%',
aspectRatio: '231/145',
Expand Down
8 changes: 4 additions & 4 deletions docs/src/components/about/HowToSupport.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Grid from '@mui/material/Grid';
import Grid from '@mui/material/Unstable_Grid2';
import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
Expand Down Expand Up @@ -72,7 +72,7 @@ export default function HowToSupport() {
description=""
/>
<Grid container spacing={3}>
<Grid item xs={12} sm={6} md={4}>
<Grid xs={12} sm={6} md={4}>
<Widget
icon={<ForumRoundedIcon fontSize="small" color="primary" />}
title="Give feedback"
Expand All @@ -96,7 +96,7 @@ export default function HowToSupport() {
</Button>
</Widget>
</Grid>
<Grid item xs={12} sm={6} md={4}>
<Grid xs={12} sm={6} md={4}>
<Widget
icon={<PeopleRoundedIcon fontSize="small" color="primary" />}
title="Join the community"
Expand Down Expand Up @@ -157,7 +157,7 @@ export default function HowToSupport() {
</Button>
</Widget>
</Grid>
<Grid item xs={12} sm={6} md={4}>
<Grid xs={12} sm={6} md={4}>
<Widget
icon={<LocalAtmRoundedIcon fontSize="small" color="primary" />}
title="Support us financially"
Expand Down
8 changes: 4 additions & 4 deletions docs/src/components/about/OurValues.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Grid from '@mui/material/Grid';
import Grid from '@mui/material/Unstable_Grid2';
import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
Expand Down Expand Up @@ -70,7 +70,7 @@ export default function OurValues() {
</Button>
<Grid container spacing={3} sx={{ mt: { xs: 1, sm: 2 } }}>
{values.map(({ title, description, darkIcon, lightIcon, height, width }) => (
<Grid key={title} item xs={12} md={3}>
<Grid key={title} xs={12} md={3}>
<Paper
variant="outlined"
sx={(theme) => ({
Expand All @@ -90,14 +90,14 @@ export default function OurValues() {
>
<Box sx={{ height: 94 }}>
<Box
width={width}
height={height}
sx={(theme) => ({
background: `${lightIcon}`,
...theme.applyDarkStyles({
background: `${darkIcon}`,
}),
})}
width={width}
height={height}
/>
</Box>
<Box sx={{ flexGrow: 1 }}>
Expand Down
8 changes: 4 additions & 4 deletions docs/src/components/about/Team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Button from '@mui/material/Button';
import Container from '@mui/material/Container';
import Divider from '@mui/material/Divider';
import IconButton from '@mui/material/IconButton';
import Grid from '@mui/material/Grid';
import Grid from '@mui/material/Unstable_Grid2';
import Paper, { PaperProps } from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import Tooltip from '@mui/material/Tooltip';
Expand Down Expand Up @@ -369,7 +369,7 @@ export default function Team() {
...profileJson,
};
return (
<Grid key={profile.name} item xs={12} sm={6} md={3}>
<Grid key={profile.name} xs={12} sm={6} md={3}>
<Person {...profile} />
</Grid>
);
Expand All @@ -389,7 +389,7 @@ export default function Team() {
</Typography>
<Grid container spacing={2} mt={2}>
{contributors.map((profile) => (
<Grid key={profile.name} item xs={12} sm={6} md={3}>
<Grid key={profile.name} xs={12} sm={6} md={3}>
<Person {...profile} sx={{ bgcolor: 'primaryDark.600' }} />
</Grid>
))}
Expand All @@ -404,7 +404,7 @@ export default function Team() {
</Typography>
<Grid container spacing={2} mt={2}>
{emeriti.map((profile) => (
<Grid key={profile.name} item xs={12} sm={6} md={3}>
<Grid key={profile.name} xs={12} sm={6} md={3}>
<Person {...profile} sx={{ bgcolor: 'primaryDark.600' }} />
</Grid>
))}
Expand Down
11 changes: 5 additions & 6 deletions docs/src/components/banner/AppFrameBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export default function AppFrameBanner() {
fontWeight: 'medium',
textWrap: 'nowrap',
maxHeight: '34px',
backgroundColor: (theme.vars || theme).palette.primary[50],
backgroundColor: alpha(theme.palette.primary[50], 0.8),
border: '1px solid',
borderColor: (theme.vars || theme).palette.grey[200],
borderColor: (theme.vars || theme).palette.divider,
borderRadius: 1,
transition: 'all 150ms ease',
'&:hover, &:focus-visible': {
Expand All @@ -47,11 +47,10 @@ export default function AppFrameBanner() {
}),
(theme) =>
theme.applyDarkStyles({
backgroundColor: alpha(theme.palette.primary[900], 0.2),
borderColor: (theme.vars || theme).palette.primaryDark[700],
backgroundColor: alpha(theme.palette.primary[900], 0.15),
'&:hover, &:focus-visible': {
backgroundColor: alpha(theme.palette.primary[900], 0.6),
borderColor: (theme.vars || theme).palette.primary[800],
backgroundColor: alpha(theme.palette.primary[900], 0.4),
borderColor: (theme.vars || theme).palette.primary[900],
},
}),
]}
Expand Down
10 changes: 5 additions & 5 deletions docs/src/components/home/DiamondSponsors.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useInView } from 'react-intersection-observer';
import Grid from '@mui/material/Grid';
import Grid from '@mui/material/Unstable_Grid2';
import Paper from '@mui/material/Paper';
import IconButton from '@mui/material/IconButton';
import Typography from '@mui/material/Typography';
Expand Down Expand Up @@ -46,8 +46,8 @@ export default function DiamondSponsors() {
sx={(theme) => ({
mt: 4,
mb: 1.5,
background: `linear-gradient(90deg, ${(theme.vars || theme).palette.primary[400]} 50%, ${
(theme.vars || theme).palette.primary[700]
background: `linear-gradient(45deg, ${(theme.vars || theme).palette.primary[400]} 50%, ${
(theme.vars || theme).palette.primary[800]
} 100%)`,
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
Expand All @@ -57,12 +57,12 @@ export default function DiamondSponsors() {
</Typography>
<Grid container spacing={{ xs: 2, md: 3 }}>
{DIAMONDs.map((item) => (
<Grid item key={item.name} xs={12} sm={6} md={4}>
<Grid key={item.name} xs={12} sm={6} md={4}>
<SponsorCard logoSize={64} inView={inView} item={item} />
</Grid>
))}
{spotIsAvailable && (
<Grid item xs={12} sm={6} md={4}>
<Grid xs={12} sm={6} md={4}>
<Paper
variant="outlined"
sx={{
Expand Down
17 changes: 5 additions & 12 deletions docs/src/components/home/GoldSponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Paper from '@mui/material/Paper';
import IconButton from '@mui/material/IconButton';
import Typography from '@mui/material/Typography';
import AddRounded from '@mui/icons-material/AddRounded';
import Grid from '@mui/material/Grid';
import Grid from '@mui/material/Unstable_Grid2';
import SponsorCard from 'docs/src/components/home/SponsorCard';
import { Link } from '@mui/docs/Link';
import ROUTES from 'docs/src/route';
Expand Down Expand Up @@ -98,18 +98,19 @@ export default function GoldSponsors() {
</Typography>
<Grid container spacing={{ xs: 2, md: 3 }}>
{GOLDs.map((item) => (
<Grid item key={item.name} xs={12} sm={6} md={4} lg={3}>
<Grid key={item.name} xs={12} sm={6} md={4} lg={3}>
<SponsorCard inView={inView} item={item} />
</Grid>
))}
<Grid item xs={12} sm={6} md={4} lg={3}>
<Grid xs={12} sm={6} md={4} lg={3}>
<Paper
variant="outlined"
sx={{
p: 2,
height: '100%',
display: 'flex',
alignItems: 'center',
height: '100%',
gap: 2,
borderStyle: 'dashed',
}}
>
Expand All @@ -120,14 +121,6 @@ export default function GoldSponsors() {
target="_blank"
rel="noopener"
color="primary"
sx={(theme) => ({
mr: 2,
border: '1px solid',
borderColor: 'grey.300',
...theme.applyDarkStyles({
borderColor: 'primaryDark.600',
}),
})}
>
<AddRounded />
</IconButton>
Expand Down
Loading

0 comments on commit 6e36046

Please sign in to comment.