detail.hbs 6.93 KB
<div class="guang-detail-page guang-page yoho-page clearfix">
    {{# guang}}
        {{> common/path-nav}}
        <div class="left-side detail-body" data-id="{{id}}">
            {{# header}}
                <h1 class="detail-title">{{title}}</h1>
                <div class="article-info clearfix">
                    <div class="article-author">
                        <div class="author-avatar">
                            <a href="{{authorUrl}}" target="_blank">
                                <img src="{{image2 avatar}}">
                            </a>
                        </div>
                    </div>
                    <div class="author-info">
                        <a class="author-name" href="{{authorUrl}}">{{name}}</a>
                    </div>
                    <div class="article-status clearfix">
                        <span class="article-time">{{time}}</span>
                        <span class="article-click">点击:<em>{{click}}</em></span>
                        <a href="#comment-info" id="article-comment" class="article-comment"><em class="comment-num">{{commentNum}}</em>条评论</a>
                    </div>
                </div>
            {{/ header}}

            <div class="article-main">
                {{# content}}
                    {{# video}}
                        <div class="article-video block">
                            {{{.}}}
                        </div>
                    {{/ video}}
                    {{# pic}}
                        <div class="article-pic block">
                            <img class="lazy" data-original="{{image2 .}}">
                        </div>
                    {{/ pic}}
                    {{# text}}
                        <div class="article-text block">
                            <p>{{{.}}}</p>
                        </div>
                    {{/ text}}
                    {{#if smallPic}}
                        <div class="article-small-pic block clearfix">
                            {{# smallPic}}
                                <img class="lazy" data-original="{{image2 .}}">
                            {{/ smallPic}}
                        </div>
                    {{/if}}
                    {{# relatedReco}}
                        <div class="related-reco block clearfix">
                        <div class="block-header">
                            相关推荐
                            {{# moreReco}}
                                <a class="more-reco" href="{{.}}">MORE ></a>
                            {{/ moreReco}}
                        </div>
                        <div class="recos clearfix">
                            {{# recos}}
                                {{> product/good}}
                            {{/ recos}}
                        </div>
                    </div>
                    {{/ relatedReco}}
                {{/ content}}
            </div>
            {{#if brands}}
                <div class="related-brand block clearfix">
                    <div class="block-header">相关品牌</div>
                    <div class="brands">
                        {{# brands}}
                            <div class="brand">
                                <a class="thumb" href="{{url}}" target="_blank">
                                    <img class="lazy" data-original="{{image2 thumb}}">
                                </a>
                                <p class="brand-name">{{name}}</p>
                            </div>
                        {{/ brands}}
                    </div>
                </div>
            {{/if}}
            {{# userInfo}}
                <div class="user-handle">
                    <ul class="clearfix">
                        <li id="prise-btn" class="like-status{{#isLike}} liked{{/isLike}}">
                            <a href="javascript:;">
                                <i class="iconfont">&#xe626;</i>
                                <span class="like-num">{{likeNum}}</span>
                            </a>
                        </li>
                        <li id="collect-btn" class="sort-collect{{#isCollected}} collected{{/isCollected}}">
                            <a href="javascript:;">
                                <i class="iconfont">&#xe611;</i>
                                <span>收藏</span>
                                <span class="cancel-collect">取消收藏</span>
                            </a>
                        </li>
                    </ul>
                </div>
            {{/ userInfo}}
            <div class="article-bottom-info clearfix">
                {{#if tag}}
                    <div class="article-tag clearfix">
                        <i class="tag-icon iconfont">&#xe630;</i>
                        <ul class="clearfix">
                            {{# tag}}
                            <li>
                                <a href="{{url}}" target="_blank">{{name}}</a>
                            </li>
                            {{/ tag}}
                        </ul>
                    </div>
                {{/if}}
                <div class="article-share">
                    <span class="title pull-left">分享至:</span>
                    {{> share}}
                </div>
            </div>
            {{#if relatedPost}}
                <div class="detail-related-posts">
                    <ul class="clearfix">
                        {{# relatedPost}}
                            <li>
                                <a href="{{url}}" target="_blank">
                                    <span class="bg-img">
                                        <img src="{{image2 thumb}}" alt="">
                                    </span>
                                    <div class="post-title">
                                        <h2>{{title}}</h2>
                                    </div>
                                </a>
                            </li>
                        {{/ relatedPost}}
                    </ul>
                </div>
            {{/if}}

            {{#unless @root.pc.guang.removeItemComment}}
                <div id="comment-area" class="comment-area">
                    <div class="comment-textarea">
                        <textarea id="comment-info" placeholder="我有话要说。。。">{{commentInfo}}</textarea>
                    </div>
                    <div class="comment-publish clearfix">
                        <span id="word-count-tip" class="word-count-tip"></span>
                        <a id="comment-btn" class="publish-btn disable">评论</a>
                    </div>
                    <div id="pjax-container" class="comments-wrap">
                        {{> comment}}
                    </div>
                    <a href="{{commentFirstPageUrl}}" data-role="comment-first-url" class="hide"></a>
                </div>
            {{/unless}}
        </div>
        <div class="right-side detail-side">
            {{> right-side}}
        </div>
    {{/ guang}}
</div>