2021-08-14 22:43:25 +02:00
|
|
|
import { Box, Container, Heading, Link, SimpleGrid, Text } from '@chakra-ui/react';
|
2021-08-20 17:06:26 +02:00
|
|
|
import { GlobalHeader } from '../components/global-header';
|
2021-08-14 14:01:42 +02:00
|
|
|
import { Footer } from '../components/footer';
|
|
|
|
import { UpdatesBanner } from '../components/updates-banner';
|
|
|
|
import { OpensourceBanner } from '../components/opensource-banner';
|
2021-08-14 20:29:05 +02:00
|
|
|
import { DimmedMore } from '../components/dimmed-more';
|
2021-08-14 22:43:25 +02:00
|
|
|
import { LinksListItem } from '../components/links-list-item';
|
|
|
|
import { VideoIcon } from '../icons/video-icon';
|
|
|
|
import { LinksList } from '../components/links-list';
|
2021-08-16 00:10:18 +02:00
|
|
|
import { HomeRoadmapItem } from './roadmaps/components/home-roadmap-item';
|
2021-08-29 16:05:19 +02:00
|
|
|
import { getFeaturedRoadmaps, RoadmapType } from '../lib/roadmap';
|
2021-08-29 16:34:00 +02:00
|
|
|
import { getAllGuides, GuideType } from '../lib/guide';
|
2021-08-29 16:05:19 +02:00
|
|
|
|
|
|
|
type HomeProps = {
|
2021-08-29 16:34:00 +02:00
|
|
|
roadmaps: RoadmapType[];
|
|
|
|
guides: GuideType[];
|
2021-08-29 16:05:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default function Home(props: HomeProps) {
|
2021-08-29 16:34:00 +02:00
|
|
|
const { roadmaps, guides } = props;
|
2021-08-01 13:08:35 +02:00
|
|
|
|
|
|
|
return (
|
2021-08-14 22:55:17 +02:00
|
|
|
<Box bg='white' minH='100vh'>
|
2021-08-20 17:06:26 +02:00
|
|
|
<GlobalHeader />
|
2021-08-01 18:37:32 +02:00
|
|
|
<Box>
|
|
|
|
<Container maxW='container.md'>
|
2021-08-28 14:02:22 +02:00
|
|
|
<Box py={['23px', '23px', '35px']}>
|
|
|
|
<Heading fontSize={['22px', '22px', '28px']} mb={['8px', '8px', '15px']}>Hey there! 👋</Heading>
|
|
|
|
<Text fontSize={['14px', '14px', '16px']} mb='10px'>
|
2021-08-01 18:37:32 +02:00
|
|
|
<Text fontWeight={500} as='span'>roadmap.sh</Text> is a community effort to create roadmaps, guides and
|
|
|
|
other educational content
|
|
|
|
to help guide the developers in picking up the path and guide their learnings.
|
|
|
|
</Text>
|
2021-08-01 19:09:04 +02:00
|
|
|
|
2021-08-28 14:02:22 +02:00
|
|
|
<Text fontSize={['14px', '14px', '16px']}>We also have a <Link textDecoration={'underline'} href={'#'}
|
|
|
|
fontWeight={600}>YouTube
|
2021-08-14 22:57:40 +02:00
|
|
|
channel</Link> which we hope you are going to love.</Text>
|
2021-08-01 18:37:32 +02:00
|
|
|
</Box>
|
2021-08-28 14:02:22 +02:00
|
|
|
<SimpleGrid columns={[1, 2, 3]} spacing={['10px', '10px', '15px']}>
|
2021-08-29 16:05:19 +02:00
|
|
|
{roadmaps.map((roadmap: RoadmapType, counter: number) => (
|
|
|
|
<HomeRoadmapItem
|
|
|
|
key={roadmap.url}
|
|
|
|
colorIndex={counter}
|
|
|
|
title={roadmap.featuredTitle}
|
|
|
|
isCommunity={roadmap.isCommunity}
|
|
|
|
subtitle={roadmap.featuredDescription}
|
|
|
|
/>
|
|
|
|
))}
|
2021-08-01 18:37:32 +02:00
|
|
|
</SimpleGrid>
|
|
|
|
</Container>
|
|
|
|
</Box>
|
2021-08-01 21:38:34 +02:00
|
|
|
|
|
|
|
<Box>
|
2021-08-02 18:15:42 +02:00
|
|
|
<Container maxW='container.md' position='relative'>
|
2021-08-28 14:02:22 +02:00
|
|
|
<Box pt='60px' mb={['10px', '15px', '20px']}>
|
|
|
|
<Heading color='green.500' fontSize={['20px', '20px', '25px']} mb='5px'>Visual Guides</Heading>
|
2021-08-01 21:38:34 +02:00
|
|
|
</Box>
|
|
|
|
|
2021-08-14 22:43:25 +02:00
|
|
|
<LinksList>
|
2021-08-29 16:34:00 +02:00
|
|
|
{guides.map(guide => (
|
|
|
|
<LinksListItem
|
|
|
|
key={guide.url}
|
|
|
|
title={guide.title}
|
|
|
|
badgeText={guide.isPro ? 'PRO' : ''}
|
|
|
|
subtitle={guide.formattedUpdatedAt}
|
|
|
|
/>
|
|
|
|
))}
|
2021-08-14 20:29:05 +02:00
|
|
|
<DimmedMore text='View all Guides' />
|
2021-08-14 22:43:25 +02:00
|
|
|
</LinksList>
|
2021-08-01 21:38:34 +02:00
|
|
|
</Container>
|
|
|
|
</Box>
|
2021-08-02 18:15:42 +02:00
|
|
|
|
2021-08-15 10:39:46 +02:00
|
|
|
<Box mb='60px'>
|
2021-08-02 18:15:42 +02:00
|
|
|
<Container maxW='container.md'>
|
|
|
|
<Box pt='40px' mb='20px'>
|
|
|
|
<Heading color='green.500' fontSize='25px' mb='5px'>Video Explanations</Heading>
|
|
|
|
</Box>
|
2021-08-03 23:07:54 +02:00
|
|
|
|
2021-08-14 22:43:25 +02:00
|
|
|
<LinksList>
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='Transport Protocols: TCP vs UDP' subtitle='15 minutes'
|
|
|
|
icon={<VideoIcon
|
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
|
|
|
<LinksListItem hideSubtitleOnMobile title='OSI Model Explained' subtitle='10 minutes' icon={<VideoIcon
|
2021-08-14 22:43:25 +02:00
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='Creating a React App' badgeText='pro' subtitle='15 minutes'
|
|
|
|
icon={<VideoIcon
|
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
|
|
|
<LinksListItem hideSubtitleOnMobile title='DOM vs Shadow DOM vs Virtual DOM' badgeText='pro'
|
|
|
|
subtitle='15 minutes'
|
2021-08-14 22:43:25 +02:00
|
|
|
icon={<VideoIcon
|
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='Everything you need to know about HTTP caching' badgeText='pro'
|
|
|
|
subtitle='10 minutes'
|
2021-08-14 22:43:25 +02:00
|
|
|
icon={<VideoIcon
|
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='Content Delivery Networks' subtitle='5 minutes' icon={<VideoIcon
|
2021-08-14 22:43:25 +02:00
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='Load Balancers in Depth' subtitle='15 minutes' icon={<VideoIcon
|
2021-08-14 22:43:25 +02:00
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='DNS and how does it work?' subtitle='2 minutes' icon={<VideoIcon
|
2021-08-14 22:43:25 +02:00
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-28 14:02:22 +02:00
|
|
|
<LinksListItem hideSubtitleOnMobile title='JavaScript Fetch API' subtitle='22 minutes' icon={<VideoIcon
|
2021-08-14 22:43:25 +02:00
|
|
|
style={{ marginRight: '7px', width: '18px', height: '18px', color: '#9c9c9c' }} />} />
|
2021-08-14 20:29:05 +02:00
|
|
|
|
|
|
|
<DimmedMore text={'View all Videos'} />
|
2021-08-14 22:43:25 +02:00
|
|
|
</LinksList>
|
2021-08-02 18:15:42 +02:00
|
|
|
</Container>
|
|
|
|
</Box>
|
2021-08-12 17:09:15 +02:00
|
|
|
|
2021-08-14 14:01:42 +02:00
|
|
|
<OpensourceBanner />
|
|
|
|
<UpdatesBanner />
|
|
|
|
<Footer />
|
2021-08-01 18:37:32 +02:00
|
|
|
</Box>
|
|
|
|
);
|
2021-08-01 13:08:35 +02:00
|
|
|
}
|
2021-08-29 16:05:19 +02:00
|
|
|
|
|
|
|
export async function getStaticProps() {
|
|
|
|
return {
|
|
|
|
props: {
|
2021-08-29 16:34:00 +02:00
|
|
|
roadmaps: getFeaturedRoadmaps(),
|
|
|
|
guides: getAllGuides(10)
|
2021-08-29 16:05:19 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|