item.hbs 1.09 KB
<div class="item">
    <a {{#if link}}href="{{link}}"{{/if}}{{#if isGood}} title="{{alt}}"{{/if}}>
        {{#if isGood}}
            {{#ifor triple double single}}
                {{#within index 3}}
                    <img class="item-pic" src="{{image2 src w=235 h=314}}" alt="{{alt}}">
                {{^}}
                    <img class="item-pic lazy" data-original="{{image2 src w=235 h=314}}" alt="{{alt}}">
                {{/within}}
            {{/ifor}}
        {{^}}
            {{#within index 3}}
                <img class="item-pic" src="{{image2 src}}" alt="{{@root.title}}">
            {{^}}
                <img class="item-pic lazy" data-original="{{image2 src}}">
            {{/within}}
        {{/if}}
    </a>
    
    {{#if showProductInfo}}
        {{#ifor isGood four}}
            {{#unless parent.noShowProductInfo}}
            <div class="item-info">
                <div class="text">{{text}}</div>
                <div class="name">{{name}}</div>
                <div class="price">{{salesPrice}}</div>
            </div>
            {{/unless}}
        {{/ifor}}
    {{/if}}
</div>