comment-item.hbs 2.08 KB
{{#each comments}}
    <li>
        <div class="user-info clearfix">
            <img class="user-avatar" src="{{avatar}}">
            <span class="name">{{userName}}</span>
        </div>
        <dl class="pull-right">
            {{#if color}}<dd>颜色:<span title="{{color}}">{{color}}</span></dd>{{/if}}
            {{#if size}}<dd>尺码:{{size}}</dd>{{/if}}
        </dl>
        <div class="comment-detail">
            <div class="tag-list clearfix">
                <span class="comment-star pull-left">
                    <span class="star-{{star}} active"></span>
                </span>
                <dl class="horizontal-list pull-right">
                    <dd>
                        {{#if_cond comfort "===" "MIDDLE"}}合适{{/if_cond}}
                        {{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}}
                        {{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}}
                    </dd>
                    <dd>{{#if height}}身高:{{height}} 厘米{{/if}}</dd>
                    <dd>{{#if weight}}体重:{{weight}} 公斤{{/if}}</dd>
                </dl>
            </div>

            <p class="comment">{{comment}}</p>

            {{#if url}}
                <div class="img-preview">
                    <a class="img-thumb" href="javascript:void(0);">
                        <img src="{{image url 70 100 1}}" />
                    </a>
                    <div class="img-detail">
                        <dl class="toolbar">
                            <dd data-role="preview-close"><i class="iconfont">&#xe63b;</i>收起</dd>
                            <dd data-role="preview-left"><i class="iconfont">&#xe639;</i>向左旋转</dd>
                            <dd data-role="preview-right"><i class="iconfont">&#xe63a;</i>向右旋转</dd>
                        </dl>
                        <div class="img-wrap">
                            <img src="{{image url 345 345}}" />
                        </div>
                    </div>
                </div>
            {{/if}}
            <span>{{date}}</span>
        </div>
    </li>
{{/each}}