|
|
@ -1,5 +1,5 @@ |
|
|
|
import React from 'react'; |
|
|
|
import React from 'react'; |
|
|
|
import { Box, Container, Image } from '@chakra-ui/react'; |
|
|
|
import { Box, Button, Container, Flex, Heading, Image, Input, Text } from '@chakra-ui/react'; |
|
|
|
import { GlobalHeader } from '../../components/global-header'; |
|
|
|
import { GlobalHeader } from '../../components/global-header'; |
|
|
|
import { OpensourceBanner } from '../../components/opensource-banner'; |
|
|
|
import { OpensourceBanner } from '../../components/opensource-banner'; |
|
|
|
import { Footer } from '../../components/footer'; |
|
|
|
import { Footer } from '../../components/footer'; |
|
|
@ -8,6 +8,8 @@ import MdRenderer from '../../components/md-renderer'; |
|
|
|
import Helmet from '../../components/helmet'; |
|
|
|
import Helmet from '../../components/helmet'; |
|
|
|
import { RoadmapPageHeader } from '../../components/roadmap/roadmap-page-header'; |
|
|
|
import { RoadmapPageHeader } from '../../components/roadmap/roadmap-page-header'; |
|
|
|
import { InteractiveRoadmapRenderer } from './interactive'; |
|
|
|
import { InteractiveRoadmapRenderer } from './interactive'; |
|
|
|
|
|
|
|
import { FreeSignUp, SIGNUP_EMAIL_INPUT_NAME, SIGNUP_FORM_ACTION } from '../signup'; |
|
|
|
|
|
|
|
import { BellIcon, EmailIcon } from '@chakra-ui/icons'; |
|
|
|
|
|
|
|
|
|
|
|
type RoadmapProps = { |
|
|
|
type RoadmapProps = { |
|
|
|
roadmap: RoadmapType; |
|
|
|
roadmap: RoadmapType; |
|
|
@ -25,8 +27,8 @@ function ImageRoadmap(props: RoadmapProps) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Container maxW={'900px'} position="relative"> |
|
|
|
<Container maxW={'900px'} position='relative'> |
|
|
|
<Box mb="30px"> |
|
|
|
<Box mb='30px'> |
|
|
|
<Image alt={roadmap.title} src={roadmap.imageUrl} /> |
|
|
|
<Image alt={roadmap.title} src={roadmap.imageUrl} /> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
</Container> |
|
|
|
</Container> |
|
|
@ -44,7 +46,7 @@ function TextualRoadmap(props: RoadmapProps) { |
|
|
|
const LandingContent = require(`../../content/${normalizedPath}`).default; |
|
|
|
const LandingContent = require(`../../content/${normalizedPath}`).default; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Container maxW={'container.md'} position="relative"> |
|
|
|
<Container maxW={'container.md'} position='relative'> |
|
|
|
<MdRenderer> |
|
|
|
<MdRenderer> |
|
|
|
<LandingContent /> |
|
|
|
<LandingContent /> |
|
|
|
</MdRenderer> |
|
|
|
</MdRenderer> |
|
|
@ -52,11 +54,33 @@ function TextualRoadmap(props: RoadmapProps) { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function UpcomingRoadmap(props: RoadmapProps) { |
|
|
|
|
|
|
|
const { roadmap } = props; |
|
|
|
|
|
|
|
if (!roadmap.isUpcoming) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<Container maxW={'container.md'} position='relative' mx='auto'> |
|
|
|
|
|
|
|
<Flex flexDir='column' alignItems='center' borderWidth={1} rounded='lg' py={10} boxShadow='inner' px={5}> |
|
|
|
|
|
|
|
<BellIcon w='90px' h='90px' color='gray.200' mb={5} /> |
|
|
|
|
|
|
|
<Heading mb={2} fontSize='2xl' >Upcoming Roadmap</Heading> |
|
|
|
|
|
|
|
<Text fontSize='md' mb={4}>Please check back later or subscribe below.</Text> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<form action={SIGNUP_FORM_ACTION} method='post'> |
|
|
|
|
|
|
|
<Input type='email' bg={'white'} size='lg' placeholder='Enter your email' mb={2} name={SIGNUP_EMAIL_INPUT_NAME} required /> |
|
|
|
|
|
|
|
<Button size='lg' isFullWidth colorScheme='teal' leftIcon={<EmailIcon />} type='submit'>Get Notified</Button> |
|
|
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
</Flex> |
|
|
|
|
|
|
|
</Container> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default function Roadmap(props: RoadmapProps) { |
|
|
|
export default function Roadmap(props: RoadmapProps) { |
|
|
|
const { roadmap } = props; |
|
|
|
const { roadmap } = props; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Box bg="white" minH="100vh"> |
|
|
|
<Box bg='white' minH='100vh'> |
|
|
|
<GlobalHeader /> |
|
|
|
<GlobalHeader /> |
|
|
|
<Helmet |
|
|
|
<Helmet |
|
|
|
title={roadmap?.seo?.title || roadmap.title} |
|
|
|
title={roadmap?.seo?.title || roadmap.title} |
|
|
@ -64,10 +88,11 @@ export default function Roadmap(props: RoadmapProps) { |
|
|
|
keywords={roadmap?.seo.keywords || []} |
|
|
|
keywords={roadmap?.seo.keywords || []} |
|
|
|
roadmap={roadmap} |
|
|
|
roadmap={roadmap} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Box mb="60px"> |
|
|
|
<Box mb='60px'> |
|
|
|
<RoadmapPageHeader roadmap={roadmap} /> |
|
|
|
<RoadmapPageHeader roadmap={roadmap} /> |
|
|
|
<ImageRoadmap roadmap={roadmap} /> |
|
|
|
<ImageRoadmap roadmap={roadmap} /> |
|
|
|
<TextualRoadmap roadmap={roadmap} /> |
|
|
|
<TextualRoadmap roadmap={roadmap} /> |
|
|
|
|
|
|
|
<UpcomingRoadmap roadmap={roadmap} /> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
|
|
|
|
|
|
|
|
<OpensourceBanner /> |
|
|
|
<OpensourceBanner /> |
|
|
@ -85,12 +110,12 @@ type StaticPathItem = { |
|
|
|
export async function getStaticPaths() { |
|
|
|
export async function getStaticPaths() { |
|
|
|
const roadmaps = getAllRoadmaps(); |
|
|
|
const roadmaps = getAllRoadmaps(); |
|
|
|
const paramsList: StaticPathItem[] = roadmaps.map((roadmap) => ({ |
|
|
|
const paramsList: StaticPathItem[] = roadmaps.map((roadmap) => ({ |
|
|
|
params: { roadmap: roadmap.id }, |
|
|
|
params: { roadmap: roadmap.id } |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
paths: paramsList, |
|
|
|
paths: paramsList, |
|
|
|
fallback: false, |
|
|
|
fallback: false |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -105,7 +130,7 @@ export async function getStaticProps(context: ContextType) { |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
roadmap: getRoadmapById(roadmapId), |
|
|
|
roadmap: getRoadmapById(roadmapId) |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|