Merge pull request #1259 from mewtaylor/release/april-fools-rollback

[Master] Hotfix: Revert those changes we did last week
This commit is contained in:
Matthew Taylor 2017-04-03 15:05:40 -04:00 committed by GitHub
commit 3ea65161de
9 changed files with 10 additions and 259 deletions

View file

@ -37,10 +37,6 @@ $pass-bg: $ui-aqua;
color: $ui-blue;
}
&.mod-aqua {
background-color: $ui-aqua;
}
&.pass {
background-color: $pass-bg;
}

View file

@ -1,51 +0,0 @@
var classNames = require('classnames');
var FormattedMessage = require('react-intl').FormattedMessage;
var React = require('react');
var Button = require('../../../components/forms/button.jsx');
var FlexRow = require('../../../components/flex-row/flex-row.jsx');
require('./hoc-event-row.scss');
var HocEventRow = React.createClass({
type: 'HocEventRow',
propTypes: {
onDismiss: React.PropTypes.func
},
render: function () {
var classes = classNames(
'hoc-event',
this.props.className
);
return (
<div
className={classes}
style={{
minHeight: this.props.minHeight
}}
>
<Button
className="mod-hoc-event-dismiss"
onClick={this.props.onDismiss}
>
<FormattedMessage id="hocevent.dismiss" />
<img
className="hoc-event-dismiss-icon"
src="/svgs/modal/close-x.svg"
alt="close-icon"
/>
</Button>
<FlexRow className="mod-hoc-event">
<h1 className="hoc-event-studio-h1">
<FormattedMessage id="hocevent.title" />
</h1>
<a href="/studios/3910789/" className="button mod-aqua mod-hoc-event">
<FormattedMessage id="hocevent.studioLink" />
</a>
</FlexRow>
</div>
);
}
});
module.exports = HocEventRow;

View file

@ -1,163 +0,0 @@
@import "../../../colors";
@import "../../../frameless";
.hoc-event {
position: relative;
transition: min-height 1s;
opacity: .9;
margin: 0 auto 20px;
border-radius: 1rem;
background-color: $ui-blue;
width: $cols12;
min-height: 18rem;
}
.hoc-event.mod-1 {
min-height: 25rem;
}
.hoc-event.mod-2 {
min-height: 32rem;
}
.hoc-event:after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: .5;
z-index: -1;
border-radius: 1rem;
background: url("/images/splash/xl--no-ui.png") no-repeat;
content: "";
}
.flex-row.mod-hoc-event {
padding: 3rem 5rem 2.5rem;
flex-direction: column;
justify-content: center;
}
.button.mod-hoc-event-dismiss {
position: absolute;
top: .5rem;
right: .5rem;
margin: 0;
border: 1px solid $type-white;
border-radius: 2rem;
box-shadow: none;
background-color: transparent;
padding: .25rem .75rem;
color: $type-white;
font-weight: 300;
}
.hoc-event-dismiss-icon {
margin-left: .25rem;
width: .8rem;
vertical-align: middle;
}
.hoc-event-studio-h1 {
margin-bottom: 9rem;
line-height: 2.5rem;
color: $type-white;
}
.button.mod-hoc-event {
padding: .75rem 1.75rem;
color: $type-white;
}
.hoc-event-studio,
.hoc-event-video-iframe {
width: 23.75rem;
}
@media only screen and (max-width: $mobile - 1) {
.hoc-event {
width: $cols4;
min-height: 30rem;
}
.hoc-event.mod-1 {
min-height: 26rem;
}
.hoc-event.mod-2 {
min-height: 24rem;
}
.hoc-event:after {
background: url("/images/splash/sm--no-ui.png") no-repeat;
}
.flex-row.mod-hoc-event {
padding: 3.5rem 2rem 2rem;
}
.hoc-event-studio,
.hoc-event-video-iframe {
width: 13.75rem;
}
.hoc-event-studio {
margin-bottom: 1rem;
}
.hoc-event-studio-h1 {
margin-bottom: 8rem;
}
}
@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) {
.hoc-event {
width: $cols6;
min-height: 28rem;
}
.hoc-event.mod-1 {
min-height: 24rem;
}
.hoc-event.mod-2 {
min-height: 22rem;
}
.hoc-event:after {
background: url("/images/splash/md--no-ui.png") no-repeat;
}
.flex-row.mod-hoc-event {
padding: 3.5rem 2.5rem 1.5rem;
}
.hoc-event-studio {
margin-bottom: 1rem;
}
.hoc-event-studio-h1 {
margin-bottom: 10rem;
}
}
@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) {
.hoc-event {
width: $cols8;
}
.hoc-event:after {
background: url("/images/splash/lg--no-ui.png") no-repeat;
}
.hoc-event-studio {
width: 14.625rem;
text-align: left;
}
.hoc-event-video-iframe {
width: 18.375rem;
height: 10rem;
}
}

