scratch-www/src/components/intro/intro.jsx

94 lines
4 KiB
React
Raw Normal View History

var React = require('react');
var Modal = require('../modal/modal.jsx');
require('./intro.scss');
Modal.setAppElement(document.getElementById('view'));
module.exports = React.createClass({
propTypes: {
projectCount: React.PropTypes.number
},
2015-09-10 15:00:07 -04:00
getDefaultProps: function () {
return {
projectCount: 10569070
};
},
getInitialState: function () {
return {
videoOpen: false
};
},
showVideo: function () {
this.setState({videoOpen: true});
},
closeVideo: function () {
this.setState({videoOpen: false});
},
render: function () {
return (
2015-09-11 09:43:10 -04:00
<div className="intro">
<div className="content">
<h1>
Create stories, games, and animations<br />
Share with others around the world
</h1>
<div className="sprites">
2015-09-11 09:43:10 -04:00
<a className="sprite sprite-1" href="/projects/editor/?tip_bar=getStarted">
<img
2015-09-11 09:43:10 -04:00
className="costume costume-1"
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-a.png" />
<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>
<div className="text">TRY IT OUT</div>
</a>
2015-09-11 09:43:10 -04:00
<a className="sprite sprite-2" href="/starter_projects/">
<img
2015-09-11 09:43:10 -04:00
className="costume costume-1"
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-a.png" />
<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>
<div className="text">SEE EXAMPLES</div>
</a>
2015-09-11 09:43:10 -04:00
<a className="sprite sprite-3" href="#">
<img
2015-09-11 09:43:10 -04:00
className="costume costume-1"
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-a.png" />
<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>
<div className="text">JOIN SCRATCH</div>
<div className="text subtext">( it&rsquo;s free )</div>
</a>
</div>
2015-09-11 09:43:10 -04:00
<div className="description">
A creative learning community with
2015-09-11 09:43:10 -04:00
<span className="project-count"> {this.props.projectCount.toLocaleString()} </span>
projects shared
</div>
2015-09-11 09:43:10 -04:00
<div className="links">
<a href="/about/">ABOUT SCRATCH</a>
<a href="/educators/">FOR EDUCATORS</a>
<a className="last" href="/parents/">FOR PARENTS</a>
</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" />
</div>
<Modal
2015-09-11 09:43:10 -04:00
className="video-modal"
isOpen={this.state.videoOpen}
onRequestClose={this.closeVideo}>
2015-09-11 09:43:10 -04:00
<iframe src="//player.vimeo.com/video/65583694?title=0&amp;byline=0&amp;portrait=0" />
</Modal>
</div>
);
}
});