From bc0263531b6dc31e38fb2dc26f883212f2ec4345 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 19 Aug 2016 14:11:24 -0400 Subject: [PATCH 01/26] align gender/org input msg with others Because the `input` field is already to the right, they were being transformed too far over. This overrides the transform to be correct, and also scopes some css in more detail --- src/components/card/card.scss | 94 ++++++++-------- src/components/registration/steps.scss | 146 ++++++++++++++----------- 2 files changed, 133 insertions(+), 107 deletions(-) diff --git a/src/components/card/card.scss b/src/components/card/card.scss index b2b70c22c..61ba55798 100644 --- a/src/components/card/card.scss +++ b/src/components/card/card.scss @@ -21,43 +21,6 @@ } } - .validation-message { - $arrow-border-width: 1rem; - display: block; - position: absolute; - top: 0; - left: 0; - transform: translate(16rem, 0); - margin-left: $arrow-border-width; - border: 1px solid $active-gray; - border-radius: 5px; - background-color: $ui-orange; - padding: 1rem; - max-width: 18.75rem; - min-height: 1rem; - overflow: visible; - color: $type-white; - - &:before { - display: block; - position: absolute; - top: 1rem; - left: -$arrow-border-width / 2; - - transform: rotate(45deg); - - border-bottom: 1px solid $active-gray; - border-left: 1px solid $active-gray; - border-radius: 5px; - - background-color: $ui-orange; - width: $arrow-border-width; - height: $arrow-border-width; - - content: ""; - } - } - .form { padding: 3rem 4rem; @@ -77,6 +40,43 @@ .col-sm-9 { position: relative; } + + .validation-message { + $arrow-border-width: 1rem; + display: block; + position: absolute; + top: 0; + left: 0; + transform: translate(16rem, 0); + margin-left: $arrow-border-width; + border: 1px solid $active-gray; + border-radius: 5px; + background-color: $ui-orange; + padding: 1rem; + max-width: 18.75rem; + min-height: 1rem; + overflow: visible; + color: $type-white; + + &:before { + display: block; + position: absolute; + top: 1rem; + left: -$arrow-border-width / 2; + + transform: rotate(45deg); + + border-bottom: 1px solid $active-gray; + border-left: 1px solid $active-gray; + border-radius: 5px; + + background-color: $ui-orange; + width: $arrow-border-width; + height: $arrow-border-width; + + content: ""; + } + } } } } @@ -105,15 +105,19 @@ @media only screen and (max-width: $desktop - 1) { .card { - .validation-message { - position: relative; - transform: none; - margin: inherit; - width: 100%; - height: inherit; + .form { + .row { + .validation-message { + position: relative; + transform: none; + margin: inherit; + width: 100%; + height: inherit; - &:before { - display: none; + &:before { + display: none; + } + } } } } diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index 0355fbf7d..841f99ae4 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -2,10 +2,6 @@ @import "../../frameless"; .registration-step { - .demographics-checkbox-is-robot { - display: none; - } - .invite-avatar { display: block; margin: 0 auto 1rem auto; @@ -13,20 +9,30 @@ border-radius: 8px; } - .gender-input, - .other-input { - float: right; - width: 90%; - - .row { - margin-left: .5rem; + .card { + .demographics-checkbox-is-robot { + display: none; } - } - .help-text { - margin: .25rem 0; - text-align: left; - color: $ui-dark-gray; + .gender-input, + .other-input { + float: right; + width: 90%; + + .row { + margin-left: .5rem; + + .validation-message { + transform: translate(14rem, 0); + } + } + } + + .help-text { + margin: .25rem 0; + text-align: left; + color: $ui-dark-gray; + } } &.class-invite-step { @@ -51,58 +57,66 @@ } &.username-step { - .username-label { - margin-bottom: .75rem; + .card { + .username-label { + margin-bottom: .75rem; + } } } &.demographics-step { - .gender-input { - margin-top: -5.5rem; - } + .card { + .gender-input { + margin-top: -5.5rem; + } - .radio { - margin-right: 2.5rem; - line-height: 3rem; + .radio { + margin-right: 2.5rem; + line-height: 3rem; - input { - margin-right: 1rem; + input { + margin-right: 1rem; + } } } } &.phone-step { - .form-group { - margin-bottom: 2rem; - } + .card { + .form-group { + margin-bottom: 2rem; + } - input { - &[type=checkbox] { - margin-bottom: 1.25rem; + input { + &[type=checkbox] { + margin-bottom: 1.25rem; + } } } } &.organization-step { - .checkbox-group { - .validation-message { - transform: translate(16rem, 8rem); + .card { + .checkbox-group { + .validation-message { + transform: translate(16rem, 8rem); + } } - } - input { - &[value="8"] { - margin: 1rem 0; + input { + &[value="8"] { + margin: 1rem 0; + } } - } - .other-input { - margin-top: -5.75rem; + .other-input { + margin-top: -5.75rem; + } } } &.usescratch-step { - .form { + .card { .form-group { margin-bottom: 0; @@ -112,13 +126,13 @@ } } } - } - p { - &.char-count { - margin-top: 0; - margin-bottom: 1rem; - text-align: right; + p { + &.char-count { + margin-top: 0; + margin-bottom: 1rem; + text-align: right; + } } } } @@ -149,9 +163,11 @@ @media only screen and (max-width: $mobile - 1) { .registration-step { &.demographics-step { - .radio { - width: 100%; - text-align: left; + .card { + .radio { + width: 100%; + text-align: left; + } } } @@ -167,24 +183,30 @@ @media only screen and (max-width: $desktop - 1) { .registration-step { - .form { - text-align: left; + .card { + .form { + text-align: left; + } } &.phone-step { - .checkbox, - .validation-message { - text-align: left; - } + .card { + .checkbox, + .validation-message { + text-align: left; + } - .checkbox { - margin-bottom: 1rem; + .checkbox { + margin-bottom: 1rem; + } } } &.organization-step { - .checkbox-group { - text-align: left; + .card { + .checkbox-group { + text-align: left; + } } } } From baf0676f990276d8620007f2c8df2073a8b8996d Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 19 Aug 2016 15:06:12 -0400 Subject: [PATCH 02/26] move `.validation-message` out` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn’t need to be specifically styled, as we have no use for it inside `.card` but outside `.row` yet. Thanks @rschamp! --- src/components/card/card.scss | 94 +++++++++++++++++------------------ 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/src/components/card/card.scss b/src/components/card/card.scss index 61ba55798..b2b70c22c 100644 --- a/src/components/card/card.scss +++ b/src/components/card/card.scss @@ -21,6 +21,43 @@ } } + .validation-message { + $arrow-border-width: 1rem; + display: block; + position: absolute; + top: 0; + left: 0; + transform: translate(16rem, 0); + margin-left: $arrow-border-width; + border: 1px solid $active-gray; + border-radius: 5px; + background-color: $ui-orange; + padding: 1rem; + max-width: 18.75rem; + min-height: 1rem; + overflow: visible; + color: $type-white; + + &:before { + display: block; + position: absolute; + top: 1rem; + left: -$arrow-border-width / 2; + + transform: rotate(45deg); + + border-bottom: 1px solid $active-gray; + border-left: 1px solid $active-gray; + border-radius: 5px; + + background-color: $ui-orange; + width: $arrow-border-width; + height: $arrow-border-width; + + content: ""; + } + } + .form { padding: 3rem 4rem; @@ -40,43 +77,6 @@ .col-sm-9 { position: relative; } - - .validation-message { - $arrow-border-width: 1rem; - display: block; - position: absolute; - top: 0; - left: 0; - transform: translate(16rem, 0); - margin-left: $arrow-border-width; - border: 1px solid $active-gray; - border-radius: 5px; - background-color: $ui-orange; - padding: 1rem; - max-width: 18.75rem; - min-height: 1rem; - overflow: visible; - color: $type-white; - - &:before { - display: block; - position: absolute; - top: 1rem; - left: -$arrow-border-width / 2; - - transform: rotate(45deg); - - border-bottom: 1px solid $active-gray; - border-left: 1px solid $active-gray; - border-radius: 5px; - - background-color: $ui-orange; - width: $arrow-border-width; - height: $arrow-border-width; - - content: ""; - } - } } } } @@ -105,19 +105,15 @@ @media only screen and (max-width: $desktop - 1) { .card { - .form { - .row { - .validation-message { - position: relative; - transform: none; - margin: inherit; - width: 100%; - height: inherit; + .validation-message { + position: relative; + transform: none; + margin: inherit; + width: 100%; + height: inherit; - &:before { - display: none; - } - } + &:before { + display: none; } } } From 70eb82f7cb2df91b8dbbe16fe6a9d999d704b697 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 19 Aug 2016 15:16:35 -0400 Subject: [PATCH 03/26] remove `.card`-specific stylings --- src/components/registration/steps.scss | 154 +++++++++++-------------- 1 file changed, 67 insertions(+), 87 deletions(-) diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index 841f99ae4..d9ef9e135 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -2,6 +2,10 @@ @import "../../frameless"; .registration-step { + .demographics-checkbox-is-robot { + display: none; + } + .invite-avatar { display: block; margin: 0 auto 1rem auto; @@ -9,30 +13,24 @@ border-radius: 8px; } - .card { - .demographics-checkbox-is-robot { - display: none; - } + .gender-input, + .other-input { + float: right; + width: 90%; - .gender-input, - .other-input { - float: right; - width: 90%; + .row { + margin-left: .5rem; - .row { - margin-left: .5rem; - - .validation-message { - transform: translate(14rem, 0); - } + .validation-message { + transform: translate(14rem, 0); } } + } - .help-text { - margin: .25rem 0; - text-align: left; - color: $ui-dark-gray; - } + .help-text { + margin: .25rem 0; + text-align: left; + color: $ui-dark-gray; } &.class-invite-step { @@ -57,82 +55,72 @@ } &.username-step { - .card { - .username-label { - margin-bottom: .75rem; - } + .username-label { + margin-bottom: .75rem; } } &.demographics-step { - .card { - .gender-input { - margin-top: -5.5rem; - } + .gender-input { + margin-top: -5.5rem; + } - .radio { - margin-right: 2.5rem; - line-height: 3rem; + .radio { + margin-right: 2.5rem; + line-height: 3rem; - input { - margin-right: 1rem; - } + input { + margin-right: 1rem; } } } &.phone-step { - .card { - .form-group { - margin-bottom: 2rem; - } + .form-group { + margin-bottom: 2rem; + } - input { - &[type=checkbox] { - margin-bottom: 1.25rem; - } + input { + &[type=checkbox] { + margin-bottom: 1.25rem; } } } &.organization-step { - .card { - .checkbox-group { - .validation-message { - transform: translate(16rem, 8rem); - } + .checkbox-group { + .validation-message { + transform: translate(16rem, 8rem); } + } - input { - &[value="8"] { - margin: 1rem 0; - } + input { + &[value="8"] { + margin: 1rem 0; } + } - .other-input { - margin-top: -5.75rem; - } + .other-input { + margin-top: -5.75rem; } } &.usescratch-step { - .card { - .form-group { - margin-bottom: 0; + .form-group { + margin-bottom: 0; - &.has-error { - .textarea { - border: 1px solid $ui-orange; - } + &.has-error { + .textarea { + border: 1px solid $ui-orange; } } + } - p { - &.char-count { - margin-top: 0; - margin-bottom: 1rem; - text-align: right; - } + p { + &.char-count { + margin-top: 0; + margin-bottom: 1rem; + text-align: right; } } } @@ -163,11 +151,9 @@ @media only screen and (max-width: $mobile - 1) { .registration-step { &.demographics-step { - .card { - .radio { - width: 100%; - text-align: left; - } + .radio { + width: 100%; + text-align: left; } } @@ -183,30 +169,24 @@ @media only screen and (max-width: $desktop - 1) { .registration-step { - .card { - .form { - text-align: left; - } + .form { + text-align: left; } &.phone-step { - .card { - .checkbox, - .validation-message { - text-align: left; - } + .checkbox, + .validation-message { + text-align: left; + } - .checkbox { - margin-bottom: 1rem; - } + .checkbox { + margin-bottom: 1rem; } } &.organization-step { - .card { - .checkbox-group { - text-align: left; - } + .checkbox-group { + text-align: left; } } } From af2165a6972e50cbf4afd1780b2f2e59f9d95a22 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 22 Aug 2016 15:55:43 -0400 Subject: [PATCH 04/26] Add Abkhaz to custom locale list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it’s not in `intl-messageformat`. Give it Azerbaijani as a parent language for now, as they have similar enough structures for plualization/alphabet purposes. --- custom-locales.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom-locales.json b/custom-locales.json index ad3e37405..83c4a0b11 100644 --- a/custom-locales.json +++ b/custom-locales.json @@ -1,4 +1,8 @@ { + "ab": { + "locale": "ab", + "parentLocale": "az" + }, "an": { "locale": "an", "parentLocale": "ca" From 9657262daa2e0288a13147ee2d9234d135710f91 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 22 Aug 2016 16:01:17 -0400 Subject: [PATCH 05/26] Capitalize other languages per https://github.com/LLK/scratchr2/pull/3954#issuecomment-241529290 --- languages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languages.json b/languages.json index 411834551..774ddf326 100644 --- a/languages.json +++ b/languages.json @@ -21,7 +21,7 @@ "eu": "Euskara", "fa": "فارسی", "fr": "Français", - "fur": "furlan", + "fur": "Furlan", "ga": "Gaeilge", "gd": "Gàidhlig", "gl": "Galego", @@ -61,7 +61,7 @@ "ro": "Română", "ru": "Русский", "sc": "Sardu", - "sq": "shqiptar", + "sq": "Shqiptar", "sk": "Slovenčina", "sl": "Slovenščina", "sr": "Српски", From 3ab92e0c36ccbebe63fb2216a0cf81b017b1c6d2 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 22 Aug 2016 16:33:06 -0400 Subject: [PATCH 06/26] capitalize one more language existing, but needs it --- languages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.json b/languages.json index 774ddf326..85679754d 100644 --- a/languages.json +++ b/languages.json @@ -65,7 +65,7 @@ "sk": "Slovenčina", "sl": "Slovenščina", "sr": "Српски", - "fi": "suomi", + "fi": "Suomi", "sv": "Svenska", "te": "తెలుగు", "nai": "Tepehuan", From f883ecfbaeb9b5d196a4acd97ff8d0a6a5f108b1 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 8 Aug 2016 08:38:32 -0400 Subject: [PATCH 07/26] commit changes --- src/_colors.scss | 1 + src/components/grid/grid.jsx | 3 ++ src/components/grid/grid.scss | 37 ++++++++++----- src/components/thumbnail/thumbnail.jsx | 4 +- src/views/explore/explore.jsx | 62 ++++++++++++++------------ src/views/explore/explore.scss | 46 +++++++++++++++---- 6 files changed, 105 insertions(+), 48 deletions(-) diff --git a/src/_colors.scss b/src/_colors.scss index 7a8947665..dff8ef60a 100644 --- a/src/_colors.scss +++ b/src/_colors.scss @@ -11,6 +11,7 @@ $background-color: hsla(0, 0, 99, 1); //#FDFDFD /* UI Secondary Colors */ $ui-aqua: hsla(170, 70, 50, 1); //#26D9BB $ui-purple: hsla(265, 55, 55, 1); //#824DCB +$ui-yellow: hsla(45, 100, 50, 1); //#FFBF00 $ui-white: #fff; $ui-border: hsla(0, 0, 85, 1); //#D9D9D9 diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 04f8a0b42..052a61dd7 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -12,6 +12,7 @@ var Grid = React.createClass({ return { items: require('./grid.json'), itemType: 'projects', + explore: false, showLoves: false, showFavorites: false, showRemixes: false, @@ -32,6 +33,7 @@ var Grid = React.createClass({ if (this.props.itemType == 'projects') { return ( - - - {this.getBubble('all')} - {this.getBubble('animations')} - {this.getBubble('art')} - {this.getBubble('games')} - {this.getBubble('music')} - {this.getBubble('stories')} - - - {this.getTab('projects')} - {this.getTab('studios')} - -
- - - - + +
+

Explore

- +
+ + {this.getTab('projects')} + {this.getTab('studios')} + + + {this.getBubble('all')} + {this.getBubble('animations')} + {this.getBubble('art')} + {this.getBubble('games')} + {this.getBubble('music')} + {this.getBubble('stories')} + +
+ + + + +
diff --git a/src/views/explore/explore.scss b/src/views/explore/explore.scss index 3e8406771..8918d0e04 100644 --- a/src/views/explore/explore.scss +++ b/src/views/explore/explore.scss @@ -4,6 +4,36 @@ $base-bg: $ui-white; #view { + padding: 0; +} + +.outer { + .title-banner { + &.masthead { + margin-bottom: 0; + background-color: $ui-yellow; + padding: 0; + + h1 { + text-align: center; + color: $ui-white; + font-size: 3rem; + } + + p { + margin: 0; + width: $cols6; + text-align: left; + color: $ui-white; + + a { + border-bottom: 1px solid $ui-white; + color: $ui-white; + } + } + } + } + .box { display: block; margin-right: auto; @@ -13,7 +43,7 @@ $base-bg: $ui-white; .box-content { padding: 0; } - } + } .categories { display: inline-block; @@ -26,20 +56,20 @@ $base-bg: $ui-white; opacity: .75; background-color: $ui-white; color: $header-gray; - + &:hover { opacity: 1; border-color: $active-dark-gray; } - } - li.active { - opacity: 1; - border-color: $active-dark-gray; - - &:hover { + &.active { opacity: 1; border-color: $active-dark-gray; + + &:hover { + opacity: 1; + border-color: $active-dark-gray; + } } } } From 432b621079729244e8f978d0ac1ff802ea562383 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 8 Aug 2016 13:00:40 -0400 Subject: [PATCH 08/26] wip --- src/components/grid/grid.jsx | 15 ++++++++++- src/components/thumbnail/thumbnail.jsx | 9 +++++++ src/views/explore/explore.jsx | 3 ++- src/views/explore/explore.scss | 37 +++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 3 deletions(-) diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 052a61dd7..292cd416b 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -4,6 +4,7 @@ var React = require('react'); var Thumbnail = require('../thumbnail/thumbnail.jsx'); var FlexRow = require('../flex-row/flex-row.jsx'); +var api = require('../../lib/api'); require('./grid.scss'); var Grid = React.createClass({ @@ -16,9 +17,19 @@ var Grid = React.createClass({ showLoves: false, showFavorites: false, showRemixes: false, - showViews: false + showViews: false, + showAvatar: false }; }, + getAvatar: function (username) { + var url = ''; + api({ + uri: '/users/' + username + }, function (err, body) { + this.url = body.profile.images['32x32']; + }.bind(this)); + console.log(url); + }, render: function () { var classes = classNames( 'grid', @@ -38,10 +49,12 @@ var Grid = React.createClass({ showFavorites={this.props.showFavorites} showRemixes={this.props.showRemixes} showViews={this.props.showViews} + showAvatar={this.props.showAvatar} type={'project'} href={href} title={item.title} src={item.image} + avatar={this.getAvatar(item.author.username)} creator={item.author.username} loves={item.stats.loves} favorites={item.stats.favorites} diff --git a/src/components/thumbnail/thumbnail.jsx b/src/components/thumbnail/thumbnail.jsx index 32fff6206..8fa73c3b3 100644 --- a/src/components/thumbnail/thumbnail.jsx +++ b/src/components/thumbnail/thumbnail.jsx @@ -14,11 +14,13 @@ var Thumbnail = React.createClass({ href: '#', title: 'Project', src: '', + avatar: '', type: 'project', showLoves: false, showFavorites: false, showRemixes: false, showViews: false, + showAvatar: false, linkTitle: true, explore: false, alt: '' @@ -32,6 +34,13 @@ var Thumbnail = React.createClass({ {'explore': this.props.explore} ); var extra = []; + if (this.props.avatar && this.props.showAvatar) { + extra.push( + + {this.props.creator} + + ); + } if (this.props.creator) { extra.push(
diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 83b585f09..f92ea9a7a 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -139,7 +139,8 @@ var Explore = injectIntl(React.createClass({ explore={true} showLoves={false} showFavorites={false} - showViews={false} /> + showViews={false} + showAvatar={true}/> - + +
-
); diff --git a/src/views/search/search.scss b/src/views/search/search.scss index 49752fb82..888d2de38 100644 --- a/src/views/search/search.scss +++ b/src/views/search/search.scss @@ -4,33 +4,276 @@ $base-bg: $ui-white; #view { - .box { - display: block; - margin-right: auto; - margin-bottom: 20px; - margin-left: auto; + background-color: $ui-gray; + padding: 0; +} - .box-content { +.outer { + .title-banner { + &.masthead { + margin-bottom: 0; + background-color: darken($ui-blue, 10%); padding: 0; - } - } - #projectBox { - border-top: 2px solid; - border-color: $active-gray; + h1 { + text-align: center; + color: $ui-white; + font-size: 3rem; + } + + p { + margin: 0; + width: $cols6; + text-align: left; + color: $ui-white; + + a { + border-bottom: 1px solid $ui-white; + color: $ui-white; + } + } + } + } + + .search { + margin: 0 auto; + border-right: 0; + width: $cols6; + color: $type-white; + + .form { + margin: 0; + } + + .row { + .help-block { + display: none; + } + } + + .input, + .button { + display: inline-block; + margin-top: 5px; + outline: none; + border: 0; + background-color: $active-gray; + height: 14px; + + &[type=text] { + transition: .15s ease background-color; + padding: 0; + padding-right: 10px; + padding-left: 40px; + width: calc(100% - 50px); + height: 40px; + color: $type-white; + font-size: .85em; + + &::placeholder { + $placeholder-transparent: rgba(255, 255, 255, .75); + color: $placeholder-transparent; + } + + &:focus { + transition: .15s ease background-color; + background-color: $active-dark-gray; + } + + .ie9 & { + width: 70px; + } + } + } + + .btn-search { + position: absolute; + + box-shadow: none; + background-color: transparent; + background-image: url("/images/nav-search-glass.png"); + background-repeat: no-repeat; + background-position: center center; + background-size: 14px 14px; + + width: 40px; + height: 40px; + + &:hover { + box-shadow: none; + } + } + } + + .select { + select { + margin-bottom: 0; + color: $header-gray; + } + + .help-block { + display: none; + } + } + + .tab-background { + box-shadow: 0 0 1px $box-shadow-gray; background-color: $ui-white; - padding-bottom: 30px; width: 100%; } - .load button { - outline: None; - border: None; - background-color: $ui-white; + #projectBox { + margin-top: 16px; + background-color: $ui-gray; + padding-bottom: 32px; + width: 100%; + + .grid .flex-row { + width: $cols12; + justify-content: space-between; + } + + .button { + display: block; + margin: 0 auto; + } + } + + + .thumbnail { + $project-width: 220px; + $project-height: 208px; padding: 0; - li { - color: $header-gray; + &.project { + margin-bottom: 16px; + border-radius: 4px; + width: $project-width; + height: $project-height; + + .thumbnail-image { + margin: 8px auto; + width: 204px; + height: 152px; + + img { + border: 0; + border-radius: 4px; + } + } + } + + &.gallery { + margin-bottom: 16px; + border-radius: 4px; + width: $project-width; + height: $project-height; + + .thumbnail-image { + margin: 8px auto; + width: 204px; + height: 120px; + + img { + border: 0; + border-radius: 4px; + } + } + } + + .thumbnail-info { + margin: 0 auto; + width: 204px; + + .creator-image { + float: left; + + img { + margin-right: 8px; + border-radius: 4px; + width: 32px; + height: 32px; + } + } + + .thumbnail-title { + float: left; + max-width: 164px; + + .thumbnail-creator a { + color: $type-gray; + } + } + } + } +} + +//4 columns +@media only screen and (max-width: $mobile - 1) { + .outer { + .search { + .btn-search { + left: 40px; + } + } + + .tabs { + width: $cols4; + } + + .sort-controls { + width: $cols4; + } + + #projectBox { + .grid { + .flex-row { + width: $cols4; + } + } + } + } +} + + +//6 columns +@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) { + .outer { + .tabs { + width: $cols6; + } + + .sort-controls { + width: $cols6; + } + + #projectBox { + .grid { + .flex-row { + width: $cols6; + } + } + } + } +} + +// 8 columns +@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) { + .outer { + .tabs { + width: $cols8; + } + + .sort-controls { + width: $cols8; + } + + #projectBox { + .grid { + .flex-row { + width: $cols9; + } + } } } } From 6394d3e8cf0b7461792955606f715ac3d6b4431f Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 16 Aug 2016 19:19:01 -0600 Subject: [PATCH 17/26] make search bar on 4 column layout look right --- src/views/search/search.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/search/search.scss b/src/views/search/search.scss index 888d2de38..032c3b43b 100644 --- a/src/views/search/search.scss +++ b/src/views/search/search.scss @@ -212,6 +212,8 @@ $base-bg: $ui-white; @media only screen and (max-width: $mobile - 1) { .outer { .search { + width: $cols4; + .btn-search { left: 40px; } From f27e99f1a4afa34d61091f044051d494a802cc5d Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 22 Aug 2016 11:21:08 -0600 Subject: [PATCH 18/26] move card styling to grid.scss, use card as default grid style --- src/components/grid/grid.jsx | 3 - src/components/grid/grid.scss | 118 ++++++++++++++++--------- src/components/thumbnail/thumbnail.jsx | 4 +- src/views/explore/explore.scss | 95 -------------------- src/views/search/search.scss | 97 -------------------- 5 files changed, 76 insertions(+), 241 deletions(-) diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 6764484f5..93572840d 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -12,7 +12,6 @@ var Grid = React.createClass({ return { items: require('./grid.json'), itemType: 'projects', - cards: false, showLoves: false, showFavorites: false, showRemixes: false, @@ -34,7 +33,6 @@ var Grid = React.createClass({ if (this.props.itemType == 'projects') { return ( Date: Mon, 22 Aug 2016 11:30:44 -0600 Subject: [PATCH 19/26] remove inactive class on tabs --- src/components/tabs/tabs.scss | 13 +++++++++---- src/views/explore/explore.jsx | 3 +-- src/views/search/search.jsx | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/tabs/tabs.scss b/src/components/tabs/tabs.scss index 303708f45..a612c3f76 100644 --- a/src/components/tabs/tabs.scss +++ b/src/components/tabs/tabs.scss @@ -1,6 +1,12 @@ @import "../../colors"; @import "../../frameless"; +.tab-background { + box-shadow: 0 0 1px $box-shadow-gray; + background-color: $ui-white; + width: 100%; +} + .tabs { background-color: $ui-white; padding: 0; @@ -20,6 +26,7 @@ border-bottom: 3px solid $ui-aqua; &:hover { + border-bottom: 3px solid $ui-aqua; color: $header-gray; } } @@ -29,10 +36,8 @@ padding: .75em 1.5em; } - &.inactive { - &:hover { - border-bottom: 3px solid $active-dark-gray; - } + &:hover { + border-bottom: 3px solid $active-dark-gray; } .tab-icon { diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 3a17a8ae5..993056c28 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -115,8 +115,7 @@ var Explore = injectIntl(React.createClass({ }, getTab: function (type) { var classes = classNames({ - active: (this.props.itemType === type), - inactive: (this.props.itemType !== type) + active: (this.props.itemType === type) }); return ( diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index 66031db6b..87e2b9ae0 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -80,7 +80,7 @@ var Search = injectIntl(React.createClass({ getTab: function (type) { var term = this.props.searchTerm.split(' ').join('+'); var allTab = -
  • +
  • From f0703b9f4697aa27352965b71ce2577ff252d0fd Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 23 Aug 2016 08:11:18 -0600 Subject: [PATCH 20/26] fix styling error --- src/components/grid/grid.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 88734b987..d890a0e2d 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -15,7 +15,8 @@ margin: 0 auto; padding: 12px; width: $cols12; - justify-content: space-between; } + justify-content: space-between; + } .thumbnail { padding: 0; From 32ef37e3bf6215f78506ae7c7017680b2bc95bb2 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 23 Aug 2016 11:10:02 -0600 Subject: [PATCH 21/26] remove unused variable --- src/views/explore/explore.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 993056c28..c1c0e00df 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -131,7 +131,6 @@ var Explore = injectIntl(React.createClass({ ); }, render: function () { - var formatMessage = this.props.intl.formatMessage; return (
    From 9a11e49444f0c56de4ab4c97ee000b59f5085047 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 07:54:08 -0400 Subject: [PATCH 22/26] Add `device-width` by default Now that we have mobile nav/footer --- src/routes.json | 18 ++++++------------ src/template-config.js | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/routes.json b/src/routes.json index 0520c20cd..478b94c9e 100644 --- a/src/routes.json +++ b/src/routes.json @@ -4,8 +4,7 @@ "pattern": "^/?$", "routeAlias": "/?$", "view": "splash/splash", - "title": "Imagine, Program, Share", - "viewportWidth": "device-width" + "title": "Imagine, Program, Share" }, { "name": "about", @@ -48,32 +47,28 @@ "pattern": "^/conference/plan/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/plan/plan", - "title": "Plan Your Visit", - "viewportWidth": "device-width" + "title": "Plan Your Visit" }, { "name": "conference-expectations", "pattern": "^/conference/expect/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/expect/expect", - "title": "What to Expect", - "viewportWidth": "device-width" + "title": "What to Expect" }, { "name": "conference-schedule", "pattern": "^/conference/schedule/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/schedule/schedule", - "title": "Conference Schedule", - "viewportWidth": "device-width" + "title": "Conference Schedule" }, { "name": "conference-details", "pattern": "^/conference/:id/details/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/details/details", - "title": "Event Details", - "viewportWidth": "device-width" + "title": "Event Details" }, { "name": "developers", @@ -108,8 +103,7 @@ "pattern": "^/educators/register/?$", "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teacherregistration/teacherregistration", - "title": "Teacher Registration", - "viewportWidth": "device-width" + "title": "Teacher Registration" }, { "name": "teacherwaitingroom", diff --git a/src/template-config.js b/src/template-config.js index 297328d74..33cd26ca7 100644 --- a/src/template-config.js +++ b/src/template-config.js @@ -7,7 +7,7 @@ module.exports = { 'and animations.', // override if mobile-friendly - viewportWidth: 942, + viewportWidth: 'device-width', // Open graph og_image: 'https://scratch.mit.edu/images/scratch-og.png', From 28f96a1d0db54a89546c47c8ffc5b306723b35f3 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 10:23:26 -0400 Subject: [PATCH 23/26] Align grid items on the left use `flex-start` with margins to ensure proper spacing between, while still starting at the left of each row. --- src/components/grid/grid.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index d890a0e2d..97047f516 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -15,10 +15,11 @@ margin: 0 auto; padding: 12px; width: $cols12; - justify-content: space-between; + justify-content: flex-start; } .thumbnail { + margin: 6px; padding: 0; &.project { From fb5d9788f86faf7c50a77e6c622474498bed47e1 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 10:24:01 -0400 Subject: [PATCH 24/26] Re-structure grid styling a bit combine stylings where possible, re-name some of the variables to be used more often --- src/components/grid/grid.scss | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 97047f516..914090982 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -5,11 +5,11 @@ display: inline-block; width: 100%; - $project-width: 220px; + $thumbnail-width: 220px; + $thumbnail-inner-width: 204px; + $project-height: 208px; - - $gallery-width: 200px; - $gallery-height: 118px; + $gallery-height: 164px; .flex-row { margin: 0 auto; @@ -22,46 +22,46 @@ margin: 6px; padding: 0; + &.gallery, &.project { margin-bottom: 16px; border-radius: 4px; box-shadow: 0 0 3px $box-shadow-gray; background-color: $ui-white; - width: $project-width; - height: $project-height; + width: $thumbnail-width; .thumbnail-image { margin: 8px auto; - width: 204px; + width: $thumbnail-inner-width; + } + } + + &.project { + height: $project-height; + + .thumbnail-image { height: 152px; img { margin: 0 auto; border: 0; border-radius: 4px; - width: 204px; + width: $thumbnail-inner-width; height: 152px; } } } &.gallery { - margin-bottom: 16px; - border-radius: 4px; - box-shadow: 0 0 3px $box-shadow-gray; - background-color: $ui-white; - width: $project-width; - height: 164px; + height: $gallery-height; .thumbnail-image { - margin: 8px auto; - width: 204px; height: 120px; img { border: 0; border-radius: 4px; - width: 204px; + width: $thumbnail-inner-width; height: 120px; } } @@ -69,7 +69,7 @@ .thumbnail-info { margin: 0 auto; - width: 204px; + width: $thumbnail-inner-width; .creator-image { float: left; From 5dd80c10200c868f7df23cd7a3d2e0cb6cb65d36 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 10:55:13 -0400 Subject: [PATCH 25/26] additional reformatting --- src/components/grid/grid.scss | 71 ++++++++++++++++------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 914090982..2afed6b19 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -13,26 +13,46 @@ .flex-row { margin: 0 auto; - padding: 12px; + padding: 12px 0; width: $cols12; justify-content: flex-start; } .thumbnail { - margin: 6px; - padding: 0; + margin: 7px; + border-radius: 4px; + box-shadow: 0 0 3px $box-shadow-gray; + background-color: $ui-white; + padding-bottom: 4px; + width: $thumbnail-width; - &.gallery, - &.project { - margin-bottom: 16px; - border-radius: 4px; - box-shadow: 0 0 3px $box-shadow-gray; - background-color: $ui-white; - width: $thumbnail-width; + .thumbnail-image { + margin: 8px auto; + width: $thumbnail-inner-width; + } - .thumbnail-image { - margin: 8px auto; - width: $thumbnail-inner-width; + .thumbnail-info { + margin: 0 auto; + width: $thumbnail-inner-width; + + .creator-image { + float: left; + + img { + margin-right: 8px; + border-radius: 4px; + width: 32px; + height: 32px; + } + } + + .thumbnail-title { + float: left; + max-width: 164px; + + .thumbnail-creator a { + color: $type-gray; + } } } @@ -66,31 +86,6 @@ } } } - - .thumbnail-info { - margin: 0 auto; - width: $thumbnail-inner-width; - - .creator-image { - float: left; - - img { - margin-right: 8px; - border-radius: 4px; - width: 32px; - height: 32px; - } - } - - .thumbnail-title { - float: left; - max-width: 164px; - - .thumbnail-creator a { - color: $type-gray; - } - } - } } &.column { From ab6f8e1049d7c912d3cbb34c6b3cfd287553c516 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 16:38:39 -0400 Subject: [PATCH 26/26] Add in an Oxford Comma *whistles as he commits see https://github.com/LLK/scratch-www/pull/819#issuecomment-242195194 --- src/views/faq/l10n.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/faq/l10n.json b/src/views/faq/l10n.json index bdb848a5b..a81f73c91 100644 --- a/src/views/faq/l10n.json +++ b/src/views/faq/l10n.json @@ -13,7 +13,7 @@ "faq.makeGameTitle":"How do I make a game or animation with Scratch?", "faq.makeGameBody":"Check out the help page to see lots of ways to get started with Scratch. Or just dive in to the project editor.", "faq.requirementsTitle":"What are the system requirements for Scratch?", - "faq.requirementsBody":"To run Scratch 2, you need to be using (1) a Mac, Linux or Windows computer; (2) a version of Adobe Flash Player released on or after June 15, 2016; (3) a relatively recent web browser: one of the latest two versions of Chrome, Firefox, Safari (Mac or Windows only), Edge (Windows only), or Internet Explorer 10+ (Windows only). If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2 website.", + "faq.requirementsBody":"To run Scratch 2, you need to be using (1) a Mac, Linux, or Windows computer; (2) a version of Adobe Flash Player released on or after June 15, 2016; (3) a relatively recent web browser: one of the latest two versions of Chrome, Firefox, Safari (Mac or Windows only), Edge (Windows only), or Internet Explorer 10+ (Windows only). If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2 website.", "faq.offlineTitle":"Do you have a downloadable version so I can create and view projects offline?", "faq.offlineBody":"The Scratch 2 offline editor allows you to create Scratch projects without an internet connection. You can download Scratch 2 from the website. You can also still use Scratch 1.4. Note: You can have both Scratch 1.4 and 2 on your computer.", "faq.uploadOldTitle":"Can I still upload projects created with older versions of Scratch to the website?",