1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-14 22:22:39 +01:00

clean up and minor fixes

This commit is contained in:
devfake 2016-02-24 20:15:25 +01:00
parent 4d7869a150
commit 6027173fd4
5 changed files with 14 additions and 57 deletions

View File

@ -28,6 +28,7 @@ class Category extends Model implements SluggableInterface
{
return $this->hasOne('Flox\Item')
->selectRaw('category_id, count(*) as aggregate')
->where('removed', false)
->groupBy('category_id');
}

View File

@ -1,53 +0,0 @@
import React from 'react';
import Api from '../api';
// Todo: Make it work!
class Show extends React.Component {
constructor(props) {
super(props);
this.loadItem();
this.state = {
item: {}
};
}
render() {
let style = {
backgroundImage:
this.state.item.poster == 'null' || typeof this.state.item.poster === 'undefined'
? ''
: 'url(' + config.posterBig + this.state.item.poster + ')'
};
return (
<div className="wrap">
<div className="show-item-wrap">
<div className="image-wrap">
<div className="item-image item-image-big" style={style}>
{style.backgroundImage ? '' : <i className="icon-no-image"></i>}
<div className={'rating rating-' + this.state.item.rating}></div>
</div>
</div>
<div className="show-content">
<h2>{this.state.item.title}</h2>
</div>
</div>
</div>
);
}
loadItem() {
Api.searchItemBySlug(this.props.params.item).then((value) => {
Api.searchTMDBByID(value.tmdb_id);
});
}
}
export default Show;

View File

@ -4,6 +4,7 @@
box-sizing: border-box;
}
.wrap {
width: $width;
margin: 0 auto;

View File

@ -16,9 +16,9 @@
.site-nav {
float: right;
margin: 0 20px 0 0;
padding: 0 20px 0 0;
border-right: 1px solid #c86ede;
//margin: 0 20px 0 0;
//padding: 0 20px 0 0;
//border-right: 1px solid #c86ede;
li {
float: left;
@ -53,6 +53,15 @@
}
}
.add-wrap {
border-left: 1px solid #c86ede;
margin: 0 0 0 20px;
}
.icon-add {
margin: 0 0 0 20px;
}
.icon-search-wrap {
margin: 0 0 0 10px;
}

View File

@ -5,7 +5,6 @@
},
"dependencies": {
"laravel-elixir": "^5.0.*",
"laravel-elixir-lost": "^2.0.0",
"laravel-elixir-spritesmith": "^0.3.*",
"react": "^0.14.7",
"react-dom": "^0.14.7",