2021-09-03 12:59:44 +02:00
|
|
|
import { Box, Container, SimpleGrid } from '@chakra-ui/react';
|
2021-08-20 17:06:26 +02:00
|
|
|
import { GlobalHeader } from '../../components/global-header';
|
2021-08-15 18:28:05 +02:00
|
|
|
import { OpensourceBanner } from '../../components/opensource-banner';
|
|
|
|
import { Footer } from '../../components/footer';
|
2021-09-05 17:26:54 +02:00
|
|
|
import { VideoGridItem } from '../../components/watch/video-grid-item';
|
2021-08-15 18:28:05 +02:00
|
|
|
import { PageHeader } from '../../components/page-header';
|
2021-09-03 12:59:44 +02:00
|
|
|
import { getAllVideos, VideoType } from '../../lib/video';
|
2021-09-04 22:58:58 +02:00
|
|
|
import Helmet from '../../components/helmet';
|
2022-10-10 16:19:33 +04:00
|
|
|
import { TeamsBanner } from '../../components/teams-banner';
|
2021-09-03 12:59:44 +02:00
|
|
|
|
|
|
|
type VideosProps = {
|
|
|
|
videos: VideoType[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function Watch(props: VideosProps) {
|
|
|
|
const { videos = [] } = props;
|
2021-08-15 18:28:05 +02:00
|
|
|
|
2021-08-14 20:29:05 +02:00
|
|
|
return (
|
2021-08-15 18:28:05 +02:00
|
|
|
<Box bg='white' minH='100vh'>
|
2021-08-20 17:06:26 +02:00
|
|
|
<GlobalHeader />
|
2021-09-04 22:58:58 +02:00
|
|
|
<Helmet title='Watch' description='Graphical video demonstrations on development topics' />
|
2021-08-15 18:28:05 +02:00
|
|
|
<Box mb='60px'>
|
|
|
|
<PageHeader
|
|
|
|
title={'Watch'}
|
|
|
|
subtitle={'Graphical video demonstrations on development topics'}
|
|
|
|
/>
|
|
|
|
<Container maxW='container.md' position='relative'>
|
2021-08-28 15:28:20 +02:00
|
|
|
<SimpleGrid columns={[1, 1, 2]} mb='30px' spacing={['10px', '10px', '15px']}>
|
2021-09-03 12:59:44 +02:00
|
|
|
{videos.map((video, counter) => (
|
|
|
|
<VideoGridItem
|
2021-10-01 10:59:46 +02:00
|
|
|
target='_blank'
|
|
|
|
href={video.youtubeLink!}
|
2021-09-03 12:59:44 +02:00
|
|
|
key={video.id}
|
|
|
|
title={video.title}
|
|
|
|
subtitle={video.description}
|
|
|
|
date={video.formattedUpdatedAt!}
|
|
|
|
colorIndex={counter}
|
2022-08-13 23:32:07 +04:00
|
|
|
isNew={video.isNew}
|
2021-09-03 12:59:44 +02:00
|
|
|
/>
|
|
|
|
))}
|
2021-08-15 18:28:05 +02:00
|
|
|
</SimpleGrid>
|
|
|
|
</Container>
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
<OpensourceBanner />
|
2022-10-10 16:19:33 +04:00
|
|
|
<TeamsBanner />
|
2021-08-15 18:28:05 +02:00
|
|
|
<Footer />
|
|
|
|
</Box>
|
2021-08-14 20:29:05 +02:00
|
|
|
);
|
|
|
|
}
|
2021-09-03 12:59:44 +02:00
|
|
|
|
|
|
|
export async function getStaticProps() {
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
videos: getAllVideos()
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|