Add badges to guide page
This commit is contained in:
@ -12,6 +12,9 @@ import {
|
|||||||
} from './style';
|
} from './style';
|
||||||
import { getContributionUrl } from "lib/guide";
|
import { getContributionUrl } from "lib/guide";
|
||||||
import { getTwitterUrl } from "lib/url";
|
import { getTwitterUrl } from "lib/url";
|
||||||
|
import { faClock, faEnvelope, faArrowLeft } from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { BadgeLink, BadgesList, PrimaryBadge, SecondaryBadge, DarkBadge } from 'components/badges';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
|
||||||
const GuideHeader = ({
|
const GuideHeader = ({
|
||||||
guide,
|
guide,
|
||||||
@ -33,6 +36,20 @@ const GuideHeader = ({
|
|||||||
<GuideTitle>{ guide.title }</GuideTitle>
|
<GuideTitle>{ guide.title }</GuideTitle>
|
||||||
<GuideSubtitle>{ guide.description }</GuideSubtitle>
|
<GuideSubtitle>{ guide.description }</GuideSubtitle>
|
||||||
<ActionItems>
|
<ActionItems>
|
||||||
|
<BadgesList className="mt-4">
|
||||||
|
<BadgeLink href="/guides">
|
||||||
|
<SecondaryBadge>
|
||||||
|
<FontAwesomeIcon icon={faArrowLeft}/>
|
||||||
|
Other Guides
|
||||||
|
</SecondaryBadge>
|
||||||
|
</BadgeLink>
|
||||||
|
<BadgeLink href="/signup">
|
||||||
|
<PrimaryBadge>
|
||||||
|
<FontAwesomeIcon icon={faEnvelope}/>
|
||||||
|
Send me Updates
|
||||||
|
</PrimaryBadge>
|
||||||
|
</BadgeLink>
|
||||||
|
</BadgesList>
|
||||||
</ActionItems>
|
</ActionItems>
|
||||||
</HeaderWrap>
|
</HeaderWrap>
|
||||||
);
|
);
|
||||||
|
@ -31,6 +31,12 @@ const RoadmapSummary = ({ roadmap }) => (
|
|||||||
<Description>{ roadmap.description }</Description>
|
<Description>{ roadmap.description }</Description>
|
||||||
|
|
||||||
<BadgesList className="mt-4">
|
<BadgesList className="mt-4">
|
||||||
|
<BadgeLink href="/roadmaps">
|
||||||
|
<DarkBadge>
|
||||||
|
<FontAwesomeIcon icon={faArrowLeft}/>
|
||||||
|
Other Roadmaps
|
||||||
|
</DarkBadge>
|
||||||
|
</BadgeLink>
|
||||||
{ roadmap.upcoming && (
|
{ roadmap.upcoming && (
|
||||||
<SecondaryBadge>
|
<SecondaryBadge>
|
||||||
<FontAwesomeIcon icon={faClock}/>
|
<FontAwesomeIcon icon={faClock}/>
|
||||||
|
@ -39,16 +39,6 @@
|
|||||||
"createdAt": "2019-11-01T12:00:00.860Z",
|
"createdAt": "2019-11-01T12:00:00.860Z",
|
||||||
"updatedAt": "2019-11-01T12:00:00.860Z"
|
"updatedAt": "2019-11-01T12:00:00.860Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"title": "Using React Hooks",
|
|
||||||
"description": "Start using React hooks in your react applications today with this guide.",
|
|
||||||
"url": "/guides/using-react-hooks",
|
|
||||||
"fileName": "using-react-hooks",
|
|
||||||
"featured": true,
|
|
||||||
"author": "kamranahmedse",
|
|
||||||
"createdAt": "2019-01-23T17:00:00.860Z",
|
|
||||||
"updatedAt": "2019-01-23T17:00:00.860Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"title": "HTTP Caching",
|
"title": "HTTP Caching",
|
||||||
"description": "Everything you need to know about web caching",
|
"description": "Everything you need to know about web caching",
|
||||||
|
@ -67,7 +67,7 @@ const getRoadmapRoutes = () => {
|
|||||||
},
|
},
|
||||||
// Route for each of the versions of this roadmap i.e.
|
// Route for each of the versions of this roadmap i.e.
|
||||||
// `{ '/frontend/2019': { page: '/[roadmap]/[version]', query: 'frontend/2019' } }`
|
// `{ '/frontend/2019': { page: '/[roadmap]/[version]', query: 'frontend/2019' } }`
|
||||||
...(roadmap.versions.reduce((versionRoutes, version) => {
|
...((roadmap.versions || []).reduce((versionRoutes, version) => {
|
||||||
return {
|
return {
|
||||||
...versionRoutes,
|
...versionRoutes,
|
||||||
[`${roadmap.url}/${version}`]: {
|
[`${roadmap.url}/${version}`]: {
|
||||||
|
Reference in New Issue
Block a user