From 55f7d00e8324e6c7c9bff730102180ebb03a21f6 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Mon, 16 Aug 2021 00:10:18 +0200 Subject: [PATCH] Add roadmaps listing --- pages/index.tsx | 14 +-- .../roadmaps/components/home-roadmap-item.tsx | 46 ++++++++ .../roadmaps/components/roadmap-grid-item.tsx | 72 ++++++++----- pages/roadmaps/index.tsx | 100 +++++++++++++++++- 4 files changed, 198 insertions(+), 34 deletions(-) create mode 100644 pages/roadmaps/components/home-roadmap-item.tsx diff --git a/pages/index.tsx b/pages/index.tsx index b034026e5..3f98b4d20 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,10 +4,10 @@ import { Footer } from '../components/footer'; import { UpdatesBanner } from '../components/updates-banner'; import { OpensourceBanner } from '../components/opensource-banner'; import { DimmedMore } from '../components/dimmed-more'; -import { RoadmapGridItem } from './roadmaps/components/roadmap-grid-item'; import { LinksListItem } from '../components/links-list-item'; import { VideoIcon } from '../icons/video-icon'; import { LinksList } from '../components/links-list'; +import { HomeRoadmapItem } from './roadmaps/components/home-roadmap-item'; export default function Home() { return ( @@ -27,17 +27,17 @@ export default function Home() { channel which we hope you are going to love. - - - - - - diff --git a/pages/roadmaps/components/home-roadmap-item.tsx b/pages/roadmaps/components/home-roadmap-item.tsx new file mode 100644 index 000000000..4b948551d --- /dev/null +++ b/pages/roadmaps/components/home-roadmap-item.tsx @@ -0,0 +1,46 @@ +import { Box, Heading, Link, Text, Tooltip } from '@chakra-ui/react'; +import { InfoIcon } from '@chakra-ui/icons'; + +type RoadmapGridItemProps = { + title: string; + subtitle: string; + isCommunity?: boolean; + colorIndex?: number +}; + +const bgColorList = [ + 'blue.900', + 'red.800', + 'green.800', + 'teal.800', + 'gray.800', + 'red.900' +]; + +export function HomeRoadmapItem(props: RoadmapGridItemProps) { + const { title, subtitle, isCommunity, colorIndex = 0 } = props; + + return ( + + {isCommunity && ( + + + + )} + + {title} + {subtitle} + + ); +} diff --git a/pages/roadmaps/components/roadmap-grid-item.tsx b/pages/roadmaps/components/roadmap-grid-item.tsx index 6d3fc70ab..6aa2c343e 100644 --- a/pages/roadmaps/components/roadmap-grid-item.tsx +++ b/pages/roadmaps/components/roadmap-grid-item.tsx @@ -1,46 +1,66 @@ -import { Box, Heading, Link, Text, Tooltip } from '@chakra-ui/react'; -import { InfoIcon } from '@chakra-ui/icons'; +import { Badge, Box, Heading, Link, Text } from '@chakra-ui/react'; type RoadmapGridItemProps = { title: string; subtitle: string; + date: string; isCommunity?: boolean; - colorIndex?: number + colorIndex?: number; }; const bgColorList = [ + 'gray.900', + 'purple.900', 'blue.900', + 'red.900', + 'green.900', + 'teal.900', + 'yellow.900', + 'cyan.900', + 'pink.900', + + 'gray.800', + 'purple.800', + 'blue.800', 'red.800', 'green.800', 'teal.800', - 'gray.800', - 'red.900' + 'yellow.800', + 'cyan.800', + 'pink.800', + + 'gray.700', + 'purple.700', + 'blue.700', + 'red.700', + 'green.700', + 'teal.700', + 'yellow.700', + 'cyan.700', + 'pink.700', + + 'gray.600', + 'purple.600', + 'blue.600', + 'red.600', + 'green.600', + 'teal.600', + 'yellow.600', + 'cyan.600', + 'pink.600' ]; export function RoadmapGridItem(props: RoadmapGridItemProps) { - const { title, subtitle, isCommunity, colorIndex = 0 } = props; + const { title, subtitle, date, isCommunity = false, colorIndex = 0 } = props; return ( - - {isCommunity && ( - - - - )} - - {title} - {subtitle} + + {title} + {subtitle} + {isCommunity && + Community + } ); } diff --git a/pages/roadmaps/index.tsx b/pages/roadmaps/index.tsx index ff649dd1a..7eae90313 100644 --- a/pages/roadmaps/index.tsx +++ b/pages/roadmaps/index.tsx @@ -1,5 +1,103 @@ +import { Box, Container, SimpleGrid } from '@chakra-ui/react'; +import { Header } from '../../components/header'; +import { OpensourceBanner } from '../../components/opensource-banner'; +import { UpdatesBanner } from '../../components/updates-banner'; +import { Footer } from '../../components/footer'; +import { PageHeader } from '../../components/page-header'; +import { HomeRoadmapItem } from './components/home-roadmap-item'; +import { RoadmapGridItem } from './components/roadmap-grid-item'; + export default function Roadmaps() { return ( -

Hello world

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +