2015-10-20 19:28:28 -04:00
|
|
|
var omit = require('lodash.omit');
|
2015-09-09 22:16:03 -04:00
|
|
|
var React = require('react');
|
2015-10-16 11:04:01 -04:00
|
|
|
var ReactIntl = require('react-intl');
|
|
|
|
var FormattedMessage = ReactIntl.FormattedMessage;
|
|
|
|
var FormattedHTMLMessage = ReactIntl.FormattedHTMLMessage;
|
2015-09-09 22:16:03 -04:00
|
|
|
var Modal = require('../modal/modal.jsx');
|
|
|
|
|
|
|
|
require('./intro.scss');
|
|
|
|
|
|
|
|
Modal.setAppElement(document.getElementById('view'));
|
|
|
|
|
2015-10-08 16:18:12 -04:00
|
|
|
var Intro = React.createClass({
|
2015-10-09 16:16:37 -04:00
|
|
|
type: 'Intro',
|
2015-09-09 22:16:03 -04:00
|
|
|
propTypes: {
|
|
|
|
projectCount: React.PropTypes.number
|
|
|
|
},
|
2015-09-10 15:00:07 -04:00
|
|
|
getDefaultProps: function () {
|
2015-09-09 22:16:03 -04:00
|
|
|
return {
|
|
|
|
projectCount: 10569070
|
|
|
|
};
|
|
|
|
},
|
|
|
|
getInitialState: function () {
|
|
|
|
return {
|
|
|
|
videoOpen: false
|
|
|
|
};
|
|
|
|
},
|
|
|
|
showVideo: function () {
|
|
|
|
this.setState({videoOpen: true});
|
|
|
|
},
|
|
|
|
closeVideo: function () {
|
|
|
|
this.setState({videoOpen: false});
|
|
|
|
},
|
|
|
|
render: function () {
|
2015-10-20 19:28:28 -04:00
|
|
|
var frameSettings = {
|
|
|
|
width: 570,
|
|
|
|
height: 357,
|
|
|
|
padding: 15
|
|
|
|
};
|
2015-09-09 22:16:03 -04:00
|
|
|
return (
|
2015-09-11 09:43:10 -04:00
|
|
|
<div className="intro">
|
2015-09-09 22:16:03 -04:00
|
|
|
<div className="content">
|
|
|
|
<h1>
|
2015-10-16 11:04:01 -04:00
|
|
|
<FormattedHTMLMessage
|
|
|
|
id='intro.tagLine'
|
|
|
|
defaultMessage={
|
|
|
|
'Create stories, games, and animations<br /> ' +
|
|
|
|
'Share with others around the world'
|
|
|
|
} />
|
2015-09-09 22:16:03 -04:00
|
|
|
</h1>
|
|
|
|
<div className="sprites">
|
2015-09-11 09:43:10 -04:00
|
|
|
<a className="sprite sprite-1" href="/projects/editor/?tip_bar=getStarted">
|
2015-09-09 22:16:03 -04:00
|
|
|
<img
|
2015-09-11 09:43:10 -04:00
|
|
|
className="costume costume-1"
|
|
|
|
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-a.png" />
|
2015-09-09 22:16:03 -04:00
|
|
|
<img
|
2015-09-11 09:43:10 -04:00
|
|
|
className="costume costume-2"
|
|
|
|
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-b.png" />
|
|
|
|
<div className="circle"></div>
|
2015-10-16 11:04:01 -04:00
|
|
|
<div className="text">
|
|
|
|
<FormattedMessage
|
|
|
|
id='intro.tryItOut'
|
|
|
|
defaultMessage='TRY IT OUT' />
|
|
|
|
</div>
|
2015-09-09 22:16:03 -04:00
|
|
|
</a>
|
2015-09-11 09:43:10 -04:00
|
|
|
<a className="sprite sprite-2" href="/starter_projects/">
|
2015-09-09 22:16:03 -04:00
|
|
|
<img
|
2015-09-11 09:43:10 -04:00
|
|
|
className="costume costume-1"
|
|
|
|
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-a.png" />
|
2015-09-09 22:16:03 -04:00
|
|
|
<img
|
2015-09-11 09:43:10 -04:00
|
|
|
className="costume costume-2"
|
|
|
|
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-b.png" />
|
|
|
|
<div className="circle"></div>
|
2015-10-16 11:04:01 -04:00
|
|
|
<div className="text">
|
|
|
|
<FormattedMessage
|
|
|
|
id='intro.seeExamples'
|
|
|
|
defaultMessage='SEE EXAMPLES' />
|
|
|
|
</div>
|
2015-09-09 22:16:03 -04:00
|
|
|
</a>
|
2015-09-11 09:43:10 -04:00
|
|
|
<a className="sprite sprite-3" href="#">
|
2015-09-09 22:16:03 -04:00
|
|
|
<img
|
2015-09-11 09:43:10 -04:00
|
|
|
className="costume costume-1"
|
|
|
|
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-a.png" />
|
2015-09-09 22:16:03 -04:00
|
|
|
<img
|
2015-09-11 09:43:10 -04:00
|
|
|
className="costume costume-2"
|
|
|
|
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-b.png" />
|
|
|
|
<div className="circle"></div>
|
2015-10-16 11:04:01 -04:00
|
|
|
<div className="text">
|
|
|
|
<FormattedMessage
|
|
|
|
id='intro.joinScratch'
|
|
|
|
defaultMessage='JOIN SCRATCH' />
|
|
|
|
</div>
|
2015-09-11 09:43:10 -04:00
|
|
|
<div className="text subtext">( it’s free )</div>
|
2015-09-09 22:16:03 -04:00
|
|
|
</a>
|
|
|
|
</div>
|
2015-09-11 09:43:10 -04:00
|
|
|
<div className="description">
|
2015-09-09 22:16:03 -04:00
|
|
|
A creative learning community with
|
2015-09-11 09:43:10 -04:00
|
|
|
<span className="project-count"> {this.props.projectCount.toLocaleString()} </span>
|
2015-09-09 22:16:03 -04:00
|
|
|
projects shared
|
|
|
|
</div>
|
2015-09-11 09:43:10 -04:00
|
|
|
<div className="links">
|
2015-10-16 11:04:01 -04:00
|
|
|
<a href="/about/">
|
|
|
|
<FormattedMessage
|
|
|
|
id='intro.aboutScratch'
|
|
|
|
defaultMessage='ABOUT SCRATCH' />
|
|
|
|
</a>
|
|
|
|
<a href="/educators/">
|
|
|
|
<FormattedMessage
|
|
|
|
id='intro.forEducators'
|
|
|
|
defaultMessage='FOR EDUCATORS' />
|
|
|
|
</a>
|
|
|
|
<a className="last" href="/parents/">
|
|
|
|
<FormattedMessage
|
|
|
|
id='intro.forParents'
|
|
|
|
defaultMessage='FOR PARENTS' />
|
|
|
|
</a>
|
2015-09-09 22:16:03 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-09-11 09:43:10 -04:00
|
|
|
<div className="video">
|
|
|
|
<div className="play-button" onClick={this.showVideo}></div>
|
|
|
|
<img src="//cdn.scratch.mit.edu/scratchr2/static/images/hp-video-screenshot.png" />
|
2015-09-09 22:16:03 -04:00
|
|
|
</div>
|
|
|
|
<Modal
|
2015-10-20 19:35:19 -04:00
|
|
|
className="video-modal"
|
|
|
|
isOpen={this.state.videoOpen}
|
|
|
|
onRequestClose={this.closeVideo}
|
|
|
|
frameSettings={frameSettings}>
|
|
|
|
<iframe
|
|
|
|
src="//player.vimeo.com/video/65583694?title=0&byline=0&portrait=0"
|
|
|
|
{...omit(frameSettings, 'padding')} />
|
2015-09-09 22:16:03 -04:00
|
|
|
</Modal>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
2015-10-08 16:18:12 -04:00
|
|
|
|
|
|
|
module.exports = Intro;
|