Skip to content

Commit

Permalink
Merge pull request #59 from empowerhack/49/coming-soon
Browse files Browse the repository at this point in the history
[#49] Coming Soon page
  • Loading branch information
krissy authored May 14, 2017
2 parents 5b96ca4 + 9f63cc7 commit 9741ca1
Show file tree
Hide file tree
Showing 17 changed files with 258 additions and 13 deletions.
15 changes: 7 additions & 8 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Your awesome title
email: your-email@domain.com
title: Draw My Life - A Perception of Migration Through Anonymised Children's Drawings & Data
email: drawmylife@empowerhack.com
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
Draw My Life is inspired by how children's art therapy in the field
can become a basis for better data around the needs and experience
of refugee children.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username: jekyll
url: "https://drawmylife.org"
twitter_username: drawmylifeteam

# Build settings
markdown: kramdown
Expand Down
7 changes: 6 additions & 1 deletion src/_sass/_helpers/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
@import url('https://fonts.googleapis.com/css?family=Josefin+Sans:400,700');
@import url('https://fonts.googleapis.com/css?family=Josefin+Sans:100,400,700');

// **** Fonts **** //
$font-family: 'Josefin Sans', sans-serif;

// **** Colours **** //
$white: white;

$button-fg: #222222;
$button-bg: #fddf50;
$button-fg-hover: #fddf50;
$button-bg-hover: #222222;
36 changes: 36 additions & 0 deletions src/_sass/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.dml-button {
background-color: $button-bg;
border-color: $button-bg;
border-radius: 2em;
margin: 3em 0;
padding: 1em;
width: 15em;
font-weight: bold;
font-size: 16px;

@include breakpoint(small) {
margin: 1.5em 0;
}

> a {
color: $button-fg;
background-color: $button-bg;

&:hover {
color: $button-fg-hover;
background-color: $button-bg-hover;
text-decoration: none;
}
}

&:hover {
background-color: $button-bg-hover;
border-color: $button-bg-hover;

> a {
color: $button-fg-hover;
background-color: $button-bg-hover;
border-color: $button-bg-hover;
}
}
}
116 changes: 116 additions & 0 deletions src/_sass/coming_soon.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
.coming-soon-wrapper {
background-image: url('../assets/images/coming_soon_large.jpg');
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
// background-size: 100% auto;
height: 100%;
min-width: 100%;
box-shadow: inset 0px -4px 14px 0px rgba(50, 50, 50, 0.71);
z-index: 0;
position: relative;
display: flex;
flex-direction: row;
justify-content: center;
padding-bottom: 40px;

@include breakpoint(medium) {
background-image: url('../assets/images/coming_soon_medium.jpg');
}

@include breakpoint(small) {
background-image: url('../assets/images/coming_soon_small.jpg');
}

}

.coming-soon-wrapper:after {
content: '';
background: linear-gradient(135deg, #333, #000);
width: 100%;
height: 100%;
opacity: 0.7;
top: 0;
left: 0;
display: block;
z-index: 1;
position: absolute;
}

.coming-soon-footer {
color: #c0c0c0;
background-color: #333333;
padding: 1em;
}

.coming-soon-content {
display: block;
z-index: 2;
justify-content: center;
text-align: center;
height: 100%;
max-width: 65%;
font-family: $font-family;
color: #c0c0c0;

h1 {
font-size: 6em;
font-weight: 100;

@include breakpoint(medium) {
font-size: 4em;
}

@include breakpoint(small) {
font-size: 3em;
}
}

h2 {
font-size: 3em;
font-weight: 100;
margin: 1.5em 0;

@include breakpoint(medium) {
font-size: 2em;
}

@include breakpoint(small) {
font-size: 2em;
}
}

.page-header {
border: 0;
}

p {
font-size: 1.25em;
font-weight: 400;
}

a {
color: #c5093b;

&:hover {
text-decoration: none;
color: #ff558f;
}
}

.dml-logo {
background-image: url('../assets/images/DML-Logo-web-150x-high.png');
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
height: 150px;
margin: 0 auto;
text-indent: -9999px;
width: 250px;
}

.eh-logo {
background-color: #fff;
padding: 10px;
}
}
Binary file added src/assets/images/DML-Logo-web-150x-high.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/coming_soon_large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/coming_soon_medium.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/coming_soon_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/empowerhack-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
---

@import "background";
@import "coming_soon";
@import "button";
23 changes: 23 additions & 0 deletions webpack/components/ComingSoonLayout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import { comingSoon } from '../copy/coming_soon.js';

export default class ComingSoonLayout extends React.Component {
static get propTypes() {
return {
children: React.PropTypes.any
};
}

render() {
return (
<div>
<div className="container-fluid coming-soon-wrapper">
{ this.props.children }
</div>
<div className="coming-soon-footer">
{ comingSoon.footerLine }
</div>
</div>
);
}
}
2 changes: 1 addition & 1 deletion webpack/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Footer extends React.Component {
render() {
const _displayFooterItem = Object.keys(nav).map((key, index) => {
return (
<LinkContainer to={ '/' + key } key={ index }><a eventKey={ index }>{ nav[key] }</a></LinkContainer>
<LinkContainer to={ '/wip/' + key } key={ index }><a eventKey={ index }>{ nav[key] }</a></LinkContainer>
);
});

Expand Down
2 changes: 1 addition & 1 deletion webpack/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Nav extends React.Component {
render() {
const _displayNavItem = Object.keys(nav).map((key, index) => {
return (
<LinkContainer to={ '/' + key } key={ index }><NavItem eventKey={ index }>{ nav[key] }</NavItem></LinkContainer>
<LinkContainer to={ '/wip/' + key } key={ index }><NavItem eventKey={ index }>{ nav[key] }</NavItem></LinkContainer>
);
});

Expand Down
10 changes: 8 additions & 2 deletions webpack/components/Root.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from 'react';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';

import ComingSoonLayout from './ComingSoonLayout.jsx';
import ComingSoon from './pages/ComingSoon.jsx';

import Layout from './Layout.jsx';
import About from './pages/About.jsx';
import Contact from './pages/Contact.jsx';
Expand All @@ -16,8 +19,11 @@ module.exports = React.createClass({
render() {
return (
<Router history={ hashHistory }>
<Route path="/" component={ Layout }>
<IndexRoute component={ Home } />
<Route path="/" component={ ComingSoonLayout }>
<IndexRoute component={ ComingSoon } />
</Route>

<Route path="/wip" component={ Layout }>
<Route path="home" component={ Home }/>
<Route path="about" component={ About }/>
<Route path="contact" component={ Contact }/>
Expand Down
27 changes: 27 additions & 0 deletions webpack/components/pages/ComingSoon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { PageHeader } from 'react-bootstrap-4';

import { comingSoon } from '../../copy/coming_soon.js';
import DMLButton from '../shared/DMLButton.jsx';

export default class ComingSoon extends React.Component {
render() {
return (
<div className="coming-soon-content">
<PageHeader className="title">{ comingSoon.title }</PageHeader>

<div className="dml-logo"></div>

<h2>{ comingSoon.tagline }</h2>

<div dangerouslySetInnerHTML={ comingSoon.description } />

<DMLButton buttonText={ comingSoon.callToActionText } buttonURL={ comingSoon.callToActionURL } />

<div dangerouslySetInnerHTML={ comingSoon.moreInfo } />

<a href="http://empowerhack.io#drawmylife"><img className="eh-logo" width="100" src="/assets/images/empowerhack-logo.png" /></a>
</div>
);
}
}
18 changes: 18 additions & 0 deletions webpack/components/shared/DMLButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';

export default class DMLButton extends React.Component {
static get propTypes() {
return {
buttonText: React.PropTypes.string,
buttonURL: React.PropTypes.string
};
}

render() {
return (
<button className="btn btn-primary dml-button" role="button">
<a href={ this.props.buttonURL }>{ this.props.buttonText }</a>
</button>
);
}
}
13 changes: 13 additions & 0 deletions webpack/copy/coming_soon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const comingSoon = {
title: 'Coming Soon',
tagline: 'A Perception of Migration Through Anonymised Children\'s Drawings & Data',
callToActionText: 'Contact Us',
callToActionURL: 'mailto:[email protected]',
description: {__html: `
<p>Draw My Life is inspired by how children's art therapy in the field can become a basis for better data around the needs and experience of refugee children.</p>
`},
moreInfo: {__html: `
<p>More about Draw My Life and other projects at <a href="http://empowerhack.io/#drawmylife">EmpowerHack</a></p>
`},
footerLine: 'Photo credit: Rachel Unkovic, International Rescue Committee (via Flickr)'
};

0 comments on commit 9741ca1

Please sign in to comment.