View file

@ -28,10 +28,6 @@
"teacherbanner.classesButton": "My Classes",
"teacherbanner.faqButton": "Teacher Account FAQ",
"hocevent.dismiss": "Dismiss",
"hocevent.title": "Mascots In Training",
"hocevent.studioLink": "Create Your Mascot!",
"welcome.welcomeToScratch": "Welcome to Scratch!",
"welcome.learn": "Learn how to make a project in Scratch",
"welcome.tryOut": "Try out starter projects",

View file

@ -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 HocEventRow = require('./hoc-event-row/hoc-event-row.jsx');
var Intro = require('../../components/intro/intro.jsx');
var IframeModal = require('../../components/modal/iframe/modal.jsx');
var News = require('../../components/news/news.jsx');
@ -37,9 +36,7 @@ var Splash = injectIntl(React.createClass({
featuredCustom: {}, // custom homepage rows, such as "Projects by Scratchers I'm Following"
featuredGlobal: {}, // global homepage rows, such as "Featured Projects"
showEmailConfirmationModal: true, // flag that determines whether to show banner to request email conf.
refreshCacheStatus: 'notrequested',
numCloseTries: 0,
bannerHeightClass: 'mod-0'
refreshCacheStatus: 'notrequested'
};
},
getDefaultProps: function () {
@ -54,8 +51,6 @@ var Splash = injectIntl(React.createClass({
this.getActivity();
this.getFeaturedCustom();
this.getNews();
this.setState({numCloseTries: 0});
this.setState({bannerHeightClass: 'mod-0'});
} else {
this.setState({featuredCustom: []});
this.setState({activity: []});
@ -173,28 +168,15 @@ var Splash = injectIntl(React.createClass({
this.setState({emailConfirmationModalOpen: false});
},
handleDismiss: function (cue) {
var newNumTries = this.state.numCloseTries + 1;
if (cue === 'show_april_fools') {
if (newNumTries > 2) {
return;
}
this.setState({
numCloseTries: newNumTries,
bannerHeightClass: 'mod-' + newNumTries
});
}
if (newNumTries > 1 || cue !== 'show_april_fools') {
api({
host: '',
uri: '/site-api/users/set-template-cue/',
method: 'post',
useCsrf: true,
json: {cue: cue, value: false}
}, function (err) {
if (!err) this.props.dispatch(sessionActions.refreshSession());
}.bind(this));
}
api({
host: '',
uri: '/site-api/users/set-template-cue/',
method: 'post',
useCsrf: true,
json: {cue: cue, value: false}
}, function (err) {
if (!err) this.props.dispatch(sessionActions.refreshSession());
}.bind(this));
},
shouldShowWelcome: function () {
if (!this.props.session.session.user || !this.props.session.session.flags.show_welcome) return false;
@ -225,15 +207,6 @@ var Splash = injectIntl(React.createClass({
</Box>
];
if (this.props.session.session.user && this.props.session.session.flags.show_april_fools) {
rows.push(
<HocEventRow
onDismiss={this.handleDismiss.bind(this, 'show_april_fools')}
className={this.state.bannerHeightClass}
/>
);
}
if (this.state.featuredGlobal.curator_top_projects &&
this.state.featuredGlobal.curator_top_projects.length > 4) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB