commit changes

This commit is contained in:
Technoboy10 2016-08-08 08:38:32 -04:00
parent f714f8711e
commit f883ecfbae
6 changed files with 105 additions and 48 deletions

View file

@ -11,6 +11,7 @@ $background-color: hsla(0, 0, 99, 1); //#FDFDFD
/* UI Secondary Colors */ /* UI Secondary Colors */
$ui-aqua: hsla(170, 70, 50, 1); //#26D9BB $ui-aqua: hsla(170, 70, 50, 1); //#26D9BB
$ui-purple: hsla(265, 55, 55, 1); //#824DCB $ui-purple: hsla(265, 55, 55, 1); //#824DCB
$ui-yellow: hsla(45, 100, 50, 1); //#FFBF00
$ui-white: #fff; $ui-white: #fff;
$ui-border: hsla(0, 0, 85, 1); //#D9D9D9 $ui-border: hsla(0, 0, 85, 1); //#D9D9D9

View file

@ -12,6 +12,7 @@ var Grid = React.createClass({
return { return {
items: require('./grid.json'), items: require('./grid.json'),
itemType: 'projects', itemType: 'projects',
explore: false,
showLoves: false, showLoves: false,
showFavorites: false, showFavorites: false,
showRemixes: false, showRemixes: false,
@ -32,6 +33,7 @@ var Grid = React.createClass({
if (this.props.itemType == 'projects') { if (this.props.itemType == 'projects') {
return ( return (
<Thumbnail key={item.id} <Thumbnail key={item.id}
explore={this.props.explore}
showLoves={this.props.showLoves} showLoves={this.props.showLoves}
showFavorites={this.props.showFavorites} showFavorites={this.props.showFavorites}
showRemixes={this.props.showRemixes} showRemixes={this.props.showRemixes}
@ -50,6 +52,7 @@ var Grid = React.createClass({
else { else {
return ( return (
<Thumbnail key={item.id} <Thumbnail key={item.id}
explore={this.props.explore}
type={'gallery'} type={'gallery'}
href={href} href={href}
title={item.title} title={item.title}

View file

@ -1,4 +1,5 @@
@import "../../frameless"; @import "../../frameless";
@import "../../colors";
.grid { .grid {
display: inline-block; display: inline-block;
@ -20,21 +21,37 @@
.thumbnail { .thumbnail {
padding: 12px; padding: 12px;
&.project { &:not(.explore) {
width: $project-width; &.project {
img {
width: $project-width; width: $project-width;
height: $project-height;
img {
width: $project-width;
height: $project-height;
}
}
&.gallery {
width: $gallery-width;
img {
width: $gallery-width;
height: $gallery-height;
}
} }
} }
&.gallery { &.explore {
width: $gallery-width; &.project {
box-shadow: 0 0 3px $box-shadow-gray;
background-color: $ui-white;
width: 220px;
height: 208px;
img { img {
width: $gallery-width; width: 204px;
height: $gallery-height; height: 152px;
}
} }
} }
} }

View file

@ -20,6 +20,7 @@ var Thumbnail = React.createClass({
showRemixes: false, showRemixes: false,
showViews: false, showViews: false,
linkTitle: true, linkTitle: true,
explore: false,
alt: '' alt: ''
}; };
}, },
@ -27,7 +28,8 @@ var Thumbnail = React.createClass({
var classes = classNames( var classes = classNames(
'thumbnail', 'thumbnail',
this.props.type, this.props.type,
this.props.className this.props.className,
{'explore': this.props.explore}
); );
var extra = []; var extra = [];
if (this.props.creator) { if (this.props.creator) {

View file

@ -7,8 +7,8 @@ var render = require('../../lib/render.jsx');
var api = require('../../lib/api'); var api = require('../../lib/api');
var Page = require('../../components/page/www/page.jsx'); var Page = require('../../components/page/www/page.jsx');
var Box = require('../../components/box/box.jsx');
var Tabs = require('../../components/tabs/tabs.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 SubNavigation = require('../../components/subnavigation/subnavigation.jsx');
var Grid = require('../../components/grid/grid.jsx'); var Grid = require('../../components/grid/grid.jsx');
@ -59,7 +59,7 @@ var Explore = injectIntl(React.createClass({
}, },
getExploreMore: function () { getExploreMore: function () {
var qText = '&q=' + this.props.acceptableTabs[this.props.category] || '*'; var qText = '&q=' + this.props.acceptableTabs[this.props.category] || '*';
api({ api({
uri: '/search/' + this.props.itemType + uri: '/search/' + this.props.itemType +
'?limit=' + this.props.loadNumber + '?limit=' + this.props.loadNumber +
@ -116,34 +116,38 @@ var Explore = injectIntl(React.createClass({
return ( return (
<div> <div>
<div className='outer'> <div className='outer'>
<Box title={formatMessage({id: 'general.explore'})}> <TitleBanner className="masthead">
<SubNavigation className='categories'> <div className="inner">
{this.getBubble('all')} <h1>Explore</h1>
{this.getBubble('animations')}
{this.getBubble('art')}
{this.getBubble('games')}
{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}
showLoves={false}
showFavorites={false}
showViews={false} />
<SubNavigation className='load'>
<button onClick={this.getExploreMore}>
<li>
<FormattedMessage id='general.loadMore' />
</li>
</button>
</SubNavigation>
</div> </div>
</Box> </TitleBanner>
<Tabs>
{this.getTab('projects')}
{this.getTab('studios')}
</Tabs>
<SubNavigation className='categories'>
{this.getBubble('all')}
{this.getBubble('animations')}
{this.getBubble('art')}
{this.getBubble('games')}
{this.getBubble('music')}
{this.getBubble('stories')}
</SubNavigation>
<div id='projectBox' key='projectBox'>
<Grid items={this.state.loaded}
itemType={this.props.itemType}
explore={true}
showLoves={false}
showFavorites={false}
showViews={false} />
<SubNavigation className='load'>
<button onClick={this.getExploreMore}>
<li>
<FormattedMessage id='general.loadMore' />
</li>
</button>
</SubNavigation>
</div>
</div> </div>
</div> </div>

View file

@ -4,6 +4,36 @@
$base-bg: $ui-white; $base-bg: $ui-white;
#view { #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 { .box {
display: block; display: block;
margin-right: auto; margin-right: auto;
@ -13,7 +43,7 @@ $base-bg: $ui-white;
.box-content { .box-content {
padding: 0; padding: 0;
} }
} }
.categories { .categories {
display: inline-block; display: inline-block;
@ -26,20 +56,20 @@ $base-bg: $ui-white;
opacity: .75; opacity: .75;
background-color: $ui-white; background-color: $ui-white;
color: $header-gray; color: $header-gray;
&:hover { &:hover {
opacity: 1; opacity: 1;
border-color: $active-dark-gray; border-color: $active-dark-gray;
} }
}
li.active { &.active {
opacity: 1;
border-color: $active-dark-gray;
&:hover {
opacity: 1; opacity: 1;
border-color: $active-dark-gray; border-color: $active-dark-gray;
&:hover {
opacity: 1;
border-color: $active-dark-gray;
}
} }
} }
} }