-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/gh-981' into release/hoc-nov-21
* feature/gh-981: Add hoc banner Move padding to splash element trello-ize title banner h1,p styling # Conflicts: # src/components/title-banner/title-banner.scss # src/views/hoc/hoc.jsx
- Loading branch information
Showing
19 changed files
with
217 additions
and
34 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
&.title-banner { | ||
transition: none; | ||
margin-bottom: 20px; | ||
margin-bottom: 0; | ||
text-align: left; | ||
|
||
h3, | ||
|
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
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,115 @@ | ||
var FormattedMessage = require('react-intl').FormattedMessage; | ||
var injectIntl = require('react-intl').injectIntl; | ||
var MediaQuery = require('react-responsive'); | ||
var React = require('react'); | ||
|
||
var FlexRow = require('../../../components/flex-row/flex-row.jsx'); | ||
var TitleBanner = require('../../../components/title-banner/title-banner.jsx'); | ||
var TTTModal = require('../../../components/modal/ttt/modal.jsx'); | ||
var TTTTile = require('../../../components/ttt-tile/ttt-tile.jsx'); | ||
|
||
var frameless = require('../../../lib/frameless'); | ||
var tiles = require('../../thingstotry/ttt'); | ||
|
||
require('../../../components/forms/button.scss'); | ||
require('./hoc-banner.scss'); | ||
|
||
var HocBanner = injectIntl(React.createClass({ | ||
getInitialState: function () { | ||
return { | ||
currentTile: tiles[1], | ||
TTTModalOpen: false | ||
}; | ||
}, | ||
showTTTModal: function (tile) { | ||
return this.setState({ | ||
currentTile: tile, | ||
TTTModalOpen: true | ||
}); | ||
}, | ||
hideTTTModal: function () { | ||
return this.setState({TTTModalOpen: false}); | ||
}, | ||
renderTTTTiles: function () { | ||
var formatMessage = this.props.intl.formatMessage; | ||
|
||
var tileObjects = { | ||
flyTile: { | ||
title: formatMessage({id: tiles[1].title}), | ||
description: formatMessage({id: tiles[1].description}), | ||
tutorialLoc: tiles[1].tutorialLoc, | ||
activityLoc: formatMessage({id: tiles[1].activityLoc}), | ||
guideLoc: formatMessage({id: tiles[1].guideLoc}), | ||
thumbUrl: tiles[1].thumbUrl, | ||
bannerUrl: tiles[1].bannerUrl | ||
}, | ||
nameTile: { | ||
title: formatMessage({id: tiles[0].title}), | ||
description: formatMessage({id: tiles[0].description}), | ||
tutorialLoc: tiles[0].tutorialLoc, | ||
activityLoc: formatMessage({id: tiles[0].activityLoc}), | ||
guideLoc: formatMessage({id: tiles[0].guideLoc}), | ||
thumbUrl: tiles[0].thumbUrl, | ||
bannerUrl: tiles[0].bannerUrl | ||
}, | ||
musicTile: { | ||
title: formatMessage({id: tiles[2].title}), | ||
description: formatMessage({id: tiles[2].description}), | ||
tutorialLoc: tiles[2].tutorialLoc, | ||
activityLoc: formatMessage({id: tiles[2].activityLoc}), | ||
guideLoc: formatMessage({id: tiles[2].guideLoc}), | ||
thumbUrl: tiles[2].thumbUrl, | ||
bannerUrl: tiles[2].bannerUrl | ||
} | ||
}; | ||
|
||
return [ | ||
<TTTTile | ||
key={1} | ||
className="mod-banner" | ||
onGuideClick={this.showTTTModal.bind(this, tileObjects.flyTile)} | ||
{...tileObjects.flyTile} | ||
/>, | ||
<TTTTile | ||
key={0} | ||
className="mod-banner" | ||
onGuideClick={this.showTTTModal.bind(this, tileObjects.nameTile)} | ||
{...tileObjects.nameTile} | ||
/>, | ||
<TTTTile | ||
key={2} | ||
className="mod-banner" | ||
onGuideClick={this.showTTTModal.bind(this, tileObjects.musicTile)} | ||
{...tileObjects.musicTile} | ||
/> | ||
]; | ||
}, | ||
render: function () { | ||
return ( | ||
<TitleBanner className="mod-splash-hoc"> | ||
<div className="hoc-banner inner"> | ||
<FlexRow className="hoc-banner-header"> | ||
<h1 className="hoc-banner-header-h1"> | ||
<FormattedMessage id="hoc-banner.header" /> | ||
</h1> | ||
<a href="/go" className="button mod-ttt-try-button"> | ||
<FormattedMessage id="hoc-banner.ttt" /> | ||
</a> | ||
</FlexRow> | ||
<MediaQuery minWidth={frameless.desktop}> | ||
<FlexRow className="hoc-banner-tiles"> | ||
{this.renderTTTTiles()} | ||
</FlexRow> | ||
<TTTModal | ||
isOpen={this.state.TTTModalOpen} | ||
onRequestClose={this.hideTTTModal} | ||
{...this.state.currentTile} | ||
/> | ||
</MediaQuery> | ||
</div> | ||
</TitleBanner> | ||
); | ||
} | ||
})); | ||
|
||
module.exports = HocBanner; |
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,28 @@ | ||
@import "../../../colors"; | ||
|
||
.title-banner.mod-splash-hoc { | ||
background: url("/images/blocks-pattern.png"); | ||
background-color: $ui-blue; | ||
background-repeat: repeat; | ||
background-size: 180px 180px; | ||
} | ||
|
||
.hoc-banner-header { | ||
justify-content: space-between; | ||
} | ||
|
||
.hoc-banner-header-h1 { | ||
margin-bottom: 1.25rem; | ||
color: $type-white; | ||
} | ||
|
||
.mod-ttt-try-button:link, | ||
.mod-ttt-try-button:visited, | ||
.mod-ttt-try-button:active | ||
.mod-ttt-try-button:hover { | ||
color: $type-white; | ||
} | ||
|
||
.ttt-tile.mod-banner { | ||
background-color: $background-color; | ||
} |
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,8 @@ | ||
{ | ||
"ttt.MakeItFlyActivityLoc": "/pdfs/cards/FlyCards.pdf", | ||
"ttt.MakeItFlyGuideLoc": "/pdfs/guides/FlyGuide.pdf", | ||
"ttt.AnimateYourNameActivityLoc": "/pdfs/cards/AnimateYourNameCards.pdf", | ||
"ttt.AnimateYourNameGuideLoc": "/pdfs/guides/NameGuide.pdf", | ||
"ttt.MakeMusicActivityLoc": "/pdfs/cards/MusicCards.pdf", | ||
"ttt.MakeMusicGuideLoc": "/pdfs/guides/MusicGuide.pdf" | ||
} |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.