-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[docs-infra] Add spacing and contrast improvements #41191
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
Changes from 7 commits
b2c45f9
28b4299
f0242c0
dfab403
bbcb60b
a20687b
d4da63c
fda8f94
bbb5df4
f4c8b9c
111c870
62e0c65
186537f
062881a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,9 @@ import * as React from 'react'; | |
| import { styled, alpha } from '@mui/material/styles'; | ||
| import Box from '@mui/material/Box'; | ||
| import Stack from '@mui/material/Stack'; | ||
| import Button from '@mui/material/Button'; | ||
| import Typography from '@mui/material/Typography'; | ||
| import DiamondOutlinedIcon from '@mui/icons-material/DiamondOutlined'; | ||
| import { useTranslate } from 'docs/src/modules/utils/i18n'; | ||
| import Link from 'docs/src/modules/components/Link'; | ||
| import { useTranslate } from 'docs/src/modules/utils/i18n'; | ||
|
|
||
| const NativeLink = styled('a')(({ theme }) => ({ | ||
| boxSizing: 'border-box', // TODO have CssBaseline in the Next.js layout | ||
|
|
@@ -26,6 +24,10 @@ const NativeLink = styled('a')(({ theme }) => ({ | |
| '&:hover': { | ||
| backgroundColor: (theme.vars || theme).palette.grey[50], | ||
| }, | ||
| '&:focus-visible': { | ||
| outline: `3px solid ${alpha((theme.vars || theme).palette.primary[500], 0.5)}`, | ||
| outlineOffset: '2px', | ||
| }, | ||
| '& img': { | ||
| display: 'inline-block', | ||
| }, | ||
|
|
@@ -44,147 +46,116 @@ export default function DiamondSponsors() { | |
| const t = useTranslate(); | ||
|
|
||
| return ( | ||
| <Stack | ||
| spacing={0.5} | ||
| direction="column" | ||
| sx={{ | ||
| mt: 1.5, | ||
| pt: 1.5, | ||
| borderTop: '1px solid', | ||
| borderColor: 'divider', | ||
| }} | ||
| > | ||
| <Button | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I felt like having both the "Become a Diamond Sponsor" and "Diamond Sponsor" buttons was redundant, particularly as they were taking to, essentially, the same place. I experimented with adding a "Sponsors" nav label, sort of similar to the "Contents" on the top of the TOC, but felt like visitors would be able to understand what these logos are even without a label? |
||
| component="a" | ||
| href="/material-ui/discover-more/backers/" | ||
| <Stack direction="column" mt={2} spacing={1} useFlexGap> | ||
| <NativeLink | ||
| data-ga-event-category="sponsor" | ||
| data-ga-event-action="docs-premium" | ||
| data-ga-event-label="octopus.com" | ||
| href="https://octopus.com/?utm_source=materialui&utm_medium=referral" | ||
| rel="noopener sponsored" | ||
| target="_blank" | ||
| > | ||
| <Box | ||
| component="img" | ||
| height="25px" | ||
| width="116px" | ||
| src="/static/sponsors/octopus-light.svg" | ||
| alt="octopus" | ||
| title="Repeatable, reliable deployments" | ||
| loading="lazy" | ||
| sx={(theme) => | ||
| theme.applyDarkStyles({ | ||
| content: `url(/static/sponsors/octopus-dark.svg)`, | ||
| }) | ||
| } | ||
| /> | ||
| </NativeLink> | ||
| <NativeLink | ||
| data-ga-event-category="sponsor" | ||
| data-ga-event-action="docs-premium" | ||
| data-ga-event-label="doit.com" | ||
| href="https://www.doit.com/flexsave/?utm_source=materialui&utm_medium=referral" | ||
| rel="noopener sponsored" | ||
| target="_blank" | ||
| > | ||
| <Box | ||
| component="img" | ||
| height="29px" | ||
| width="70px" | ||
| src="/static/sponsors/doit-light.svg" | ||
| alt="doit" | ||
| title="Management Platform for Google Cloud and AWS" | ||
| loading="lazy" | ||
| sx={(theme) => | ||
| theme.applyDarkStyles({ | ||
| content: `url(/static/sponsors/doit-dark.svg)`, | ||
| }) | ||
| } | ||
| /> | ||
| </NativeLink> | ||
| <NativeLink | ||
| data-ga-event-category="sponsor" | ||
| data-ga-event-action="docs-premium" | ||
| data-ga-event-label="marblism.com" | ||
| href="https://www.marblism.com/?utm_source=mui" | ||
| rel="noopener sponsored" | ||
| target="_blank" | ||
| rel="noopener nofollow" | ||
| size="small" | ||
| startIcon={<DiamondOutlinedIcon />} | ||
| sx={{ | ||
| width: 'fit-content', | ||
| fontSize: (theme) => theme.typography.pxToRem(12.5), | ||
| '& svg': { | ||
| marginRight: 0.5, | ||
| width: 16, | ||
| height: 16, | ||
| }, | ||
| }} | ||
| > | ||
| {t('diamondSponsors')} | ||
| </Button> | ||
| <Stack spacing={1}> | ||
| <NativeLink | ||
| data-ga-event-category="sponsor" | ||
| data-ga-event-action="docs-premium" | ||
| data-ga-event-label="octopus.com" | ||
| href="https://octopus.com/?utm_source=materialui&utm_medium=referral" | ||
| rel="noopener sponsored" | ||
| target="_blank" | ||
| > | ||
| <Box | ||
| component="img" | ||
| height="25px" | ||
| width="116px" | ||
| src="/static/sponsors/octopus-light.svg" | ||
| alt="octopus" | ||
| title="Repeatable, reliable deployments" | ||
| loading="lazy" | ||
| sx={(theme) => | ||
| theme.applyDarkStyles({ | ||
| content: `url(/static/sponsors/octopus-dark.svg)`, | ||
| }) | ||
| } | ||
| /> | ||
| </NativeLink> | ||
| <NativeLink | ||
| data-ga-event-category="sponsor" | ||
| data-ga-event-action="docs-premium" | ||
| data-ga-event-label="doit.com" | ||
| href="https://www.doit.com/flexsave/?utm_source=materialui&utm_medium=referral" | ||
| rel="noopener sponsored" | ||
| target="_blank" | ||
| > | ||
| <Box | ||
| component="img" | ||
| height="29px" | ||
| width="70px" | ||
| src="/static/sponsors/doit-light.svg" | ||
| alt="doit" | ||
| title="Management Platform for Google Cloud and AWS" | ||
| loading="lazy" | ||
| sx={(theme) => | ||
| theme.applyDarkStyles({ | ||
| content: `url(/static/sponsors/doit-dark.svg)`, | ||
| }) | ||
| } | ||
| /> | ||
| </NativeLink> | ||
| <NativeLink | ||
| data-ga-event-category="sponsor" | ||
| data-ga-event-action="docs-premium" | ||
| data-ga-event-label="marblism.com" | ||
| href="https://www.marblism.com/?utm_source=mui" | ||
| rel="noopener sponsored" | ||
| target="_blank" | ||
| > | ||
| <Box | ||
| component="img" | ||
| height="27px" | ||
| width="90px" | ||
| src="/static/sponsors/marblism-light.svg" | ||
| alt="marblism" | ||
| title="AI web app generation" | ||
| loading="lazy" | ||
| sx={(theme) => | ||
| theme.applyDarkStyles({ | ||
| content: `url(/static/sponsors/marblism-dark.svg)`, | ||
| }) | ||
| } | ||
| /> | ||
| </NativeLink> | ||
| <Link | ||
| href="/material-ui/discover-more/backers/#diamond-sponsors" | ||
| sx={(theme) => ({ | ||
| width: '100%', | ||
| p: 1, | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| borderRadius: 1, | ||
| border: '1px dashed', | ||
| transition: theme.transitions.create(['color', 'border-color', 'background-color']), | ||
| backgroundColor: alpha(theme.palette.primary[50], 0.5), | ||
| borderColor: (theme.vars || theme).palette.primary[200], | ||
| <Box | ||
| component="img" | ||
| height="27px" | ||
| width="90px" | ||
| src="/static/sponsors/marblism-light.svg" | ||
| alt="marblism" | ||
| title="AI web app generation" | ||
| loading="lazy" | ||
| sx={(theme) => | ||
| theme.applyDarkStyles({ | ||
| content: `url(/static/sponsors/marblism-dark.svg)`, | ||
| }) | ||
| } | ||
| /> | ||
| </NativeLink> | ||
| <Link | ||
| href="/material-ui/discover-more/backers/#diamond-sponsors" | ||
| sx={(theme) => ({ | ||
| p: 1.5, | ||
| width: '100%', | ||
| display: 'flex', | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| borderRadius: 1, | ||
| border: '1px dashed', | ||
| transition: theme.transitions.create(['color', 'border-color', 'background-color']), | ||
| backgroundColor: alpha(theme.palette.primary[50], 0.5), | ||
| borderColor: (theme.vars || theme).palette.primary[200], | ||
| boxShadow: `inset 0 1px 1px ${ | ||
| (theme.vars || theme).palette.grey[50] | ||
| }, 0 1px 2px ${alpha(theme.palette.primary[100], 0.8)}`, | ||
| '&:hover': { | ||
| backgroundColor: alpha(theme.palette.primary[100], 0.5), | ||
| borderColor: (theme.vars || theme).palette.primary[300], | ||
| }, | ||
| ...theme.applyDarkStyles({ | ||
| backgroundColor: alpha(theme.palette.primary[700], 0.1), | ||
| borderColor: alpha(theme.palette.primary[400], 0.2), | ||
| boxShadow: `inset 0 1px 1px ${ | ||
| (theme.vars || theme).palette.grey[50] | ||
| }, 0 1px 2px ${alpha(theme.palette.primary[100], 0.8)}`, | ||
| (theme.vars || theme).palette.primaryDark[800] | ||
| }, 0 1px 0.5px ${(theme.vars || theme).palette.common.black}`, | ||
| '&:hover': { | ||
| backgroundColor: alpha(theme.palette.primary[100], 0.5), | ||
| borderColor: (theme.vars || theme).palette.primary[300], | ||
| backgroundColor: alpha(theme.palette.primary[700], 0.2), | ||
| borderColor: (theme.vars || theme).palette.primary[400], | ||
| }, | ||
| ...theme.applyDarkStyles({ | ||
| backgroundColor: alpha(theme.palette.primary[400], 0.05), | ||
| borderColor: alpha(theme.palette.primary[300], 0.3), | ||
| boxShadow: `inset 0 1px 1px ${ | ||
| (theme.vars || theme).palette.primaryDark[800] | ||
| }, 0 1px 0.5px ${(theme.vars || theme).palette.common.black}`, | ||
| '&:hover': { | ||
| backgroundColor: alpha(theme.palette.primary[400], 0.1), | ||
| borderColor: (theme.vars || theme).palette.primary[400], | ||
| }, | ||
| }), | ||
| })} | ||
| > | ||
| <Typography variant="caption" fontWeight="semiBold" textAlign="center"> | ||
| {t('becomeADiamondSponsor')} | ||
| </Typography> | ||
| {/* <Typography variant="caption" fontWeight="regular" color="text.secondary"> | ||
| {t('diamondSponsorVacancies')} | ||
| </Typography> */} | ||
| </Link> | ||
| </Stack> | ||
| }), | ||
| })} | ||
| > | ||
| <Typography variant="caption" fontWeight="semiBold" textAlign="center"> | ||
| {t('becomeADiamondSponsor')} | ||
| </Typography> | ||
| {/* <Typography variant="caption" fontWeight="regular" color="text.secondary"> | ||
| {t('diamondSponsorVacancies')} | ||
| </Typography> */} | ||
| </Link> | ||
| </Stack> | ||
| ); | ||
| } | ||

Uh oh!
There was an error while loading. Please reload this page.