parent
6632b46d98
commit
5b12eb9e02
7 changed files with 152 additions and 18 deletions
@ -0,0 +1,35 @@ |
|||||||
|
import { Summary, SummaryContainer, UpcomingContainer } from './style'; |
||||||
|
import GuideBody from 'components/guide-body'; |
||||||
|
import RoadmapHeader from 'components/roadmap-header'; |
||||||
|
import SharePage from 'components/share-page'; |
||||||
|
import MdRenderer from 'components/md-renderer'; |
||||||
|
|
||||||
|
const RoadmapSummary = ({ roadmap }) => { |
||||||
|
if (roadmap.upcoming) { |
||||||
|
return ( |
||||||
|
<> |
||||||
|
<RoadmapHeader roadmap={ roadmap } /> |
||||||
|
<UpcomingContainer> |
||||||
|
<GuideBody guide={{ fileName: 'upcoming' }} /> |
||||||
|
</UpcomingContainer> |
||||||
|
</> |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
const filePath = roadmap.path.replace(/^\//, ''); |
||||||
|
const RoadmapContent = require(`../../storage/${filePath}`).default; |
||||||
|
|
||||||
|
return ( |
||||||
|
<SummaryContainer> |
||||||
|
<RoadmapHeader roadmap={ roadmap } /> |
||||||
|
<Summary className="container"> |
||||||
|
<MdRenderer> |
||||||
|
<RoadmapContent /> |
||||||
|
</MdRenderer> |
||||||
|
<SharePage title={ roadmap.description } url={ roadmap.url } /> |
||||||
|
</Summary> |
||||||
|
</SummaryContainer> |
||||||
|
) |
||||||
|
}; |
||||||
|
|
||||||
|
export default RoadmapSummary; |
@ -0,0 +1,20 @@ |
|||||||
|
import styled from 'styled-components'; |
||||||
|
|
||||||
|
export const SummaryContainer = styled.div``; |
||||||
|
|
||||||
|
export const UpcomingContainer = styled.div` |
||||||
|
text-align: center; |
||||||
|
padding: 40px 0 50px; |
||||||
|
|
||||||
|
.container { |
||||||
|
position: relative; |
||||||
|
} |
||||||
|
`;
|
||||||
|
|
||||||
|
export const Summary = styled.div` |
||||||
|
margin-top: 35px; |
||||||
|
min-height: 400px; |
||||||
|
display: block; |
||||||
|
position: relative; |
||||||
|
text-align: left; |
||||||
|
`;
|
Loading…
Reference in new issue