items are now done and pictures resize on serverside automagically
This commit is contained in:
@@ -20,9 +20,9 @@ var ItemList = React.createClass({
|
||||
return (
|
||||
<div className="row-fluid">
|
||||
<div className="span10">
|
||||
<ul className="item_list">
|
||||
<div style={{marginTop: 35, padding: '0 25px'}} className="row">
|
||||
{items}
|
||||
</ul>
|
||||
</div>
|
||||
{this.getPages()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,22 +11,36 @@ var SingleItem = React.createClass({
|
||||
var self = this;
|
||||
var itemClick = this.itemClick;
|
||||
var firstImage = this.props.item.get('multi_media_descriptions')[0];
|
||||
firstImage = firstImage || { url: "https://res.cloudinary.com/lfvt7ps2n/image/upload/c_crop,g_center,w_300/v1421732950/http_www.asms.ru_bitrix_templates_main_images_nophoto_irnofq.png" } ;
|
||||
firstImage = firstImage || { resized_url: "https://res.cloudinary.com/lfvt7ps2n/image/upload/c_fit,h_172,w_226/v1421732950/http_www.asms.ru_bitrix_templates_main_images_nophoto_irnofq.png" } ;
|
||||
if (hidePrice) {
|
||||
return (
|
||||
<div className="single_item" onClick={itemClick}>
|
||||
<img src={firstImage.url} className="item_list_image" />
|
||||
<h1> { this.props.item.get('name') }</h1>
|
||||
</div>
|
||||
<div className="col-lg-2 col-md-2 col-sm-3 col-xs-6">
|
||||
<div className="productbox">
|
||||
<img className="img-responsive" src={firstImage.url} alt="product image" />
|
||||
<div>
|
||||
|
||||
<p>{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }{ this.props.item.get('name') }</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else {
|
||||
return (
|
||||
<div className="single_item" onClick={itemClick}>
|
||||
<img src={firstImage.url} className="item_list_image" />
|
||||
<h1> { this.props.item.get('name') }</h1>
|
||||
<div>{ this.props.item.get('brand')? this.props.item.get('brand').name : '' } </div>
|
||||
<div> { this.props.item.get('list_price') } KM </div>
|
||||
return (
|
||||
|
||||
<div className="col-lg-2 col-md-2 col-sm-3 col-xs-6" onClick={itemClick}>
|
||||
<div className="productbox">
|
||||
<img className="img-responsive" src={firstImage.resized_url} alt="product image" />
|
||||
<div>
|
||||
<div>
|
||||
|
||||
<p>{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }{ this.props.item.get('name') }</p>
|
||||
<h4> { this.props.item.get('list_price') } KM </h4>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user