cate.hbs 1.82 KB
<div class="category-page yoho-page">
    {{# category}}
        <div id="search-input" class="search-input">
            <a href={{searchUrl}}>
                <i class="search-icon iconfont">&#xe60f;</i>
                <p>搜索商品</p>
            </a>
        </div>
        <ul class="category-nav clearfix">
            {{# nav}}
                <li class="{{#if focus}}focus{{/if}}" data-channel="{{channel}}">
                    <span>{{name}}</span>
                </li>
            {{/ nav}}
        </ul>
        <div class="category-container clearfix">
            {{#each list}}
                <div class="content {{@key}} {{#unless focus}}hide{{/unless}}">
                    <ul class="primary-level">
                        {{# this}}
                            <li class="p-level-item{{#if @first}} focus{{/if}}">
                                {{#if url}}
                                <a href={{url}}> {{category_name}}</a>
                                {{^}}
                                {{category_name}}
                                {{/if}}
                            </li>
                        {{/ this}}
                    </ul>
                    <div class="sub-level-container">
                        {{# this}}
                            <ul class="sub-level {{#unless @first}}hide{{/unless}}">
                                {{# sub}}
                                    <li>
                                        <a href={{url}}>
                                            {{category_name}}
                                        </a>
                                    </li>
                                {{/ sub}}
                            </ul>
                        {{/ this}}
                    </div>
                </div>
            {{/each}}
        </div>
    {{/ category}}
</div>