Commit 040d1a4d authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

Merge pull request #943 from LLK/release/2.2.13

[Master] Release 2.2.13
parents bf101763 6bcc7eea
......@@ -19,7 +19,7 @@ We’re currently building Scratch using [React](https://facebook.github.io/reac
### Before Getting Started
* make sure you have node and npm [installed](https://docs.npmjs.com/getting-started/installing-node)
* Make sure you have node (v4.2 or higher) and npm [installed](https://docs.npmjs.com/getting-started/installing-node)
### To Build
```bash
......
......@@ -61,7 +61,7 @@
"ro": "Română",
"ru": "Русский",
"sc": "Sardu",
"sq": "Shqiptar",
"sq": "Shqip",
"sk": "Slovenčina",
"sl": "Slovenščina",
"sr": "Српски",
......
var defaults = require('lodash.defaults');
var fs = require('fs');
var mustache = require('mustache');
var render = function (template, route, config) {
config = config || {};
// Route definition
defaults(route, config);
// Render template
return mustache.render(template, route);
};
function MustacheRendererPlugin (options) {
if (!options.templatePath) throw new Error('MustacheRendererPlugin requires a templatePath option');
// Read template
var template = fs.readFileSync(options.templatePath, 'utf8');
this.template = template;
this.routes = options.routes || {};
this.config = options.config || {};
return this;
}
MustacheRendererPlugin.prototype.apply = function (compiler) {
var template = this.template;
var config = this.config;
var routes = this.routes;
compiler.plugin('emit', function (compilation, callback) {
var outputRoutes = {};
routes.forEach(function (route) {
var filename = route.name + '.html';
var content = render(template, route, config);
outputRoutes[route.pattern] = filename;
compilation.assets[filename] = {
source: function () {return content;},
size: function () {return content.length;}
};
});
var routeJson = JSON.stringify(outputRoutes);
compilation.assets['routes.json'] = {
source: function () {return routeJson;},
size: function () {return routeJson.length;}
};
callback();
});
};
module.exports = MustacheRendererPlugin;
......@@ -20,3 +20,8 @@
}
}
}
.row-label {
margin-bottom: .75rem;
line-height: 1.7rem;
}
......@@ -40,7 +40,7 @@ var Microworld = React.createClass({
return (
<div className="videos-section section">
<h1>Get Inspired...</h1>
<h1 className="sectionheader">Get Inspired...</h1>
<div className="videos-container">
<div className="videos">
{videos.map(this.renderVideo)}
......@@ -81,10 +81,7 @@ var Microworld = React.createClass({
}
return (
<div className="editor section">
<h1>Start Creating!</h1>
<a href={'//scratch.mit.edu/projects/'+ projectId +'/#editor'}>
<img className="scratch-link" src="/images/scratch-og.png"></img>
</a>
<h1 className="sectionheader">Start Creating!</h1>
<iframe src={'//scratch.mit.edu/projects/embed-editor/' + projectId + '/?isMicroworld=true'}
frameBorder="0"> </iframe>
{this.renderTips()}
......@@ -115,7 +112,7 @@ var Microworld = React.createClass({
return (
<div className="project-ideas">
<h1>Check out ideas for more projects</h1>
<h1 className="sectionheader">Check out ideas for more projects</h1>
<Box
title="More Starter Projects"
key="starter_projects">
......@@ -156,8 +153,8 @@ var Microworld = React.createClass({
return null;
}
return (
<div className="project-ideas">
<h1>Get inspiration from other projects</h1>
<div className="project-ideas section">
<h1 className="sectionheader">Get inspiration from other projects</h1>
{rows}
</div>
);
......@@ -169,7 +166,7 @@ var Microworld = React.createClass({
return (
<div className="forum">
<h1>Chat with others!</h1>
<h1 className="sectionheader">Chat with others!</h1>
<img src="/images/forum-image.png"/>
</div>
);
......@@ -185,7 +182,7 @@ var Microworld = React.createClass({
if (designChallenge.project_id) {
return (
<div className="side-by-side section">
<h1>Join our Design Challenge!</h1>
<h1 className="sectionheader">Join our Design Challenge!</h1>
<div className="design-studio">
<iframe src={'https://scratch.mit.edu/projects/' + designChallenge.project_id +
'/#fullscreen'} frameBorder="0"> </iframe>
......@@ -208,7 +205,7 @@ var Microworld = React.createClass({
} else {
return (
<div className="section">
<h1>Join our Design Challenge!</h1>
<h1 className="sectionheader">Join our Design Challenge!</h1>
<Box
title="design Challenge Projects"
key="scratch_design_studio"
......@@ -225,7 +222,7 @@ var Microworld = React.createClass({
return (
<div className="inner microworld">
<div className="top-banner section">
<h1>{this.props.microworldData.title}</h1>
<h1 className="sectionheader">{this.props.microworldData.title}</h1>
<p>{this.props.microworldData.description.join(' ')}</p>
</div>
{this.renderVideos()}
......
......@@ -9,6 +9,13 @@ $base-bg: $ui-white;
}
.microworld {
.sectionheader {
margin: 0 auto;
padding: 5px 10%;
text-align: center;
color: $type-gray;
}
.top-banner,
.videos-section,
.section {
......@@ -140,6 +147,10 @@ $base-bg: $ui-white;
.design-studio-projects {
float: right;
.box {
width: 100%;
}
}
.design-studio {
......
......@@ -91,6 +91,13 @@ module.exports = {
},
validateUsername: function (username, callback) {
callback = callback || function () {};
if (!username) {
this.refs.form.refs.formsy.updateInputsWithError({
'user.username': formatMessage({id: 'teacherRegistration.validationRequired'})
});
return callback(false);
}
api({
host: '',
uri: '/accounts/check_username/' + username + '/'
......@@ -734,8 +741,15 @@ module.exports = {
required /> :
[]
}
<Input label={formatMessage({id: 'teacherRegistration.zipCode'})}
type="text"
<b className="row-label">
<intl.FormattedMessage id="teacherRegistration.zipCode" />
</b>
{this.state.countryChoice !== 'us' ?
<p className="help-text">
<intl.FormattedMessage id="teacherRegistration.notRequired" />
</p> : []
}
<Input type="text"
name="address.zip"
validations={{
maxLength: 10
......@@ -745,7 +759,7 @@ module.exports = {
id: 'registration.validationMaxLength'
})
}}
required />
required={(this.state.countryChoice === 'us') ? true : 'isFalse'} />
<GeneralError name="all" />
<NextStepButton waiting={this.props.waiting || this.state.waiting}
text={<intl.FormattedMessage id="registration.nextStep" />} />
......
......@@ -69,12 +69,6 @@
"general.studios": "Studios",
"general.support": "Support",
"general.tipsWindow": "Tips Window",
"general.tipsAnimateYourNameTitle": "Animate Your Name",
"general.tipsBearstack": "Bearstack Story",
"general.tipsDanceTitle": "Dance, Dance, Dance",
"general.tipsGetStarted": "Getting Started",
"general.tipsHideAndSeekTitle": "Hide-and-Seek Game",
"general.tipsPongGame": "Create a Pong Game",
"general.termsOfUse": "Terms of Use",
"general.username": "Username",
"general.validationEmail": "Please enter a valid email address",
......
......@@ -212,5 +212,33 @@
"pattern": "^/explore/studios/?$",
"routeAlias": "/explore(?!/ajax)",
"redirect": "/explore/studios/all"
},
{
"name": "microworld-art",
"pattern": "^/microworlds/art",
"routeAlias": "/microworlds",
"view": "microworld/art/art",
"title": "Art"
},
{
"name": "microworld-hiphop",
"pattern": "^/microworlds/hiphop",
"routeAlias": "/microworlds",
"view": "microworld/hiphop/hiphop",
"title": "Hip Hop Dance"
},
{
"name": "microworld-fashion",
"pattern": "^/microworlds/fashion",
"routeAlias": "/microworlds",
"view": "microworld/fashion/fashion",
"title": "Fashion"
},
{
"name": "microworld-soccer",
"pattern": "^/microworlds/soccer",
"routeAlias": "/microworlds",
"view": "microworld/soccer/soccer",
"title": "Soccer"
}
]
/**
* Default options for the html-webpack-plugin HTML renderer
*
* See https://github.com/ampedandwired/html-webpack-plugin#configuration
* for possible options. Any other options will be available to the template
* under `htmlWebpackPlugin.options`
*/
module.exports = {
// html-webpack-plugin options
template: './src/template.ejs',
inject: false,
// Search and metadata
title: 'Imagine, Program, Share',
description:
......
......@@ -6,25 +6,25 @@
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width={{viewportWidth}}, initial-scale=1">
<meta name="viewport" content="width=<%= htmlWebpackPlugin.options.viewportWidth %>, initial-scale=1">
<title>Scratch - {{title}}</title>
<title>Scratch - <%= htmlWebpackPlugin.options.title %></title>
<!-- Prevent mobile Safari from making phone numbers -->
<meta name="format-detection" content="telephone=no">
<!-- Search & Open Graph-->
<meta name="description" content="{{description}}" />
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>" />
<meta name="google-site-verification" content="m_3TAXDreGTFyoYnEmU9mcKB4Xtw5mw6yRkuJtXRKxM" />
<meta property="og:url" content="https://scratch.mit.edu/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Scratch - {{title}}" />
<meta property="og:description" content="{{description}}" />
<meta property="og:image" content="{{&og_image}}" />
<meta property="og:image:type" content="{{&og_image_type}}" />
<meta property="og:image:width" content="{{&og_image_width}}" />
<meta property="og:image:height" content="{{&og_image_height}}" />
<meta property="og:title" content="Scratch - <%= htmlWebpackPlugin.options.title %>" />
<meta property="og:description" content="<%= htmlWebpackPlugin.options.description %>" />
<meta property="og:image" content="<%- htmlWebpackPlugin.options.og_image %>" />
<meta property="og:image:type" content="<%- htmlWebpackPlugin.options.og_image_type %>" />
<meta property="og:image:width" content="<%- htmlWebpackPlugin.options.og_image_width %>" />
<meta property="og:image:height" content="<%- htmlWebpackPlugin.options.og_image_height %>" />
<!-- Favicon & CSS normalize -->
<link rel="shortcut icon" href="/favicon.ico" />
......@@ -35,15 +35,17 @@
<!-- Analytics (GA) -->
<script>
/* eslint-disable */
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{&ga_tracker}}', {
ga('create', '<%- htmlWebpackPlugin.options.ga_tracker %>', {
'sampleRate': 10
});
ga('send', 'pageview');
/* eslint-enable */
</script>
</head>
......@@ -51,11 +53,11 @@
<div id="app"></div>
<!-- Vendor & Initialize (Session & Localization)-->
<script src="/js/common.bundle.js"></script>
<script src="/<%= htmlWebpackPlugin.files.chunks.common.entry %>"></script>
<!-- Scripts -->
<script src="/js/{{name}}.intl.js"></script>
<script src="/js/{{name}}.bundle.js"></script>
<script src="/js/<%= htmlWebpackPlugin.options.route.name %>.intl.js"></script>
<script src="/<%= htmlWebpackPlugin.files.chunks[htmlWebpackPlugin.options.route.name].entry %>"></script>
<!-- Translate title element -->
<script>
......@@ -65,7 +67,7 @@
loc = loc.split('-')[0];
}
if (typeof window._messages[loc] !== 'undefined') {
var localizedTitle = window._messages[loc]['general.' + '{{title}}'.toLowerCase()] || '';
var localizedTitle = window._messages[loc]['general.' + '<%= htmlWebpackPlugin.options.title %>'.toLowerCase()] || '';
if (localizedTitle.length > 0) {
document.title = 'Scratch - ' + localizedTitle;
}
......
......@@ -30,8 +30,9 @@ var ConferenceSplash = React.createClass({
</p>
<p className="sub-button">
<b>
<a href="http://bit.ly/scratchmit2016-live" target="_blank">
Watch the keynote live
<a href="https://youtu.be/alsfSTVn2es?list=PLpfxVARjkP-8chnTrjtDeo88Pcz6-xf_B"
target="_blank">
Watch videos of the keynote sessions
</a>
</b>
</p>
......
......@@ -80,11 +80,6 @@ var Credits = React.createClass({
<span className="name">Christan Balch</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/5721684_170x170.png" alt="Randy Avatar" />
<span className="name">Randy Jou</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/10866958_170x170.png" alt="Colby Avatar" />
<span className="name">Colby Gutierrez-Kraybill</span>
......@@ -95,18 +90,13 @@ var Credits = React.createClass({
<span className="name">Andrew Sliwinski</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/default_170x170.png" alt="Ben Avatar" />
<span className="name">Ben Berg</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/2286560_170x170.png" alt="Carmelo Avatar" />
<span className="name">Carmelo Presicce</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/default_170x170.png" alt="Moran Avatar" />
<img src="//cdn.scratch.mit.edu/get_image/user/2678986_170x170.png" alt="Moran Avatar" />
<span className="name">Moran Tsur</span>
</li>
......@@ -116,15 +106,10 @@ var Credits = React.createClass({
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/default_170x170.png" alt="Shruti Avatar" />
<img src="//cdn.scratch.mit.edu/get_image/user/3714374_170x170.png" alt="Shruti Avatar" />
<span className="name">Shruti Mohnot</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/1915915_170x170.png" alt="Hannah Avatar" />
<span className="name">Hannah Cole</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/1494_170x170.png" alt="Chris Avatar" />
<span className="name">Chris Garrity</span>
......@@ -134,6 +119,21 @@ var Credits = React.createClass({
<img src="//cdn.scratch.mit.edu/get_image/user/2796185_170x170.png" alt="Julia Avatar" />
<span className="name">Julia Zimmerman</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/246290_170x170.png" alt="Sarah Avatar" />
<span className="name">Sarah Otts</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/36977_170x170.png" alt="Connor Avatar" />
<span className="name">Connor Hudson</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/17618638_170x170.png" alt="Hanako Avatar" />
<span className="name">Hanako Tjia</span>
</li>
</ul>
<p>The team of Scratch moderators manages, supports, and improves the Scratch online community:</p>
......@@ -149,21 +149,11 @@ var Credits = React.createClass({
<span className="name">Franchette Viloria</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/246290_170x170.png" alt="Sarah Avatar" />
<span className="name">Sarah Otts</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/2496866_170x170.png" alt="Jolie Avatar" />
<span className="name">Jolie Castellucci</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/3087865_170x170.png" alt="Andrea Avatar" />
<span className="name">Andrea Saxman</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/373646_170x170.png" alt="Dalton Avatar" />
<span className="name">Dalton Miner</span>
......@@ -188,6 +178,11 @@ var Credits = React.createClass({
<img src="//cdn.scratch.mit.edu/get_image/user/14110644_170x170.png" alt="Lily Avatar" />
<span className="name">Lily Kim</span>
</li>
<li>
<img src="//cdn.scratch.mit.edu/get_image/user/13639421_170x170.png" alt="Tauntaun Avatar" />
<span className="name">Tauntaun Kim</span>
</li>
</ul>
<h2>Previous MIT Scratch Team Members</h2>
......@@ -198,7 +193,7 @@ var Credits = React.createClass({
Amos Blanton, Champika Fernando, Shane Clements, Abdulrahman idlbi, Evelyn Eastmond,
Amon Millner, Eric Rosenbaum, Jay Silver, Karen Brennan, Leo Burd, Oren Zuckerman, Gaia Carini,
Michelle Chung, Margarita Dekoli, Dave Feinberg, Megan Haddadi, Chris Graves, Tony Hwang, Di Liu,
Tammy Stern, Lis Sylvan, and Claudia Urrea.
Tammy Stern, Lis Sylvan, Claudia Urrea, Ben Berg, Hannah Cole, Andrea Saxman, and Randy Jou.
</p>
<h2>Design and Development Partners</h2>
......
......@@ -86,7 +86,7 @@
"faq.sellProjectsTitle":"Can I sell my Scratch projects?",
"faq.sellProjectsBody":"Certainly - your project is your creation. Keep in mind that once you share your project on Scratch, everyone is free to download, remix, and reuse it as per the terms of the <a href=\"http://creativecommons.org/licenses/by-sa/2.0/deed.en\">CC-BY-SA 2.0 license</a>. So if you intend to sell your project, you may want to un-share it from Scratch.",
"faq.sourceCodeTitle":"Where can I find the source code for Scratch?",
"faq.sourceCodeBody":"The source code for Scratch 2 (website and editor) is not yet available. The source code for <a href =\"/scratch_1.4\">Scratch 1.4</a>, written in Squeak, is available <a href=\"https://github.com/LLK/Scratch_1.4\">on GitHub</a>. The source code for the first version of the Scratch website - ScratchR - is available <a href=\"http://svn.assembla.com/svn/scratchr/\">on Assembla</a>.",
"faq.sourceCodeBody":"The source code for the Scratch 2 editor can be found on <a href=\"https://github.com/LLK/scratch-flash\">GitHub</a>. The source code for <a href =\"/scratch_1.4\">Scratch 1.4</a>, written in Squeak, is also available on <a href=\"https://github.com/LLK/Scratch_1.4\">GitHub</a>. For updated information on development projects relating to the Scratch website, please visit our <a href=\"/developers\">Developer Page</a>.",
"faq.okayToShareTitle":"How do I know what is or isn’t okay to share on the Scratch website?",
"faq.okayToShareBody":"Check out the <a href=\"/community_guidelines\">Scratch community guidelines</a> - they’re brief and don’t include a lot of legal stuff. There’s a link at the bottom of every page on Scratch.",
"faq.reportContentTitle":"What do I do if I see something that’s inappropriate?",
......
@import "../../colors";
@import "../../frameless";
.guidelines {
.guidelines-footer {
......@@ -12,3 +13,11 @@
}
}
}
@media only screen and (max-width: $tablet - 1){
.guidelines-footer {
img {
display: none;
}
}
}
......@@ -8,7 +8,7 @@
"guidelines.shareheader": "Share.",
"guidelines.sharebody": "You are free to remix projects, ideas, images, or anything else you find on Scratch – and anyone can use anything that you share. Be sure to give credit when you remix.",
"guidelines.privacyheader": "Keep personal info private.",
"guidelines.privacybody": "For safety reasons, don't use real names or post contact info like phone numbers or addresses.",
"guidelines.privacybody": "For safety reasons, don't give out any information that could be used for private communication - such as real last names, phone numbers, addresses, email addresses, links to social media sites or websites with unmoderated chat.",
"guidelines.honestyheader": "Be honest.",
"guidelines.honestybody": "Don’t try to impersonate other Scratchers, spread rumors, or otherwise try to trick the community.",
"guidelines.friendlyheader": "Help keep the site friendly.",
......
This diff is collapsed.
......@@ -7,38 +7,62 @@ $base-bg: $ui-white;
padding: 0;
}
.hoc {
.title-banner {
&.wbb-bg {
background-image: url("/images/hoc2015/hide-bg.jpg");
}
.hoc-section {
display: flex;
margin: 0 auto;
border-bottom: 1px solid $ui-border;
padding: 50px 0;
width: 95%;
text-align: center;
&.dance-bg {
background-image: url("/images/hoc2015/dance-bg.jpg");
}
justify-content: center;
flex-wrap: wrap;
align-items: center;
}
&.name-bg {
background-image: url("/images/hoc2015/name-bg.jpg");
}
.hoc-section:last-child {
border-bottom: 0;
}
section {
.hoc-section.mod-title-banner {
border: 0;
padding: 10px 0;
max-width: $desktop;
}
.card-deck {
padding: 0 20px;
}
.hoc-section-column {
width: 100%;
}
//6 columns
@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) {
max-width: $mobile;
}
}
}
.hoc-section-column.mod-split {
min-width: 200px;
max-width: 40%;
text-align: left;
}
.hoc-section-column-img {
border-radius: 5px;
width: 100%;
}
.hoc-section-paragraph {
margin: 10px auto 20px;
max-width: 600px;
}
.title-banner.mod-wbb-bg {
background-image: url("/images/hoc2015/hide-bg.jpg");
}
.title-banner.mod-dance-bg {
background-image: url("/images/hoc2015/dance-bg.jpg");
}
.title-banner.mod-name-bg {
background-image: url("/images/hoc2015/name-bg.jpg");
}
.flex-row {
.card {
.flex-row-card {
margin: 10px;
border-radius: 7px;
background-color: $active-gray;
......@@ -47,184 +71,146 @@ $base-bg: $ui-white;
width: 30%;
min-width: 200px;
max-width: 230px;
}
.card-info {
.flex-row-card-info {
border-radius: 5px;
background-color: $base-bg;
width: 100%;
height: 100%;
}
button,
img {
.flex-row-card-info-img,
.button.flex-row-card-info-button {
width: calc(100% - 20px);
}
}
img {
.flex-row-card-info-img {
margin: 10px 10px 5px 10px;
border-radius: 5px;
}
}
button {
.button.flex-row-card-info-button {
margin: 0 10px 10px 10px;
}
}
//8 columns
@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) {
margin: 2px;
min-width: 175px;
button {
font-size: .7em;
}
}
}
}
}
section {
.hoc-section-resource,
.hoc-section-studio {
display: flex;
margin: 0 auto;
border-bottom: 1px solid $ui-border;
padding: 50px 0;
width: 95%;
margin: 10px 0;
min-width: 200px;
text-align: left;
justify-content: center;
flex-wrap: wrap;
align-items: center;
p {
margin: 10px auto 20px;
max-width: 600px;
}
&:last-child {
border-bottom: 0;
}
}
&.one-up {
text-align: center;
.hoc-section-resource-img,
.hoc-section-studio-img {
margin-right: 15px;
}
.column {
width: 100%;
}
}
.hoc-section-resource {
width: 33%;
min-height: 4rem;
align-items: flex-start;
}
&.two-up {
.column {
min-width: 200px;
max-width: 40%;
text-align: left;
.hoc-section-resource-anchor {
display: block;
margin: 5px 0;
font-size: .8em;
}
img {
border-radius: 5px;
width: 100%;
}
}
}
}
.hoc-section-resource-info-header {
margin: 0;
line-height: inherit;
}
.resource,
.studio {
display: flex;
margin: 10px 0;
min-width: 200px;
.flex-row.mod-studio {
justify-content: space-between;
}
text-align: left;
justify-content: center;
.hoc-section-studio {
align-items: center;
}
img {
margin-right: 15px;
}
.hoc-section-studio-img {
float: left;
}
a {
h5 {
.hoc-section-studio-info-header {
margin: 8px 0;
width: 150px;
color: $ui-blue;
font-weight: 500;
}
&:hover {
.hoc-section-studio-info-header:hover {
color: darken($ui-blue, 15);
}
}
}
}
//8 columns
@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) {
display: block;
width: 30%;
min-width: 180px;
text-align: center;
.hoc-section-logos {
margin: 20px 0;
width: 100%;
}
img {
margin: 0 auto;
}
}
}
.hoc-section-logos-img {
margin: 20px;
max-width: 150px;
max-height: 55px;
vertical-align: middle;
}
.resource {
width: 33%;
.hoc-section-trademark {
margin-top: 20px;
}
a {
display: block;
margin: 5px 0;
font-size: .8em;
@media only screen and (max-width: $mobile - 1) {
.hoc-section-studio {
display: inline-block;
}
}
.resource-info {
h5 {
margin: 0;
line-height: inherit;
}
}
//6 columns
@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) {
.hoc-section.mod-title-banner {
max-width: $mobile;
}
.studio {
width: 50%;
h5 {
width: 200px;
.hoc-section-studio {
display: inline-block;
}
}
img {
float: left;
//8 columns
@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) {
.flex-row-card {
margin: 2px;
min-width: 175px;
}
@media only screen and (max-width: $mobile - 1) {
display: inline-block;
.button.flex-row-card-info-button {
font-size: .7em;
}
@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) {
display: inline-block;
.hoc-section-resource,
.hoc-section-studio {
display: block;
width: 30%;
min-width: 180px;
text-align: center;
}
//8 columns
@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) {
h5 {
width: 100%;
.hoc-section-resource-img,
.hoc-section-studio-img {
margin: 0 auto;
}
img {
.hoc-section-studio-img {
float: none;
}
}
}
.logos {
margin: 20px 0;
.hoc-section-studio-info-header {
width: 100%;
img {
margin: 20px;
max-width: 150px;
max-height: 55px;
vertical-align: middle;
}
}
.trademark {
margin-top: 20px;
}
}
......@@ -15,5 +15,12 @@
"hoc.studioWeBareBears": "We Bare Bears Studio",
"hoc.subTitle": "With Scratch, you can program your own stories, games, and animations — and share them online.",
"hoc.tipsDescription": "Need help getting started? Looking for ideas?&nbsp; You can find tutorials and helpful hints in the <a href=\"/projects/editor/?tip_bar=home\">Tips Window</a>",
"hoc.title": "Get Creative with Coding"
"hoc.title": "Get Creative with Coding",
"hoc.tipsAnimateYourNameTitle": "Animate Your Name",
"hoc.tipsDanceTitle": "Dance, Dance, Dance",
"hoc.tipsGetStarted": "Getting Started",
"hoc.tipsHideAndSeekTitle": "Hide-and-Seek Game",
"hoc.tipsMakeMusicTitle": "Make Music",
"hoc.tipsMakeItFlyTitle": "Make it Fly",
"hoc.tipsPongGame": "Create a Pong Game"
}
\ No newline at end of file
{
"title":"Make Some Art",
"description":[
"Watch videos about how to create with technology.",
"Then, create your own art project.",
"Create your own art project with Scratch.",
"Check out projects by others for inspiration,",
"communicate in the forum and join the challenges!"
],
"videos":[
{
"key":"1",
"image":"http://farm8.staticflickr.com/7245/7120445933_7de87c2bd9_z.jpg",
"link":"https://player.vimeo.com/video/40904471"
},
{
"key":"2",
"image":"http://blogs.adobe.com/conversations/files/2015/04/project-para2-1024x572.jpg",
"link":"https://www.youtube.com/embed/Tdvj8XMrqXc?autoplay=1"
},
{
"key":"3",
"image":"http://iluminate.com/wp-content/uploads/2015/07/iluminate-news-residency-at-resorts-world-genting-malaysia-1200x798.jpg",
"link":"https://www.youtube.com/embed/Xg1dUhVI9i0?autoplay=1"
}
],
"microworld_project_id":"88148127",
"tips":[
{
"title":"Start Dancing",
"thumbnails":[
{
"type":"tip",
"title":"First, select a sprite",
"thumbnailUrl":"/images/microworlds/hiphop/dancer-sprite.png"
},
{
"type":"tip",
"title":"Then, try this script",
"thumbnailUrl":"/images/microworlds/hiphop/switch-wait.gif"
},
{
"type":"tip",
"title":"Start it!",
"thumbnailUrl":"/images/microworlds/hiphop/green-flag.gif"
}
]
},
{
"title":"Repeat the Dance",
"thumbnails":[
{
"type":"tip",
"title":"Add another \"wait\"",
"thumbnailUrl":"/images/microworlds/hiphop/add-wait.gif"
},
{
"type":"tip",
"title":"Drag this block over",
"thumbnailUrl":"/images/microworlds/hiphop/add-repeat.gif"
},
{
"type":"tip",
"title":"Start it",
"thumbnailUrl":"/images/microworlds/hiphop/green-flag.gif"
}
]
},
{
"title":"Play Music",
"thumbnails":[
{
"type":"tip",
"title":"Add music that repeats",
"thumbnailUrl":"/images/microworlds/hiphop/add-play-sound.gif"
},
{
"type":"tip",
"title":"Start it",
"thumbnailUrl":"/images/microworlds/hiphop/green-flag.gif"
}
]
},
{
"title":"Shadow Dance",
"thumbnails":[
{
"type":"tip",
"title":"Add this block",
"thumbnailUrl":"/images/microworlds/hiphop/shadow-dance.gif"
},
{
"type":"tip",
"title":"Start it",
"thumbnailUrl":"/images/microworlds/hiphop/green-flag.gif"
},
{
"type":"tip",
"title":"Click the stop sign to reset",
"thumbnailUrl":"/images/microworlds/hiphop/stop.gif"
}
]
},
{
"title":"More things to try",
"thumbnails":[
{
"type":"tip",
"title":"Try different dance moves",
"thumbnailUrl":"/images/microworlds/hiphop/change-dance-moves.gif"
},
{
"type":"tip",
"title":"Add more moves",
"thumbnailUrl":"/images/microworlds/hiphop/long-dance-script.png"
},
{
"type":"tip",
"title":"Change the timing",
"thumbnailUrl":"/images/microworlds/hiphop/change-dance-timing.png"
}
]
}
],
"starter_projects":[
{
"title":"Architecture Stamps Starter Project",
......
var React = require('react'); // eslint-disable-line
var render = require('../../../lib/render.jsx');
var Microworld = require('../../../components/microworld/microworld.jsx');
var Page = require('../../../components/page/www/page.jsx');
var microworldData = require('./microworld_art.json');
var microworldData = require('./art.json');
render(<Microworld microworldData={microworldData} />, document.getElementById('view'));
render(<Page><Microworld microworldData={microworldData} /></Page>, document.getElementById('app'));
......@@ -125,17 +125,6 @@
]
}
],
"_commentedout_starter_projects":[
{
"title":"Architecture Stamps Starter Project",
"type":"project",
"remixers_count":168,
"love_count":3062,
"thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/2445/6318.png",
"creator":"CSFirst",
"id":24456318
}
],
"community_projects":{
"featured_projects":[
{
......@@ -395,7 +384,6 @@
]
},
"design_challenge":{
"_commentedout_project_id":"89144801",
"studio_id":"1424746",
"studio1":[
{
......
var React = require('react'); // eslint-disable-line
var render = require('../../../lib/render.jsx');
var Microworld = require('../../../components/microworld/microworld.jsx');
var Page = require('../../../components/page/www/page.jsx');
var microworldData = require('./microworld_fashion.json');
var microworldData = require('./fashion.json');
render(<Microworld microworldData={microworldData} />, document.getElementById('view'));
render(<Page><Microworld microworldData={microworldData} /></Page>, document.getElementById('app'));
......@@ -110,17 +110,6 @@
]
}
],
"_commentedout_starter_projects":[
{
"title":"Architecture Stamps Starter Project",
"type":"project",
"remixers_count":168,
"love_count":3062,
"thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/2445/6318.png",
"creator":"CSFirst",
"id":24456318
}
],
"community_projects":{
"featured_projects":[
{
......@@ -353,7 +342,6 @@
]
},
"design_challenge":{
"_commentedout_project_id":"89144801",
"studio_id":"1065372",
"studio1":[
{
......
var React = require('react'); // eslint-disable-line
var render = require('../../../lib/render.jsx');
var Microworld = require('../../../components/microworld/microworld.jsx');
var Page = require('../../../components/page/www/page.jsx');
var microworldData = require('./microworld_hiphop.json');
var microworldData = require('./hiphop.json');
render(<Microworld microworldData={microworldData} />, document.getElementById('view'));
render(<Page><Microworld microworldData={microworldData} /></Page>, document.getElementById('app'));
{
"title":"Soccer",
"description":[
"Make your own soccer animation or game!"
],
"microworld_project_id":"116297919",
"show_forum":false
}
var React = require('react'); // eslint-disable-line
var render = require('../../../lib/render.jsx');
var Microworld = require('../../../components/microworld/microworld.jsx');
var Page = require('../../../components/page/www/page.jsx');
var microworldData = require('./soccer.json');
render(<Page><Microworld microworldData={microworldData} /></Page>, document.getElementById('app'));
......@@ -4,6 +4,7 @@ var omit = require('lodash.omit');
var React = require('react');
var api = require('../../lib/api');
var log = require('../../lib/log');
var render = require('../../lib/render.jsx');
var sessionActions = require('../../redux/session.js');
var shuffle = require('../../lib/shuffle.js').shuffle;
......@@ -94,35 +95,40 @@ var Splash = injectIntl(React.createClass({
api({
uri: '/proxy/users/' + this.props.session.session.user.username + '/activity?limit=5'
}, function (err, body) {
if (!err) this.setState({activity: body});
if (!body) return log.error('No response body');
if (!err) return this.setState({activity: body});
}.bind(this));
},
getFeaturedGlobal: function () {
api({
uri: '/proxy/featured'
}, function (err, body) {
if (!err) this.setState({featuredGlobal: body});
if (!body) return log.error('No response body');
if (!err) return this.setState({featuredGlobal: body});
}.bind(this));
},
getFeaturedCustom: function () {
api({
uri: '/proxy/users/' + this.props.session.session.user.id + '/featured'
}, function (err, body) {
if (!err) this.setState({featuredCustom: body});
if (!body) return log.error('No response body');
if (!err) return this.setState({featuredCustom: body});
}.bind(this));
},
getNews: function () {
api({
uri: '/news?limit=3'
}, function (err, body) {
if (!err) this.setState({news: body});
if (!body) return log.error('No response body');
if (!err) return this.setState({news: body});
}.bind(this));
},
getProjectCount: function () {
api({
uri: '/projects/count/all'
}, function (err, body) {
if (!err) this.setState({projectCount: body.count});
if (!body) return log.error('No response body');
if (!err) return this.setState({projectCount: body.count});
}.bind(this));
},
refreshHomepageCache: function () {
......@@ -133,6 +139,7 @@ var Splash = injectIntl(React.createClass({
useCsrf: true
}, function (err, body) {
if (err) return this.setState({refreshCacheStatus: 'fail'});
if (!body) return log.error('No response body');
if (!body.success) return this.setState({refreshCacheStatus: 'inprogress'});
return this.setState({refreshCacheStatus: 'pass'});
}.bind(this));
......
/*
* Checks that the links in the navbar on the homepage have the right URLs to redirect to
*
* Test cases: https://github.com/LLK/scratch-www/wiki/Most-Important-Workflows#Create_should_take_you_to_the_editor
*/
var tap=require('tap');
var seleniumWebdriver = require('selenium-webdriver');
//chrome driver
var driver = new seleniumWebdriver.Builder().withCapabilities(seleniumWebdriver.Capabilities.chrome()).build();
//open scratch.ly in a new instance of the browser
driver.get('https://scratch.ly');
//find the create link within the navbar
//the create link depends on whether the user is signed in or not (tips window opens)
tap.test('checkCreateLinkWhenSignedOut', function (t) {
var xPathLink = '//li[contains(@class, "link") and contains(@class, "create")]/a';
var createLinkSignedOut = driver.findElement(seleniumWebdriver.By.xpath(xPathLink));
createLinkSignedOut.getAttribute('href').then( function (url) {
//expected value of the href
var expectedHref = '/projects/editor/?tip_bar=home';
//the create href should match `/projects/editor/?tip_bar=home`
//the create href should be at the end of the URL
t.equal(url.substr(-expectedHref.length), expectedHref);
t.end();
});
});
// close the instance of the browser
driver.quit();
var autoprefixer = require('autoprefixer');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var defaults = require('lodash.defaults');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var gitsha = require('git-bundle-sha');
var MustacheRendererPlugin = require('./mustache-renderer-webpack-plugin');
var path = require('path');
var webpack = require('webpack');
......@@ -94,18 +95,23 @@ module.exports = {
noParse: /node_modules\/google-libphonenumber\/dist/
},
postcss: function () {
return [autoprefixer({browsers: ['last 3 versions']})];
return [autoprefixer({browsers: ['last 3 versions', 'Safari >= 8', 'iOS >= 8']})];
},
node: {
fs: 'empty'
},
plugins: [
new VersionPlugin({length: 5}),
new MustacheRendererPlugin({
templatePath: path.resolve(__dirname, './src/template.html'),
routes: routes,
config: require('./src/template-config.js')
}),
new VersionPlugin({length: 5})
].concat(routes
.filter(function (route) {return !route.redirect;})
.map(function (route) {
return new HtmlWebpackPlugin(defaults({}, require('./src/template-config.js'), {
title: route.title,
filename: route.name + '.html',
route: route
}));
})
).concat([
new CopyWebpackPlugin([
{from: 'static'},
{from: 'intl', to: 'js'}
......@@ -124,5 +130,5 @@ module.exports = {
}),
new webpack.optimize.CommonsChunkPlugin('common', 'js/common.bundle.js'),
new webpack.optimize.OccurenceOrderPlugin()
]
])
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment