mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Merge branch 'develop' into feature/jobs
This commit is contained in:
commit
7511121972
24 changed files with 194 additions and 114 deletions
|
@ -9,8 +9,8 @@ notifications:
|
|||
secure: ezESiG7JnuSLZc2/PPhOvWUv5BHBCr+g86MsuLLw+S+zz3DUfzWHMQ1g5tUvkeSDTPmfEIX41EnPkaoWtsD3OGO0PGXgseAfA8+6Z4N1rICNZZrhXZB2s6UdwRK1e+0Jol4W3kHmt96BHyN2scLNgJYeWMgSJllVsuPhMTlKBZIXI9u540NH8Nxjl3f2WvoIg64Q1mZvMxkpPbw4xssx6U4HSFE8kTTE6+EFsSxzombFX0cLGjPiJ9QZgGVUk4UkIjyiFLQQDfQlLllCaUpqJ9+qbuCNoMSKA2yty/qyZ8Y+r4OlMberjmBzR9GRLLyXWWcaAfMIgwlRhjtLYIDAUSsGM1iwUWCgyB9maG2IiXuYLSueuMx8DcDwbpUepoDgnqBYnM2AJmT8gcsxqlKYzJpYpHDgZgBlLZQgMXqjrVJHs/Tf9XVcLS6HAn1Ww0OOT01jThfy4gClpAuqLayYexsXOoL+RaFg25E2NzuTtaFWgRfWZgcAeqYNDiUzwun2D4vZ5I+NtdRP0gzpbG2fxhFz05vAqyf1Kp6ZYb17Li3A38dIm6Lsvv3qawAIAgNaZpIZX3f89+uq6jHU8kJy1Iv823JK2Xac3vEz3SHUKJnuXFF0LO07om9AcNEXhP/JrJ617S8nfvDtZRJODMFhz8qQwie+65Ql1I871goBpVs=
|
||||
env:
|
||||
global:
|
||||
- secure: kXRyOECCfmTmIyibSKyHFz9cC5YGDsLIZJyiSpepvjRvuuJErxpD3yokp++JCJXdj/CRfJKazeMPkgek78zGiI/xnHR2aVxuQraU5ELIVNBCaFDtM4lKxtTVvEAtErwhWrH9zMiJkgXGF/MwID0QgZVlD/hpKI3MoS8sS1dmvDlqlregTvUZWBnlqMnrQuOXFNLPT+/QPgO6myd+nJn+XogSw8HceUo76cOAD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m2B0Uk86a4TBRCeOgJZ1yoJoPpGPOHTo+dgNXcU8ReszGVoy7uOjFWwu82FQq8gzfcf75yzaRJgG8/BJ6BkJfa0EmFg3iO5CwixQyHR5+CqsedtoLAWVT8zlOfQ/Z6yx4Pm7jXQSOkyvo09YJ2QIn4IFGPvwOVS7Firzi+fLl8GYApeSV9G10e1IzA4pPrKdJMRA4qRMPt9zJGq7ZO1J/d9aW/5KIsJUDnodnl7yXJyDMOyNeljT9I82ciHZcURxRRY080vrW6dgNJE1V9jxBhWEvr2iCeWMMedWaGuC41I7K9L79eW8lmaE+cQ+OZrzpOJP4GbfmIiXrh+0M4ChL/xBpjtiFwpNdkCXXhzWMnjJ4wCrii4yuc=
|
||||
- EB_REGION=us-east-1
|
||||
- EB_APP=scratch-www
|
||||
- EB_AWS_BUCKET_NAME=elasticbeanstalk-us-east-1-307680192167
|
||||
|
@ -32,7 +32,10 @@ deploy:
|
|||
env: scratch-www-staging
|
||||
on:
|
||||
repo: LLK/scratch-www
|
||||
branch: develop
|
||||
branch:
|
||||
- develop
|
||||
- hotfix/*
|
||||
- release/*
|
||||
- provider: elasticbeanstalk
|
||||
access_key_id: $EB_AWS_ACCESS_KEY_ID
|
||||
secret_access_key: $EB_AWS_SECRET_ACCESS_KEY
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
### Where am I? ###
|
||||
Physically? No idea.
|
||||
## I wanna contribute!
|
||||
Sweet! The transition from existing to new codebase is an ongoing process, and we love to have people in the Scratch and Open Source communities help us along the way, and even afterwards as we develop new features for Scratch here.
|
||||
|
||||
Digitally? You’re at Scratch’s open source Web Client!
|
||||
Here are some ways you can contribute:
|
||||
* [Report bugs](https://github.com/LLK/scratch-www/wiki/Reporting-Bugs)
|
||||
* [Work on bugs and make pull requests](https://github.com/LLK/scratch-www/wiki/Workflow-for-Repo-Contributions)
|
||||
* Make sure to check out how to [assign yourself bugs](https://github.com/LLK/scratch-www/wiki/Assigning-Yourself-Bugs) too.
|
||||
|
||||
At Scratch, we’re working to update our UI to use a new codebase, which will be contained in this repository. The transition from existing to new codebase is an ongoing process, and we love to have people in the Scratch and Open Source communities help us along the way, and even afterwards as we develop new features for Scratch here.
|
||||
|
||||
|
||||
### Who and what will I find here? ###
|
||||
We are always excited to have people join us in working to make Scratch a wonderful place for people of all ages to make projects together. If you’re new here, and looking to jump into our wonderful community, we have some wonderful resources for you to take a look at:
|
||||
We are always excited to have people join us in working to make Scratch a wonderful place for people of all ages to make projects together. If you’re new here, and looking to jump into our wonderful community, we have some resources for you to take a look at:
|
||||
|
||||
* [README](https://github.com/LLK/scratch-www/blob/develop/README.md) (if you’re to read only one me in this repo, make it this one – it has all of the necessary information for getting a local Scratch UI running on your machine!)
|
||||
* [Community Guidelines](https://github.com/LLK/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
|
||||
|
@ -21,15 +20,3 @@ Beyond this repo, there are also some other resources that you might want to tak
|
|||
[Advanced Topics forum](https://scratch.mit.edu/discuss/31/) on Scratch (like Topics, but more complex-y)
|
||||
|
||||
|
||||
### I wanna contribute! ###
|
||||
Sweet! Here are some ways you can contribute:
|
||||
* [Report bugs](https://github.com/LLK/scratch-www/wiki/Reporting-Bugs)
|
||||
* [Work on bugs](https://github.com/LLK/scratch-www/wiki/Workflow-for-Repo-Contributions)
|
||||
* Make sure to check out how to [assign yourself bugs](https://github.com/LLK/scratch-www/wiki/Assigning-Yourself-Bugs) too.
|
||||
|
||||
|
||||
We’re currently building Scratch using [React](https://facebook.github.io/react/) and [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html). Here are some resources to help you get acquainted with how we’re working on the Scratch codebase:
|
||||
* [Style Guide](https://github.com/LLK/scratch-www/wiki/Style-Guide)
|
||||
* [Testing Guide](https://github.com/LLK/scratch-www/wiki/Testing-Guide)
|
||||
* [Localization Guide](https://github.com/LLK/scratch-www/wiki/Localization-Guide)
|
||||
* [Map of the repository](https://github.com/LLK/scratch-www/wiki/Repo-Map)
|
||||
|
|
12
LICENSE
Normal file
12
LICENSE
Normal file
|
@ -0,0 +1,12 @@
|
|||
Copyright (c) 2015, Massachusetts Institute of Technology
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
13
LICENSE.md
13
LICENSE.md
|
@ -1,13 +0,0 @@
|
|||
Copyright 2015 Massachusetts Institute of Technology
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
21
README.md
21
README.md
|
@ -1,7 +1,22 @@
|
|||
## scratch-www
|
||||
#### Standalone web client for Scratch
|
||||
|
||||
[![Build Status](https://magnum.travis-ci.com/LLK/scratch-www.svg?token=xzzHj4ct3SyBTpeqxnx1)](https://magnum.travis-ci.com/LLK/scratch-www)
|
||||
[![Build Status](https://travis-ci.org/LLK/scratch-www.svg)](https://travis-ci.org/LLK/scratch-www)
|
||||
|
||||
### Where am I?
|
||||
Physically? No idea.
|
||||
|
||||
Digitally? You’re at Scratch’s open source web client!
|
||||
|
||||
We’re working to update the [Scratch website](https://scratch.mit.edu) to use a new codebase, contained in this repository.
|
||||
|
||||
We’re currently building Scratch using [React](https://facebook.github.io/react/) and [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html). Here are some resources to help you get acquainted with how we’re working on the Scratch codebase:
|
||||
|
||||
* [Style Guide](https://github.com/LLK/scratch-www/wiki/Style-Guide)
|
||||
* [Testing Guide](https://github.com/LLK/scratch-www/wiki/Testing-Guide)
|
||||
* [Localization Guide](https://github.com/LLK/scratch-www/wiki/Localization-Guide)
|
||||
* [Map of the repository](https://github.com/LLK/scratch-www/wiki/Repo-Map)
|
||||
|
||||
|
||||
### Before Getting Started
|
||||
* make sure you have node and npm [installed](https://docs.npmjs.com/getting-started/installing-node)
|
||||
|
@ -39,7 +54,7 @@ Use `^C` to stop the node process `npm start` starts.
|
|||
| `PORT` | `8333` | Port for devserver (http://localhost:XXXX) |
|
||||
| `FALLBACK` | `''` | Pass-through location for old site |
|
||||
|
||||
**NOTE:** Because by default both `API_HOST=https://api.scratch.mit.edu` and `FALLBACK=https://scratch.mit.edu`, please be aware that, by default, you will be seeing and interacting with real data on the Scratch website.
|
||||
**NOTE:** Because by default `API_HOST=https://api.scratch.mit.edu`, please be aware that, by default, you will be seeing and interacting with real data on the Scratch website.
|
||||
|
||||
### To Test
|
||||
```bash
|
||||
|
@ -56,3 +71,5 @@ Most of the issues we have currently revolve around the use of `FALLBACK`. This
|
|||
Setting `FALLBACK=https://scratch.mit.edu` allows the web client to retrieve data from the Scratch website in your development environment. However, because of security concerns, trying to send data to Scratch through your development environment won't work. This means the following things will be broken for the time being:
|
||||
* Login on the splash page (*In the process of being fixed*)
|
||||
* Some update attempts to production data made through a development version of the web client
|
||||
|
||||
Additionally, if you set `FALLBACK=https://scratch.mit.edu`, be aware that clicking on links to parts of the website not yet migrated over (currently such as `Explore`, `Discuss`, `Profile`, etc.) will take you to the Scratch website itself.
|
||||
|
|
7
TRADEMARK
Normal file
7
TRADEMARK
Normal file
|
@ -0,0 +1,7 @@
|
|||
The Scratch trademarks, including the Scratch name, logo, the Scratch Cat, Gobo, Pico, Nano, Tera and Giga graphics (the "Marks"), are property of the Massachusetts Institute of Technology (MIT), and the use of the Marks is governed by this policy.
|
||||
|
||||
You may use the Marks to refer to Scratch in Substantially Unmodified form.
|
||||
|
||||
"Substantially Unmodified" means the source code provided by MIT, possibly with minor modifications including but not limited to: bug fixes (including security), changing the locations of files for better integration with the host operating system, adding documentation, and changes to the dynamic linking of libraries.
|
||||
|
||||
A version is not "Substantially Unmodified" if it incorporates features not present in a release of Scratch by MIT. If you do make a substantial modification, to avoid confusion with versions of Scratch produced by MIT you must remove all Marks from your version of the software and refrain from using any of the Marks to refer to your version.
|
|
@ -90,6 +90,12 @@ for (var id in generalIds) {
|
|||
icuWithIds[generalIds[id]] = 'general-' + id;
|
||||
}
|
||||
|
||||
// start with all views, and remove localized ones as they are iterated over
|
||||
var views = glob.sync(path.resolve(__dirname, '../src/views/*'));
|
||||
for (var i = 0; i < views.length; i++) {
|
||||
views[i] = views[i].split('/').pop();
|
||||
}
|
||||
|
||||
// get view-specific locale strings.
|
||||
var files = glob.sync(path.resolve(__dirname, '../src/views/**/l10n.json'));
|
||||
files.forEach(function (file) {
|
||||
|
@ -152,10 +158,13 @@ glob(poUiDir + '/*', function (err, files) {
|
|||
}
|
||||
});
|
||||
|
||||
for (var view in viewLocales) {
|
||||
var viewTranslations = merge(viewLocales[view], generalLocales);
|
||||
for (var i in views) {
|
||||
var viewTranslations = generalLocales;
|
||||
if (views[i] in viewLocales) {
|
||||
viewTranslations = merge(viewLocales[views[i]], viewTranslations);
|
||||
}
|
||||
var objectString = JSON.stringify(viewTranslations);
|
||||
var fileString = 'window._messages = ' + objectString + ';';
|
||||
fs.writeFileSync(outputDir + '/' + view + '.intl.js', fileString);
|
||||
fs.writeFileSync(outputDir + '/' + views[i] + '.intl.js', fileString);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/llk/scratch-www.git"
|
||||
},
|
||||
"author": "MIT",
|
||||
"license": "MIT",
|
||||
"author": "Massachusetts Institute of Technology",
|
||||
"license": "BSD-3-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/llk/scratch-www/issues"
|
||||
},
|
||||
|
|
|
@ -3,6 +3,10 @@ var React = require('react');
|
|||
|
||||
require('./banner.scss');
|
||||
|
||||
/**
|
||||
* Container for messages displayed below the nav bar that can be dismissed
|
||||
* (See: email not confirmed banner)
|
||||
*/
|
||||
var Banner = React.createClass({
|
||||
type: 'Banner',
|
||||
propTypes: {
|
||||
|
|
|
@ -9,6 +9,9 @@ require('slick-carousel/slick/slick.scss');
|
|||
require('slick-carousel/slick/slick-theme.scss');
|
||||
require('./carousel.scss');
|
||||
|
||||
/**
|
||||
* Displays content in horizontal scrolling box. Example usage: splash page rows.
|
||||
*/
|
||||
var Carousel = React.createClass({
|
||||
type: 'Carousel',
|
||||
propTypes: {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
$button-offset: $icon-size + 5px;
|
||||
$box-content-offset: 20px;
|
||||
|
||||
margin-bottom: 0;
|
||||
padding: 12px $button-offset;
|
||||
|
||||
.box-content & {
|
||||
|
@ -28,8 +29,10 @@
|
|||
content: "";
|
||||
}
|
||||
|
||||
&.slick-disabled:before {
|
||||
opacity: 1;
|
||||
&.slick-disabled {
|
||||
&:before {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,11 +41,11 @@
|
|||
|
||||
&:before {
|
||||
background-image: url("/svgs/carousel/prev_ui-dark-gray.svg");
|
||||
}
|
||||
|
||||
&:hover:before {
|
||||
background-image: url("/svgs/carousel/prev_ui-blue.svg");
|
||||
background-size: 90%;
|
||||
&:hover {
|
||||
background-image: url("/svgs/carousel/prev_ui-blue.svg");
|
||||
background-size: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,11 +59,11 @@
|
|||
|
||||
&:before {
|
||||
background-image: url("/svgs/carousel/next_ui-dark-gray.svg");
|
||||
}
|
||||
|
||||
&:hover:before {
|
||||
background-image: url("/svgs/carousel/next_ui-blue.svg");
|
||||
background-size: 90%;
|
||||
&:hover {
|
||||
background-image: url("/svgs/carousel/next_ui-blue.svg");
|
||||
background-size: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
.box-content & {
|
||||
|
|
|
@ -64,10 +64,12 @@ var Intro = React.createClass({
|
|||
<a className="sprite sprite-1" href="/projects/editor/?tip_bar=getStarted">
|
||||
<img
|
||||
className="costume costume-1"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-a.png" />
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-a.png"
|
||||
alt="Scratch Cat" />
|
||||
<img
|
||||
className="costume costume-2"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-b.png" />
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/cat-b.png"
|
||||
alt="Scratch Cat" />
|
||||
<div className="circle"></div>
|
||||
<div className="text">
|
||||
{this.props.messages['intro.tryItOut']}
|
||||
|
@ -76,10 +78,12 @@ var Intro = React.createClass({
|
|||
<a className="sprite sprite-2" href="/starter_projects/">
|
||||
<img
|
||||
className="costume costume-1"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-a.png" />
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-a.png"
|
||||
alt="Tera" />
|
||||
<img
|
||||
className="costume costume-2"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-b.png" />
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/tera-b.png"
|
||||
alt="Tera" />
|
||||
<div className="circle"></div>
|
||||
<div className="text">
|
||||
{this.props.messages['intro.seeExamples']}
|
||||
|
@ -88,10 +92,12 @@ var Intro = React.createClass({
|
|||
<a className="sprite sprite-3" href="#" onClick={this.handleJoinClick}>
|
||||
<img
|
||||
className="costume costume-1"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-a.png" />
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-a.png"
|
||||
alt="Gobo" />
|
||||
<img
|
||||
className="costume costume-2"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-b.png" />
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-b.png"
|
||||
alt="Gobo" />
|
||||
<div className="circle"></div>
|
||||
<div className="text">
|
||||
{this.props.messages['intro.joinScratch']}
|
||||
|
@ -122,7 +128,8 @@ var Intro = React.createClass({
|
|||
</div>
|
||||
<div className="video">
|
||||
<div className="play-button" onClick={this.showVideo}></div>
|
||||
<img src="//cdn.scratch.mit.edu/scratchr2/static/images/hp-video-screenshot.png" />
|
||||
<img src="//cdn.scratch.mit.edu/scratchr2/static/images/hp-video-screenshot.png"
|
||||
alt="Intro Video" />
|
||||
</div>
|
||||
<Modal
|
||||
className="video-modal"
|
||||
|
|
|
@ -8,6 +8,9 @@ var Select = require('../forms/select.jsx');
|
|||
|
||||
require('./languagechooser.scss');
|
||||
|
||||
/**
|
||||
* Footer dropdown menu that allows one to change their language.
|
||||
*/
|
||||
var LanguageChooser = React.createClass({
|
||||
type: 'LanguageChooser',
|
||||
mixins: [
|
||||
|
|
|
@ -25,6 +25,9 @@ var defaultStyle = {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Container for pop up windows (See: registration window)
|
||||
*/
|
||||
var Modal = React.createClass({
|
||||
type: 'Modal',
|
||||
statics: {
|
||||
|
|
|
@ -47,14 +47,14 @@ var Navigation = React.createClass({
|
|||
loginOpen: false,
|
||||
loginError: null,
|
||||
registrationOpen: false,
|
||||
unreadMessageCount: 0,
|
||||
messageCountIntervalId: -1
|
||||
unreadMessageCount: 0, // bubble number to display how many notifications someone has.
|
||||
messageCountIntervalId: -1 // javascript method interval id for getting messsage count.
|
||||
};
|
||||
},
|
||||
componentDidMount: function () {
|
||||
if (this.state.session.user) {
|
||||
this.getMessageCount();
|
||||
var intervalId = setInterval(this.getMessageCount, 120000);
|
||||
var intervalId = setInterval(this.getMessageCount, 120000); // check for new messages every 2 mins.
|
||||
this.setState({'messageCountIntervalId': intervalId});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,6 +3,10 @@ var React = require('react');
|
|||
|
||||
require('./subnavigation.scss');
|
||||
|
||||
/**
|
||||
* Container for a custom, horizontal list of navigation elements
|
||||
* that can be displayed within a view or component.
|
||||
*/
|
||||
var SubNavigation = React.createClass({
|
||||
type: 'SubNavigation',
|
||||
render: function () {
|
||||
|
|
|
@ -2,6 +2,9 @@ var ReactIntl = require('react-intl');
|
|||
|
||||
var customLanguages = require('../../custom-locales.json');
|
||||
|
||||
/**
|
||||
* Add custom locales to react-intl if it doesn't have them.
|
||||
*/
|
||||
for (var locale in customLanguages) {
|
||||
ReactIntl.addLocaleData(customLanguages[locale]);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
var cookie = require('cookie');
|
||||
var xhr = require('xhr');
|
||||
|
||||
/**
|
||||
* Module that handles coookie interactions.
|
||||
* (Cookies?!?! Jar?!?! Get it?!?! WE'RE AMAZING!!!!)
|
||||
*
|
||||
* get(name, callback) – can be sync or async, as callback is optional
|
||||
* set(name, value) – synchronously sets the cookie
|
||||
* use(name, uri, callback) – can by sync or async, gets cookie from the uri if not there.
|
||||
*/
|
||||
var Jar = {};
|
||||
|
||||
Jar.get = function (name, callback) {
|
||||
|
|
|
@ -80,7 +80,7 @@ a:hover {
|
|||
/* NOTE: Margin should match height in navigation.scss */
|
||||
margin-top: 50px;
|
||||
background-color: $background-color;
|
||||
padding: 20px 1px;
|
||||
padding: 20px 0;
|
||||
min-width: 100%;
|
||||
min-height: 768px;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,14 @@ var log = require('../lib/log.js');
|
|||
|
||||
var CookieMixinFactory = require('./cookieMixinFactory.jsx');
|
||||
|
||||
/**
|
||||
* Component mixin that constructs requests to the scratch api.
|
||||
* Custom arguments:
|
||||
* - useCsrf [boolean] – handles unique csrf token retrieval for POST requests. This prevents
|
||||
* CSRF forgeries (see: https://www.squarefree.com/securitytips/web-developers.html#CSRF)
|
||||
*
|
||||
* It also takes in other arguments specified in the xhr library spec.
|
||||
*/
|
||||
var Api = {
|
||||
mixins: [
|
||||
// Provides useScratchcsrftoken
|
||||
|
@ -36,7 +44,11 @@ var Api = {
|
|||
if (err) log.error(err);
|
||||
// Legacy API responses come as lists, and indicate to redirect the client like
|
||||
// [{success: true, redirect: "/location/to/redirect"}]
|
||||
if (body && body[0] && 'redirect' in body[0]) window.location = body[0].redirect;
|
||||
try {
|
||||
if ('redirect' in body[0]) window.location = body[0].redirect;
|
||||
} catch (err) {
|
||||
// do nothing
|
||||
}
|
||||
callback(err, body);
|
||||
});
|
||||
}.bind(this);
|
||||
|
|
|
@ -39,7 +39,7 @@ var About = React.createClass({
|
|||
<ul>
|
||||
<li>
|
||||
<h2><FormattedMessage id='about.whoUsesScratch' /></h2>
|
||||
<img src="/images/about/who-uses-scratch.jpg" />
|
||||
<img src="/images/about/who-uses-scratch.jpg" alt="" />
|
||||
<p><FormattedHTMLMessage id='about.whoUsesScratchDescription' /></p>
|
||||
</li>
|
||||
|
||||
|
@ -56,25 +56,25 @@ var About = React.createClass({
|
|||
|
||||
<li>
|
||||
<h2><FormattedMessage id='about.aroundTheWorld' /></h2>
|
||||
<img src="/images/about/around-the-world.png" />
|
||||
<img src="/images/about/around-the-world.png" alt="" />
|
||||
<p><FormattedHTMLMessage id='about.aroundTheWorldDescription' /></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<h2><FormattedMessage id='about.schools' /></h2>
|
||||
<img src="/images/about/scratch-in-schools.jpg" />
|
||||
<img src="/images/about/scratch-in-schools.jpg" alt="" />
|
||||
<p><FormattedHTMLMessage id='about.schoolsDescription' /></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<h2><FormattedMessage id='about.quotes' /></h2>
|
||||
<img src="/images/about/quotes.gif" />
|
||||
<img src="/images/about/quotes.gif" alt="Quotes about Scratch" />
|
||||
<p><FormattedHTMLMessage id='about.quotesDescription' /></p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<h2><FormattedMessage id='about.research' /></h2>
|
||||
<img src="/images/about/research-remix.png" />
|
||||
<img src="/images/about/research-remix.png" alt="" />
|
||||
<p><FormattedHTMLMessage id='about.researchDescription' /></p>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -14,112 +14,112 @@ var Credits = React.createClass({
|
|||
|
||||
<ul>
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/167_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/167_170x170.png" alt="Mitchel Avatar" />
|
||||
<span className="name">Mitchel Resnick</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/169_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/169_170x170.png" alt="Natalie Avatar" />
|
||||
<span className="name">Natalie Rusk</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/573207_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/573207_170x170.png" alt="Sayamindu Avatar" />
|
||||
<span className="name">Sayamindu Dasgupta</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/13682_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/13682_170x170.png" alt="Ricarose Avatar" />
|
||||
<span className="name">Ricarose Roque</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2584924_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2584924_170x170.png" alt="Ray Avatar" />
|
||||
<span className="name">Ray Schamp</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3484484_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3484484_170x170.png" alt="Eric Avatar" />
|
||||
<span className="name">Eric Schilling</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3532363_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3532363_170x170.png" alt="Chris Avatar" />
|
||||
<span className="name">Chris Willis-Ford</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3581881_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3581881_170x170.png" alt="Carl Avatar" />
|
||||
<span className="name">Carl Bowman</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4373707_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4373707_170x170.png" alt="Matthew Avatar" />
|
||||
<span className="name">Matthew Taylor</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4598206_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4598206_170x170.png" alt="Kasia Avatar" />
|
||||
<span className="name">Kasia Chmielinski</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/703844_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/703844_170x170.png" alt="Tim Avatar" />
|
||||
<span className="name">Tim Mickel</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2752403_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2752403_170x170.png" alt="Saskia Avatar" />
|
||||
<span className="name">Saskia Leggett</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2755634_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2755634_170x170.png" alt="Christan Avatar" />
|
||||
<span className="name">Christan Balch</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/5721684_170x170.png" />
|
||||
<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" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/10866958_170x170.png" alt="Colby Avatar" />
|
||||
<span className="name">Colby Gutierrez-Kraybill</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/1709047_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/1709047_170x170.png" alt="Andrew Avatar" />
|
||||
<span className="name">Andrew Sliwinski</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/default_170x170.png" />
|
||||
<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" />
|
||||
<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" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/default_170x170.png" alt="Moran Avatar" />
|
||||
<span className="name">Moran Tsur</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3661900_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3661900_170x170.png" alt="Juanita Avatar" />
|
||||
<span className="name">Juanita Buitrago</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/default_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/default_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" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/1915915_170x170.png" alt="Hannah Avatar" />
|
||||
<span className="name">Hannah Cole</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -128,49 +128,54 @@ var Credits = React.createClass({
|
|||
|
||||
<ul>
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/49156_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/49156_170x170.png" alt="Mark Avatar" />
|
||||
<span className="name">Mark Goff</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/159139_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/159139_170x170.png" alt="Franchette Avatar" />
|
||||
<span className="name">Franchette Viloria</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/246290_170x170.png" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/373646_170x170.png" alt="Dalton Avatar" />
|
||||
<span className="name">Dalton Miner</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/586054_170x170.png" />
|
||||
<span className="name">Megan Haddadi</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4836354_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4836354_170x170.png" alt="Christina Avatar" />
|
||||
<span className="name">Christina Huang</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4747093_170x170.png" />
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4747093_170x170.png" alt="Annie Avatar" />
|
||||
<span className="name">Annie Whitehouse</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/1048810_170x170.png" alt="Linda Avatar" />
|
||||
<span className="name">Linda Fernsel</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/14110644_170x170.png" alt="Lily Avatar" />
|
||||
<span className="name">Lily Kim</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Previous MIT Scratch Team Members</h2>
|
||||
|
@ -180,8 +185,8 @@ var Credits = React.createClass({
|
|||
Andrés Monroy-Hernández (who led the development of the first Scratch community website),
|
||||
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, Chris Graves, Tony Hwang, Di Liu, Tammy Stern,
|
||||
Lis Sylvan, and Claudia Urrea.
|
||||
Michelle Chung, Margarita Dekoli, Dave Feinberg, Megan Haddadi, Chris Graves, Tony Hwang, Di Liu,
|
||||
Tammy Stern, Lis Sylvan, and Claudia Urrea.
|
||||
</p>
|
||||
|
||||
<h2>Design and Development Partners</h2>
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#view {
|
||||
p {
|
||||
line-height: 1.5rem;
|
||||
a {
|
||||
word-wrap: break-word; /* Overrides: https://github.com/LLK/scratch-www/blob/develop/src/main.scss#L43-L47 */
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
|
|
|
@ -27,12 +27,12 @@ var Splash = injectIntl(React.createClass({
|
|||
],
|
||||
getInitialState: function () {
|
||||
return {
|
||||
projectCount: 10569070,
|
||||
activity: [],
|
||||
news: [],
|
||||
featuredCustom: {},
|
||||
featuredGlobal: {},
|
||||
showEmailConfirmationModal: false,
|
||||
projectCount: 'over 13 million', // gets the shared project count
|
||||
activity: [], // recent social actions taken by users someone is following
|
||||
news: [], // gets news posts from the scratch Tumblr
|
||||
featuredCustom: {}, // custom homepage rows, such as "Projects by Scratchers I'm Following"
|
||||
featuredGlobal: {}, // global homepage rows, such as "Featured Projects"
|
||||
showEmailConfirmationModal: false, // flag that determines whether to show banner to request email conf.
|
||||
refreshCacheStatus: 'notrequested'
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue