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] Update /company pages to use marketing website Header and Footer #28498

Merged
merged 3 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 10 additions & 18 deletions docs/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,24 +391,16 @@ function CareersContent() {
</div>
{/* Open roles */}
<Container sx={{ py: { xs: 4, md: 8 } }}>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
}}
>
<div>
<Typography variant="h2" sx={{ my: 1 }} id="open-roles">
Open roles
</Typography>
<Typography color="text.secondary" sx={{ mb: 2, maxWidth: 450 }}>
The company is bootstrapped (so far). It was incorporated in mid-2019 and yet growing
fast (x2-3 YoY). We doubled the team in 2020 and are on track to do the same in 2021.
We&apos;re looking for help keep growing in the following areas:
</Typography>
</div>
</Box>
<div>
<Typography variant="h2" sx={{ my: 1 }} id="open-roles">
Open roles
</Typography>
<Typography color="text.secondary" sx={{ mb: 2, maxWidth: 450 }}>
The company is bootstrapped (so far). It was incorporated in mid-2019 and yet growing
fast (x2-3 YoY). We doubled the team in 2020 and are on track to do the same in 2021.
We&apos;re looking for help keep growing in the following areas:
</Typography>
</div>
<Divider
sx={{
my: { xs: 2, sm: 4 },
Expand Down
65 changes: 35 additions & 30 deletions docs/src/modules/components/TopLayoutCompany.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,59 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@mui/styles';
import { createTheme } from '@mui/material/styles';
import { styled } from '@mui/material/styles';
import Head from 'docs/src/modules/components/Head';
import AppFrame from 'docs/src/modules/components/AppFrame';
import { BANNER_HEIGHT } from 'docs/src/modules/constants';
import AppContainer from 'docs/src/modules/components/AppContainer';
import AppFooter from 'docs/src/modules/components/AppFooter';
import MarkdownElement from './MarkdownElement';
import AppFooter from 'docs/src/layouts/AppFooter';
import Divider from '@mui/material/Divider';
import AppHeader from 'docs/src/layouts/AppHeader';
import BrandingProvider from 'docs/src/BrandingProvider';
import MarkdownElement from 'docs/src/modules/components/MarkdownElement';
import Link from 'docs/src/modules/components/Link';

const styles = (theme) => ({
root: {
flex: '1 0 100%',
// Adding top buffer because of the v5 banner
marginTop: BANNER_HEIGHT,
},
container: {
marginBottom: theme.spacing(20),
maxWidth: `calc(680px + ${theme.spacing(12)})`,
'& .markdownElement': {
[theme.breakpoints.up('md')]: {
paddingRight: theme.spacing(4),
},
const StyledDiv = styled('div')(() => ({
flex: '1 0 100%',
}));

const StyledAppContainer = styled(AppContainer)(({ theme }) => ({
'& .markdownElement': {
[theme.breakpoints.up('md')]: {
paddingRight: theme.spacing(4),
},
},
});
}));

function TopLayoutCompany(props) {
const { classes, docs } = props;
const { docs } = props;
const { description, rendered, title } = docs.en;

return (
<AppFrame disableDrawer>
<BrandingProvider>
<AppHeader />
<Head title={`${title} - MUI`} description={description} />
<div className={classes.root}>
<AppContainer component="main" className={classes.container}>
<StyledDiv>
<StyledAppContainer component="main" sx={{ py: { xs: 3, sm: 4, md: 8 } }}>
<Link
siriwatknp marked this conversation as resolved.
Show resolved Hide resolved
href="/careers/#open-roles"
rel="nofollow"
variant="body2"
sx={{ display: 'block', mb: 2 }}
>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{'< Back to open roles'}
</Link>
{rendered.map((chunk, index) => {
return <MarkdownElement key={index} renderedMarkdown={chunk} />;
})}
</AppContainer>
</StyledAppContainer>
<Divider />
<AppFooter />
</div>
</AppFrame>
</StyledDiv>
</BrandingProvider>
);
}

TopLayoutCompany.propTypes = {
classes: PropTypes.object.isRequired,
docs: PropTypes.object.isRequired,
};

const defaultTheme = createTheme();
export default withStyles(styles, { defaultTheme })(TopLayoutCompany);
export default TopLayoutCompany;