mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
commit changes
This commit is contained in:
parent
f714f8711e
commit
f883ecfbae
6 changed files with 105 additions and 48 deletions
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
<Thumbnail key={item.id}
|
||||
explore={this.props.explore}
|
||||
showLoves={this.props.showLoves}
|
||||
showFavorites={this.props.showFavorites}
|
||||
showRemixes={this.props.showRemixes}
|
||||
|
@ -50,6 +52,7 @@ var Grid = React.createClass({
|
|||
else {
|
||||
return (
|
||||
<Thumbnail key={item.id}
|
||||
explore={this.props.explore}
|
||||
type={'gallery'}
|
||||
href={href}
|
||||
title={item.title}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import "../../frameless";
|
||||
@import "../../colors";
|
||||
|
||||
.grid {
|
||||
display: inline-block;
|
||||
|
@ -20,6 +21,7 @@
|
|||
.thumbnail {
|
||||
padding: 12px;
|
||||
|
||||
&:not(.explore) {
|
||||
&.project {
|
||||
width: $project-width;
|
||||
|
||||
|
@ -39,6 +41,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
&.explore {
|
||||
&.project {
|
||||
box-shadow: 0 0 3px $box-shadow-gray;
|
||||
background-color: $ui-white;
|
||||
width: 220px;
|
||||
height: 208px;
|
||||
|
||||
img {
|
||||
width: 204px;
|
||||
height: 152px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.column {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
|
|
@ -20,6 +20,7 @@ var Thumbnail = React.createClass({
|
|||
showRemixes: false,
|
||||
showViews: false,
|
||||
linkTitle: true,
|
||||
explore: false,
|
||||
alt: ''
|
||||
};
|
||||
},
|
||||
|
@ -27,7 +28,8 @@ var Thumbnail = React.createClass({
|
|||
var classes = classNames(
|
||||
'thumbnail',
|
||||
this.props.type,
|
||||
this.props.className
|
||||
this.props.className,
|
||||
{'explore': this.props.explore}
|
||||
);
|
||||
var extra = [];
|
||||
if (this.props.creator) {
|
||||
|
|
|
@ -7,8 +7,8 @@ var render = require('../../lib/render.jsx');
|
|||
var api = require('../../lib/api');
|
||||
|
||||
var Page = require('../../components/page/www/page.jsx');
|
||||
var Box = require('../../components/box/box.jsx');
|
||||
var Tabs = require('../../components/tabs/tabs.jsx');
|
||||
var TitleBanner = require('../../components/title-banner/title-banner.jsx');
|
||||
var SubNavigation = require('../../components/subnavigation/subnavigation.jsx');
|
||||
var Grid = require('../../components/grid/grid.jsx');
|
||||
|
||||
|
@ -116,7 +116,15 @@ var Explore = injectIntl(React.createClass({
|
|||
return (
|
||||
<div>
|
||||
<div className='outer'>
|
||||
<Box title={formatMessage({id: 'general.explore'})}>
|
||||
<TitleBanner className="masthead">
|
||||
<div className="inner">
|
||||
<h1>Explore</h1>
|
||||
</div>
|
||||
</TitleBanner>
|
||||
<Tabs>
|
||||
{this.getTab('projects')}
|
||||
{this.getTab('studios')}
|
||||
</Tabs>
|
||||
<SubNavigation className='categories'>
|
||||
{this.getBubble('all')}
|
||||
{this.getBubble('animations')}
|
||||
|
@ -125,13 +133,10 @@ var Explore = injectIntl(React.createClass({
|
|||
{this.getBubble('music')}
|
||||
{this.getBubble('stories')}
|
||||
</SubNavigation>
|
||||
<Tabs>
|
||||
{this.getTab('projects')}
|
||||
{this.getTab('studios')}
|
||||
</Tabs>
|
||||
<div id='projectBox' key='projectBox'>
|
||||
<Grid items={this.state.loaded}
|
||||
itemType={this.props.itemType}
|
||||
explore={true}
|
||||
showLoves={false}
|
||||
showFavorites={false}
|
||||
showViews={false} />
|
||||
|
@ -143,7 +148,6 @@ var Explore = injectIntl(React.createClass({
|
|||
</button>
|
||||
</SubNavigation>
|
||||
</div>
|
||||
</Box>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -31,9 +61,8 @@ $base-bg: $ui-white;
|
|||
opacity: 1;
|
||||
border-color: $active-dark-gray;
|
||||
}
|
||||
}
|
||||
|
||||
li.active {
|
||||
&.active {
|
||||
opacity: 1;
|
||||
border-color: $active-dark-gray;
|
||||
|
||||
|
@ -43,6 +72,7 @@ $base-bg: $ui-white;
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#projectBox {
|
||||
border-top: 2px solid;
|
||||
|
|
Loading…
Reference in a new issue