This repository has been archived by the owner on Aug 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from systemseed/landing
[#156816419] Added new landing page components.
- Loading branch information
Showing
14 changed files
with
228 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
|
||
/** | ||
* Simple link without Next.js routing. | ||
*/ | ||
const ExternalLink = ({ title, url }) => ( | ||
<a className="external-link" href={url}>{title}</a> | ||
) | ||
|
||
export default ExternalLink; |
43 changes: 43 additions & 0 deletions
43
frontend-main/components/molecules/PageTitleCopy/_style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.copy-with-title-and-subtitle { | ||
.plain-text { | ||
p:first-child { | ||
margin-top: 0; | ||
} | ||
p:last-child { | ||
margin-bottom: 0; | ||
} | ||
margin-bottom: 6px; | ||
} | ||
|
||
a { | ||
color: $dark-sky-blue; | ||
text-decoration: underline; | ||
|
||
&:hover { | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
@include media-breakpoint-up(md) { | ||
// TODO: Standardise line heights accross components. | ||
.subheading, p { | ||
line-height: 1.5; | ||
} | ||
} | ||
|
||
h3 { | ||
@include font-size(20px); | ||
font-weight: bold; | ||
color: $primary; | ||
line-height: 1.2em; | ||
margin: 1.4em 0 0.7em; | ||
@include media-breakpoint-up(md) { | ||
@include font-size(22px); | ||
margin-bottom: 1.4em; | ||
} | ||
@include media-breakpoint-up(xl) { | ||
@include font-size(24px); | ||
line-height: 1.25; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Heading1 from '../../atoms/Heading1'; | ||
import SubHeading from '../../atoms/SubHeading'; | ||
import PlainText from '../../atoms/PlainText'; | ||
|
||
const PageTitleCopy = ({ heading, subheading, copy }) => { | ||
return ( | ||
<div className="copy-with-title-and-subtitle"> | ||
<Heading1>{heading}</Heading1> | ||
<SubHeading>{subheading}</SubHeading> | ||
<PlainText>{copy}</PlainText> | ||
</div> | ||
); | ||
}; | ||
|
||
PageTitleCopy.propTypes = { | ||
heading: PropTypes.string, | ||
subheading: PropTypes.string, | ||
copy: PropTypes.string, | ||
}; | ||
|
||
export default PageTitleCopy; |
21 changes: 21 additions & 0 deletions
21
frontend-main/components/organisms/FooterLinksPane/_style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.footer-links-pane__link_block { | ||
a { | ||
font-weight: bold; | ||
color: $warm-grey; | ||
line-height: 2; | ||
|
||
&:hover { | ||
color: $primary; | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
// Allow link items to use more space if needed. | ||
@include media-breakpoint-up(lg) { | ||
flex: 0.5 1 auto; | ||
flex-wrap: nowrap; | ||
width: auto; | ||
padding: 0 5px; | ||
text-align: center; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
frontend-main/components/organisms/FooterLinksPane/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import FooterData from '../../molecules/FooterData'; | ||
import ExternalLink from '../../atoms/ExternalLink'; | ||
|
||
const FooterLinksPane = ({ styles, links }) => { | ||
if (!links || !links.length) { | ||
return null; | ||
} | ||
return ( | ||
<div className={"row justify-content-center limited-width footer-links-pane " + styles}> | ||
<div className="col-12 col-md-8 col-lg-11 col-xl-10"> | ||
<div className="row"> | ||
{links.map((item, i) => ( | ||
<div className="col-lg pl-0 footer-links-pane__link_block" key={`${item.url}${i}`}> | ||
<ExternalLink key={`${item.url}${i}`} {...item} /> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
FooterLinksPane.propTypes = { | ||
links: PropTypes.arrayOf(PropTypes.shape({ | ||
title: PropTypes.string, | ||
url: PropTypes.string, | ||
})), | ||
}; | ||
|
||
FooterLinksPane.defaultProps = { | ||
styles: 'bg-grey', | ||
}; | ||
|
||
export default FooterLinksPane; |
19 changes: 19 additions & 0 deletions
19
frontend-main/components/organisms/HeroImagePane/_style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.hero-image-pane { | ||
.background-image { | ||
background-size: cover; | ||
background-position: center; | ||
height: 180px; | ||
@include media-breakpoint-up(md) { | ||
height: 230px; | ||
} | ||
@include media-breakpoint-up(lg) { | ||
height: 300px; | ||
} | ||
@include media-breakpoint-up(xl) { | ||
height: 400px; | ||
} | ||
@include media-breakpoint-up(xxl, (xxl: $xxl)) { | ||
height: 530px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import BackgroundImage from '../../atoms/BackgroundImage'; | ||
|
||
|
||
const HeroImagePane = ({ styles, imageUrl, imageTitle }) => { | ||
return ( | ||
<div className={"row hero-image-pane " + styles}> | ||
<BackgroundImage imageUrl={imageUrl} imageTitle={imageTitle} /> | ||
</div> | ||
); | ||
}; | ||
|
||
HeroImagePane.propTypes = { | ||
imageUrl: PropTypes.string, | ||
imageTitle: PropTypes.string, | ||
}; | ||
|
||
HeroImagePane.defaultProps = { | ||
styles: 'bg-white', | ||
}; | ||
|
||
export default HeroImagePane; |
29 changes: 29 additions & 0 deletions
29
frontend-main/components/organisms/PageTitleCopyPane/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import PageTitleCopy from '../../molecules/PageTitleCopy'; | ||
|
||
const PageTitleCopyPane = ({ styles, heading, subheading, copy }) => { | ||
return ( | ||
<div className={"row justify-content-center pagetitle-with-copy limited-width " + styles}> | ||
<div className="col-12 col-md-8 col-xl-7"> | ||
<PageTitleCopy | ||
heading={heading} | ||
subheading={subheading} | ||
copy={copy} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
PageTitleCopyPane.propTypes = { | ||
heading: PropTypes.string, | ||
subheading: PropTypes.string, | ||
copy: PropTypes.string, | ||
}; | ||
|
||
PageTitleCopyPane.defaultProps = { | ||
styles: 'bg-grey', | ||
}; | ||
|
||
export default PageTitleCopyPane; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters