Skip to content

Commit

Permalink
Cleanup product component
Browse files Browse the repository at this point in the history
  • Loading branch information
dshoreman committed Nov 9, 2014
1 parent b7d58b5 commit ba8f743
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions components/product/default.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
<div class="{{ imagesetContainerClass }}">
<div class="{{ rowClass }}">
{% for image in product.images %}
<div class="{{ image.sort_order == '1' ? mainImageContainerClass : subImageContainerClass }}">
{% if image.sort_order == '1' %}
{% set imageContainerClass = mainImageContainerClass %}
{% set imageSize = mainImageSize %}
{% else %}
{% set imageContainerClass = subImageContainerClass %}
{% set imageSize = subImageSize %}
{% endif %}

<div class="{{ imageContainerClass }}">
<a href="{{ image.getPath() }}" class="{{ imageLinkClass }}">
<img class="{{ imageClass }}" alt="{{ product.title }}"
{% if image.sort_order == '1' %}
src="{{ product.getSquareThumb(mainImageSize, image) }}"
{% else %}
src="{{ product.getSquareThumb(subImageSize, image) }}"
{% endif %}
src="{{ product.getSquareThumb(imageSize, image) }}"
/>
</a>
</div>
Expand Down

0 comments on commit ba8f743

Please sign in to comment.