Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"react-loading-image": "^0.5.0",
"react-modal2": "^5.0.0",
"react-nl2br": "^0.4.0",
"react-placeholder-image": "^0.1.8",
"react-router-dom": "^4.3.1",
"react-router-scroll-memory": "^2.0.3",
"react-textarea-autosize": "^7.1.0",
Expand Down
23 changes: 14 additions & 9 deletions resources/assets/js/Collection/CollectionGridItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import classNames from "classnames";
import Heart from "../icons/Heart";
import RemoveButton from "../ui/RemoveButton";

import { CustomPlaceholder } from "react-placeholder-image"

export default function CollectionGridItem({
onObjectClick,
onSelectionClick,
Expand Down Expand Up @@ -58,15 +60,18 @@ export default function CollectionGridItem({
"--aspect-ratio": datum.images[0].width / datum.images[0].height
}}
>
<img
sizes="(min-width: 1800px) calc((100vw - 288px - (40px * 6)) / 6),
(min-width: 1600px) and (max-width: 1799px) calc((100vw - 288px - (40px * 5)) / 5),
(min-width: 1440px) and (max-width: 1599px) calc((100vw - 288px - (40px * 4)) / 4),
(min-width: 1025px) and (max-width: 1439px) calc((100vw - 288px - (40px * 3)) / 3),
(min-width: 800px) and (max-width: 1024px) calc((100vw - (40px * 4)) / 3),
calc(100vw - (3 * 15px) / 2)"
srcSet={`${img330} 330w, ${img600} 600w`}
/>
{/*<img*/}
{/* sizes="(min-width: 1800px) calc((100vw - 288px - (40px * 6)) / 6),*/}
{/* (min-width: 1600px) and (max-width: 1799px) calc((100vw - 288px - (40px * 5)) / 5),*/}
{/* (min-width: 1440px) and (max-width: 1599px) calc((100vw - 288px - (40px * 4)) / 4),*/}
{/* (min-width: 1025px) and (max-width: 1439px) calc((100vw - 288px - (40px * 3)) / 3),*/}
{/* (min-width: 800px) and (max-width: 1024px) calc((100vw - (40px * 4)) / 3),*/}
{/* calc(100vw - (3 * 15px) / 2)"*/}
{/* srcSet={`${img330} 330w, ${img600} 600w`}*/}
{/*/>*/}

<CustomPlaceholder width={datum.images[0].width} height={datum.images[0].height}/>

{/* <img
sizes="(min-width: 1800px) calc((100vw - 288px - (40px * 6)) / 6),
(min-width: 1600px) and (max-width: 1799px) calc((100vw - 288px - (40px * 5)) / 5),
Expand Down
28 changes: 16 additions & 12 deletions resources/assets/js/Detail/MainImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Download from "../icons/Download";
import Heart from "../icons/Heart";
import Loader from "../Loader";

import { CustomPlaceholder } from "react-placeholder-image"

class MainImage extends Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -36,18 +38,18 @@ class MainImage extends Component {
<section className="DetailMainImage">
{this.props.image ? (
<figure className="DetailMainImage__fig">
<ImageLoader
src={imgUrl}
alt=""
image={props => (
<Link to={`${this.props.match.url}/zoom`}>
<img src={imgUrl} alt="" className="DetailMainImage__img" />
</Link>
)}
loading={() => <Loader className="DetailMainImage__spinner" />}
error={() => <div>Error</div>}
className="DetailMainImage__img"
/>
{/*<ImageLoader*/}
{/* src={imgUrl}*/}
{/* alt=""*/}
{/* image={props => (*/}
{/* <Link to={`${this.props.match.url}/zoom`}>*/}
{/* <img src={imgUrl} alt="" className="DetailMainImage__img" />*/}
{/* </Link>*/}
{/* )}*/}
{/* loading={() => <Loader className="DetailMainImage__spinner" />}*/}
{/* error={() => <div>Error</div>}*/}
{/* className="DetailMainImage__img"*/}
{/*/>*/}

{this.props.onSelectionClick && (
<div
Expand All @@ -58,6 +60,8 @@ class MainImage extends Component {
}}
>
<div>
<CustomPlaceholder width={this.props.image.width} height={this.props.image.height} className="DetailMainImage__img"/>

<button
type="button"
className="DetailMainImage__button DetailMainImage__button--selection"
Expand Down
4 changes: 1 addition & 3 deletions resources/views/site/product.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
</span>
</a>
</div><!-- /.BackToCollection -->




<section class="DetailMainImage">
<figure class="DetailMainImage__fig">

Expand Down