Update UI for guide page

pull/1331/head
Kamran Ahmed 5 years ago
parent cb24556d2f
commit 380b39ec2f
  1. 2
      components/faq-list/index.js
  2. 2
      components/featured-content/index.js
  3. 15
      components/mdx-components/a.js
  4. 8
      components/mdx-components/blockquote.js
  5. 3
      components/mdx-components/heading.js
  6. 4
      components/mdx-components/index.js
  7. 3
      components/mdx-components/p.js
  8. 2
      components/page-footer/index.js
  9. 2354
      data/guides/design-patterns-for-humans.md
  10. 4
      layouts/default/global.scss
  11. 4
      pages/guides/[guide].js
  12. 2
      pages/privacy.js
  13. 2
      pages/terms.js

@ -1,7 +1,7 @@
import { FaqContainer, FaqItem } from './style'; import { FaqContainer, FaqItem } from './style';
const FaqList = () => ( const FaqList = () => (
<FaqContainer className='border-top border-bottom bg-light'> <FaqContainer className='border-top bg-light'>
<FaqItem> <FaqItem>
<div className="container container-small"> <div className="container container-small">
<h4 className='font-weight-bolder'>What is roadmap.sh?</h4> <h4 className='font-weight-bolder'>What is roadmap.sh?</h4>

@ -4,7 +4,7 @@ import FeaturedGuides from './guides';
import FeaturedRoadmaps from './roadmaps'; import FeaturedRoadmaps from './roadmaps';
const FeaturedContent = (props) => ( const FeaturedContent = (props) => (
<FeaturedWrap className="border-top border-bottom bg-light"> <FeaturedWrap className="border-top bg-light">
<FeaturedRoadmaps /> <FeaturedRoadmaps />
<FeaturedGuides /> <FeaturedGuides />
</FeaturedWrap> </FeaturedWrap>

@ -0,0 +1,15 @@
import styled from 'styled-components';
const Link = styled.a`
font-weight: 600;
`;
const EnrichedLink = props => {
return (
<Link href={ props.href } target={ /^http(s)?:\/\//.test(props.href) ? '_blank' : '_self' }>
{ props.children }
</Link>
);
};
export default EnrichedLink;

@ -1,12 +1,14 @@
import styled from 'styled-components'; import styled from 'styled-components';
export const BlockQuote = styled.blockquote` const BlockQuote = styled.blockquote`
background: transparent;
padding: 16px 20px; padding: 16px 20px;
border-left: 5px solid currentColor;
position: relative; position: relative;
background: #e8e8e8;
border-radius: 5px;
p { p {
margin: 0; margin: 0;
} }
`; `;
export default BlockQuote;

@ -6,7 +6,8 @@ const linkify = (Component) => {
const text = props.children; const text = props.children;
const id = text.toLowerCase && text const id = text.toLowerCase && text
.toLowerCase() .toLowerCase()
.replace(/\s/g, '-') .replace(/[^\x00-\x7F]/g, '')
.replace(/\s+/g, '-')
.replace(/[?!]/g, ''); .replace(/[?!]/g, '');
return ( return (

@ -1,16 +1,18 @@
import P from './p'; import P from './p';
import { Headings } from './heading'; import { Headings } from './heading';
import { Pre } from './pre'; import { Pre } from './pre';
import { BlockQuote } from './blockquote'; import BlockQuote from './blockquote';
import { Table } from './table'; import { Table } from './table';
import { IFrame } from './iframe'; import { IFrame } from './iframe';
import { Img } from './img'; import { Img } from './img';
import EnrichedLink from './a';
const MdxComponents = { const MdxComponents = {
p: P, p: P,
...Headings, ...Headings,
pre: Pre, pre: Pre,
blockquote: BlockQuote, blockquote: BlockQuote,
a: EnrichedLink,
table: Table, table: Table,
iframe: IFrame, iframe: IFrame,
img: Img, img: Img,

@ -4,11 +4,10 @@ const P = styled.p`
color: inherit; color: inherit;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
line-height: 1.6; line-height: 27px;
margin: 16px 0; margin: 16px 0;
img + em { img + em {
display: block;
text-align: center; text-align: center;
color: #666666; color: #666666;
font-style: normal; font-style: normal;

@ -2,7 +2,7 @@ import Link from 'next/link';
import { FooterWrap } from './style.js' import { FooterWrap } from './style.js'
const PageFooter = () => ( const PageFooter = () => (
<FooterWrap> <FooterWrap className="border-top">
<div className="container"> <div className="container">
<div className="foot-cols-wrap row"> <div className="foot-cols-wrap row">
<div className="site-meta-wrap col-12 col-sm-12 col-lg col-xl col-md-12"> <div className="site-meta-wrap col-12 col-sm-12 col-lg col-xl col-md-12">

File diff suppressed because it is too large Load Diff

@ -5,6 +5,10 @@
max-width: 800px; max-width: 800px;
} }
ul li, ol li {
margin-bottom: 7px;
}
.border-top { .border-top {
border-top: 1px solid #eaeaea; border-top: 1px solid #eaeaea;
} }

@ -18,7 +18,9 @@ const Guide = ({ guide }) => {
Guide.getInitialProps = serverOnlyProps(({ req }) => { Guide.getInitialProps = serverOnlyProps(({ req }) => {
// Remove URL chunk to make it a slug e.g. /guides/some-guide-item to become `some-guide-item // Remove URL chunk to make it a slug e.g. /guides/some-guide-item to become `some-guide-item
const slug = req.url.replace(/^\/*?guides\/*?/, '/').replace(/\/*$/, ''); const slug = req.url
.replace(/^\/*?guides\/*?/, '/')
.replace(/\/*$/, '');
return { return {
slug, slug,

@ -7,7 +7,7 @@ const Privacy = () => (
<DefaultLayout> <DefaultLayout>
<TosPage> <TosPage>
<PageHeader /> <PageHeader />
<div className="bg-light border-top border-bottom privacy-wrap"> <div className="bg-light border-top privacy-wrap">
<div className="container pt-5 pb-5"> <div className="container pt-5 pb-5">
<h2 className='font-weight-bold mb-3'>Privacy Policy</h2> <h2 className='font-weight-bold mb-3'>Privacy Policy</h2>
<p>By using or accessing the Services in any manner, you acknowledge that you accept the practices and policies outlined in this Privacy Policy, and you hereby consent that we will collect, use, and share your information in the following ways. Remember that your use of roadmap.shs Services is at all times subject to the <a <p>By using or accessing the Services in any manner, you acknowledge that you accept the practices and policies outlined in this Privacy Policy, and you hereby consent that we will collect, use, and share your information in the following ways. Remember that your use of roadmap.shs Services is at all times subject to the <a

@ -7,7 +7,7 @@ const Terms = () => (
<DefaultLayout> <DefaultLayout>
<TosPage> <TosPage>
<PageHeader /> <PageHeader />
<div className="bg-light border-top border-bottom tos-wrap"> <div className="bg-light border-top tos-wrap">
<div className="container pt-5 pb-5"> <div className="container pt-5 pb-5">
<h2>Terms of Service</h2> <h2>Terms of Service</h2>

Loading…
Cancel
Save