From 3c3f1c2f8fb814247a163389dbb89c5aa7f17e2d Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 15 Dec 2016 15:58:29 -0500 Subject: [PATCH] Remove HOC Banner Reverts #1073 --- src/views/splash/hoc-banner/hoc-banner.jsx | 115 -------------------- src/views/splash/hoc-banner/hoc-banner.scss | 48 -------- src/views/splash/l10n-static.json | 8 -- src/views/splash/l10n.json | 17 --- src/views/splash/splash.jsx | 2 - 5 files changed, 190 deletions(-) delete mode 100644 src/views/splash/hoc-banner/hoc-banner.jsx delete mode 100644 src/views/splash/hoc-banner/hoc-banner.scss delete mode 100644 src/views/splash/l10n-static.json diff --git a/src/views/splash/hoc-banner/hoc-banner.jsx b/src/views/splash/hoc-banner/hoc-banner.jsx deleted file mode 100644 index d24124601..000000000 --- a/src/views/splash/hoc-banner/hoc-banner.jsx +++ /dev/null @@ -1,115 +0,0 @@ -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 = { - 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 - }, - 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 - }, - 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 [ - , - , - - ]; - }, - render: function () { - return ( - -
- -

- -

- - - -
- - - {this.renderTTTTiles()} - - - -
-
- ); - } -})); - -module.exports = HocBanner; diff --git a/src/views/splash/hoc-banner/hoc-banner.scss b/src/views/splash/hoc-banner/hoc-banner.scss deleted file mode 100644 index d2b8c1246..000000000 --- a/src/views/splash/hoc-banner/hoc-banner.scss +++ /dev/null @@ -1,48 +0,0 @@ -@import "../../../colors"; -@import "../../../frameless"; - -.title-banner.mod-splash-hoc { - background: url("/images/blocks-pattern.png"); - background-color: $ui-blue; - background-repeat: repeat; - background-size: 180px 180px; -} - -.flex-row.mod-hoc-banner-header, -.flex-row.mod-hoc-banner-tiles { - justify-content: space-between; -} - -.flex-row.mod-hoc-banner-header { - margin-bottom: 1.25rem; -} - -.hoc-banner-header-h1 { - color: $type-white; -} - -.button.mod-ttt-try-button { - padding: .75rem 2rem; -} - -.button.mod-ttt-try-button, -.button.mod-ttt-try-button:hover { - box-shadow: none; -} - -.button.mod-ttt-try-button:link, -.button.mod-ttt-try-button:visited, -.button.mod-ttt-try-button:active -.button.mod-ttt-try-button:hover { - color: $type-white; -} - -.ttt-tile.mod-banner { - background-color: $background-color; -} - -@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) { - .flex-row.mod-hoc-banner-header { - flex-direction: column; - } -} diff --git a/src/views/splash/l10n-static.json b/src/views/splash/l10n-static.json deleted file mode 100644 index 212badcfe..000000000 --- a/src/views/splash/l10n-static.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "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" -} \ No newline at end of file diff --git a/src/views/splash/l10n.json b/src/views/splash/l10n.json index 9bfede0ea..976f9e450 100644 --- a/src/views/splash/l10n.json +++ b/src/views/splash/l10n.json @@ -28,23 +28,6 @@ "teacherbanner.classesButton": "My Classes", "teacherbanner.faqButton": "Teacher Account FAQ", - "hoc-banner.header": "Get Creative with Coding", - "hoc-banner.ttt": "See things to try", - "ttt.tutorialTitle": "Tutorial", - "ttt.tutorialSubtitle": "Find out how to make this project using a step-by-step tutorial in Scratch.", - "ttt.activityTitle": "Activity Cards", - "ttt.activitySubtitle": "Explore new coding ideas using this set of illustrated cards you can print out.", - "ttt.educatorTitle": "Educator Guide", - "ttt.educatorSubtitle": "Use this educator guide to plan and lead a one-hour Scratch workshop.", - "ttt.tryIt": "Try It", - "ttt.open": "Open", - "ttt.download": "Download", - "ttt.MakeItFlyTitle": "Make It Fly", - "ttt.MakeItFlyDescription": "Animate the Scratch Cat, The Powerpuff Girls, or even a taco!", - "ttt.AnimateYourNameTitle": "Animate Your Name", - "ttt.AnimateYourNameDescription": "Animate the letters of your name, initials, or favorite word.", - "ttt.MakeMusicTitle": "Make Music", - "ttt.MakeMusicDescription": "Choose instruments, add sounds, and press keys to play music.", "hocevent.dismiss": "Dismiss", "hocevent.title": "Design and share your own character", "hocevent.studioLink": "See the studio", diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 1049136d9..5bfcd5902 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -14,7 +14,6 @@ var DropdownBanner = require('../../components/dropdown-banner/banner.jsx'); var Box = require('../../components/box/box.jsx'); var Button = require('../../components/forms/button.jsx'); var Carousel = require('../../components/carousel/carousel.jsx'); -var HocBanner = require('./hoc-banner/hoc-banner.jsx'); var HocEventRow = require('./hoc-event-row/hoc-event-row.jsx'); var Intro = require('../../components/intro/intro.jsx'); var IframeModal = require('../../components/modal/iframe/modal.jsx'); @@ -376,7 +375,6 @@ var Splash = injectIntl(React.createClass({ {this.props.permissions.educator ? [ ] : []} -
{this.props.session.status === sessionActions.Status.FETCHED ? ( this.props.session.session.user ? [