|
|
@ -18,6 +18,7 @@ import { ChevronRightIcon } from '@chakra-ui/icons'; |
|
|
|
type RoadmapProps = { |
|
|
|
type RoadmapProps = { |
|
|
|
roadmap: RoadmapType; |
|
|
|
roadmap: RoadmapType; |
|
|
|
group: string; |
|
|
|
group: string; |
|
|
|
|
|
|
|
isOutlet?: boolean; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// @todo error handling
|
|
|
|
// @todo error handling
|
|
|
@ -36,14 +37,24 @@ function TextualRoadmap(props: RoadmapProps) { |
|
|
|
|
|
|
|
|
|
|
|
const GroupContent = |
|
|
|
const GroupContent = |
|
|
|
require(`../../content/${normalizedContentFilePath}`).default; |
|
|
|
require(`../../content/${normalizedContentFilePath}`).default; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<MdRenderer> |
|
|
|
|
|
|
|
<GroupContent /> |
|
|
|
|
|
|
|
</MdRenderer> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function RoadmapBreadcrumb(props: RoadmapProps) { |
|
|
|
|
|
|
|
const { roadmap, group } = props; |
|
|
|
|
|
|
|
|
|
|
|
const groupParts = group.split(':'); |
|
|
|
const groupParts = group.split(':'); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Container maxW={'container.md'} position="relative"> |
|
|
|
|
|
|
|
<Box d="block" m="60px 0 20px"> |
|
|
|
|
|
|
|
<Breadcrumb |
|
|
|
<Breadcrumb |
|
|
|
fontWeight="medium" |
|
|
|
fontWeight="medium" |
|
|
|
fontSize="sm" |
|
|
|
fontSize="sm" |
|
|
|
|
|
|
|
mb="20px" |
|
|
|
separator={<ChevronRightIcon color="gray.500" />} |
|
|
|
separator={<ChevronRightIcon color="gray.500" />} |
|
|
|
> |
|
|
|
> |
|
|
|
<BreadcrumbItem> |
|
|
|
<BreadcrumbItem> |
|
|
@ -53,8 +64,12 @@ function TextualRoadmap(props: RoadmapProps) { |
|
|
|
</BreadcrumbItem> |
|
|
|
</BreadcrumbItem> |
|
|
|
|
|
|
|
|
|
|
|
{groupParts.map((groupPart: string, counter: number) => ( |
|
|
|
{groupParts.map((groupPart: string, counter: number) => ( |
|
|
|
<BreadcrumbItem key={groupPart} isCurrentPage={counter === groupParts.length - 1}> |
|
|
|
<BreadcrumbItem |
|
|
|
|
|
|
|
key={groupPart} |
|
|
|
|
|
|
|
isCurrentPage={counter === groupParts.length - 1} |
|
|
|
|
|
|
|
> |
|
|
|
<BreadcrumbLink |
|
|
|
<BreadcrumbLink |
|
|
|
|
|
|
|
textTransform="capitalize" |
|
|
|
color="blue.500" |
|
|
|
color="blue.500" |
|
|
|
href={`/${roadmap.id}/${groupParts |
|
|
|
href={`/${roadmap.id}/${groupParts |
|
|
|
.slice(0, counter + 1) |
|
|
|
.slice(0, counter + 1) |
|
|
@ -65,16 +80,15 @@ function TextualRoadmap(props: RoadmapProps) { |
|
|
|
</BreadcrumbItem> |
|
|
|
</BreadcrumbItem> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</Breadcrumb> |
|
|
|
</Breadcrumb> |
|
|
|
</Box> |
|
|
|
|
|
|
|
<MdRenderer> |
|
|
|
|
|
|
|
<GroupContent /> |
|
|
|
|
|
|
|
</MdRenderer> |
|
|
|
|
|
|
|
</Container> |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default function Roadmap(props: RoadmapProps) { |
|
|
|
export default function RoadmapGroup(props: RoadmapProps) { |
|
|
|
const { roadmap, group } = props; |
|
|
|
const { roadmap, group, isOutlet = false } = props; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isOutlet) { |
|
|
|
|
|
|
|
return <TextualRoadmap roadmap={roadmap} group={group} />; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Box bg="white" minH="100vh"> |
|
|
|
<Box bg="white" minH="100vh"> |
|
|
@ -84,9 +98,10 @@ export default function Roadmap(props: RoadmapProps) { |
|
|
|
description={roadmap?.seo?.description || roadmap.description} |
|
|
|
description={roadmap?.seo?.description || roadmap.description} |
|
|
|
keywords={roadmap?.seo.keywords || []} |
|
|
|
keywords={roadmap?.seo.keywords || []} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Box mb="60px"> |
|
|
|
<Container my={'60px'} maxW={'container.md'} position="relative"> |
|
|
|
|
|
|
|
<RoadmapBreadcrumb roadmap={roadmap} group={group} /> |
|
|
|
<TextualRoadmap roadmap={roadmap} group={group} /> |
|
|
|
<TextualRoadmap roadmap={roadmap} group={group} /> |
|
|
|
</Box> |
|
|
|
</Container> |
|
|
|
|
|
|
|
|
|
|
|
<OpensourceBanner /> |
|
|
|
<OpensourceBanner /> |
|
|
|
<UpdatesBanner /> |
|
|
|
<UpdatesBanner /> |
|
|
|