import Button from '@mui/material/Button'; import Card from '@mui/material/Card'; import CardActionArea from '@mui/material/CardActionArea'; import CardContent from '@mui/material/CardContent'; import Chip from '@mui/material/Chip'; import { styled, useTheme } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import Image from 'next/image'; import Link from 'next/link'; import DateDisplay from '../components/DateDisplay'; import Container from '../components/layout/Container'; import Page from '../components/layout/Page'; import config from '../lib/config'; import { getDocsMenuStaticProps } from '../lib/docs'; import homepageData from '../lib/homepage'; import releases from '../lib/releases'; import type { DocsMenuProps } from '../lib/docs'; const StyledHomagePageContent = styled('div')( ({ theme }) => ` width: 100%; padding-top: 72px; display: flex; flex-direction: column; gap: 88px; align-items: center; ${theme.breakpoints.down('md')} { padding-top: 32px; gap: 0; } `, ); const StyledIntroSection = styled('section')` width: 100%; display: flex; flex-direction: column; align-items: center; `; const StyledIntroSectionContent = styled('div')` width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; `; const StyledOverviewSection = styled('section')( ({ theme }) => ` width: 100%; display: flex; flex-direction: column; align-items: center; ${theme.breakpoints.down('md')} { margin-top: 64px; } `, ); const StyledOverviewSectionContent = styled('div')( ({ theme }) => ` width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; ${theme.breakpoints.down('md')} { grid-template-columns: 1fr; gap: 24px; } `, ); const StyledOverviewList = styled('div')` display: flex; flex-direction: column; gap: 16px; `; const StyledOverview = styled('div')` display: flex; flex-direction: column; gap: 8px; `; const StyledImageWrapper = styled('div')` width: 100%; position: relative; `; const StyledCallToActionSection = styled('section')( ({ theme }) => ` width: 100%; display: flex; flex-direction: column; align-items: center; height: 0; overflow: visible; z-index: 1; ${theme.breakpoints.down('md')} { height: auto; margin-top: 64px; } `, ); const StyledCallToActionContainer = styled('div')( ({ theme }) => ` max-width: 1280px; width: 100%; padding: 0 40px; display: flex; flex-direction: column; align-items: center; ${theme.breakpoints.down('md')} { padding: 0; } `, ); const StyledCallToActionCard = styled(Card)( ({ theme }) => ` width: 80%; ${theme.breakpoints.down('md')} { width: 100%; } `, ); const StyledCallToActionCardContent = styled(CardContent)( ({ theme }) => ` display: flex; align-items: flex-start; padding: 24px 40px; line-height: 30px; gap: 24px; ${theme.breakpoints.down('md')} { flex-direction: column; } `, ); const StyledCallToActionText = styled('div')` flex-grow: 1; `; const StyledReleasesSection = styled('section')( ({ theme }) => ` width: 100%; display: flex; flex-direction: column; align-items: center; background: ${theme.palette.mode === 'light' ? '#dddee2' : '#242424'}; padding: 64px 0; ${theme.breakpoints.down('md')} { padding: 48px 0; } `, ); const StyledReleasesSectionContent = styled('div')( ({ theme }) => ` width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; ${theme.breakpoints.down('md')} { grid-template-columns: 1fr; } `, ); const StyledReleaseCardContent = styled(CardContent)` width: 100%; display: flex; flex-direction: column; gap: 8px; `; const StyledFeaturesSection = styled('section')( ({ theme }) => ` width: 100%; display: flex; flex-direction: column; align-items: center; padding-bottom: 80px; ${theme.breakpoints.down('md')} { height: auto; margin-top: 48px; } `, ); const StyledFeaturesSectionIntro = styled('div')( ({ theme }) => ` width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 0 104px; ${theme.breakpoints.down('md')} { padding: 32px 0 48px; } `, ); const StyledFeaturesSectionContent = styled('div')( ({ theme }) => ` width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; ${theme.breakpoints.down('md')} { grid-template-columns: 1fr; } `, ); const StyledFeature = styled('div')` width: 100%; position: relative; display: flex; flex-direction: column; gap: 8px; `; const StyledFeatureText = styled('div')` width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 0 16px; `; const Home = ({ docsGroups, searchablePages }: DocsMenuProps) => { const theme = useTheme(); return ( {homepageData.title} {homepageData.subtitle} {homepageData.overviews.map(overview => ( {overview.title} {overview.description} ))} {/* eslint-disable-next-line @next/next/no-img-element */} {homepageData.call_to_action.title}   {homepageData.call_to_action.subtitle} {[...Array(3)].map((_, index) => { if (index >= releases.length) { return null; } const release = releases[index]; return ( <> {release.description} ); })} {homepageData.features_intro.title} {homepageData.features_intro.subtitle1} {homepageData.features_intro.subtitle2} {homepageData.features.map(feature => ( {/* eslint-disable-next-line @next/next/no-img-element */} {feature.title} {feature.description} ))} ); }; export default Home; export const getStaticProps = getDocsMenuStaticProps;