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

Fix: Make code the hero #1992

Merged
merged 7 commits into from
May 11, 2023
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
27 changes: 7 additions & 20 deletions docs/src/components/landing/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import SvgMuiLogo from 'docs/src/icons/SvgMuiLogo';
import IconImage from 'docs/src/components/icon/IconImage';
import GradientText from 'docs/src/components/typography/GradientText';
import DataObjectRoundedIcon from '@mui/icons-material/DataObjectRounded';
import SignUp from './SignUp';
import GetStartedButtons from 'docs/src/components/home/GetStartedButtons';
import ROUTES from '../../route';
import ToolpadHeroContainer from '../../layouts/ToolpadHeroContainer';

export default function Hero() {
Expand Down Expand Up @@ -41,26 +42,12 @@ export default function Hero() {
</Typography>
<Typography color="text.secondary" sx={{ maxWidth: 520, mx: 'auto', mb: 4 }}>
Build scalable and secure internal tools locally. Use your own IDE, drag and drop
pre-built components or create yours.
pre-built components or create your own.
</Typography>
<Typography
component="label"
variant="body2"
color={(theme) => (theme.palette.mode === 'dark' ? '#fff' : `text.secondary`)}
sx={{ fontWeight: 'medium', display: 'block', mb: 1, mx: 'auto' }}
htmlFor="email-landing"
>
Sign up for early access to the beta release.
</Typography>
<SignUp
sx={{
'& > div': {
display: 'flex',
flexDirection: { xs: 'column', sm: 'row' },
justifyContent: 'center',
maxWidth: 'initial',
},
}}
<GetStartedButtons
sx={{ justifyContent: 'center' }}
installation={'npx create-toolpad-app'}
to={ROUTES.toolpadQuickstart}
/>
<Box
sx={{
Expand Down
33 changes: 18 additions & 15 deletions docs/src/components/landing/Marquee.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import Container from '@mui/material/Container';
import Button from '@mui/material/Button';
import Link from 'docs/src/modules/components/Link';
import Typography from '@mui/material/Typography';
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
import SignUp from './SignUp';

function Marquee({ content }) {
return (
Expand Down Expand Up @@ -44,20 +42,25 @@ function Marquee({ content }) {
>
{content.subtitle}
</Typography>
<Button
component={Link}
href={content.action.href}
data-ga-event-category="ToolpadLanding"
data-ga-event-label={content.action.label}
data-ga-event-action="SelfHost"
noLinkStyle
size="large"
variant="contained"
endIcon={<KeyboardArrowRightRounded />}
sx={{ width: { xs: '100%', sm: 'auto' } }}
<Typography
component="label"
variant="body2"
color={(theme) => (theme.palette.mode === 'dark' ? '#fff' : `text.secondary`)}
sx={{ fontWeight: 'medium', display: 'block', mb: 1, mx: 'auto' }}
htmlFor="email-landing"
>
{content.action.label}
</Button>
</Typography>
<SignUp
sx={{
'& > div': {
display: 'flex',
flexDirection: { xs: 'column', sm: 'row' },
justifyContent: 'center',
maxWidth: 'initial',
},
}}
/>
</Container>
);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const marquee = {
subtitle: 'Using a simple command, build your first app in a few minutes.',
action: {
href: ROUTES.toolpadQuickstart,
label: 'Get Started',
label: 'Sign up for early access to the beta release',
},
};

Expand Down