{block:init}{/block:init}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
{php}
$this->pmeta();
eimp('initJs','jquery;bootstrap;comm');
eimp('initCss','bootstrap,stpub;comm;topic');
if(!empty($this->view)){
    $data = db()->table('topic_items')->where("did='$did' AND dno='$this->view'")->find();
}
{/php}
</head>

<body>

{inc:"topic/_index/_head"}

<div class="topic-header">
    <h1 class="topic-title">{title($title,96,$this->vars)}</h1>
    <p class="topic-post-meta">
        {stime($atime,min)} 
        点击<i id="jsid_field_{=$this->mod}:{=$did}:click">{=$click}<!--,add1--></i>次
        &nbsp;模板:{=$this->tplname}
    </p>
</div>

<div class="row">

    <div class="col-sm-9 topic-main">

        {block:detail}
        <div class="topic-post">
            layout-detail!
        </div>
        {/block:detail}

        <nav>
            <ul class="pager">
              <li><a href="{surl(topic)}">&lt;Topic</a></li>
            </ul>
        </nav>

    </div><!-- /.blog-main -->

    <div class="col-sm-3 topic-sidebar">
        <div class="sidebar-module">
            {block:sider}
            <h4>扩展模板</h4>
            <ol class="list-unstyled">
                <li><a href='{surl("topic.$did")}'>专题首页</a></li>
                <li><a href='{surl("topic.$did.mod1")}'>添加`.mod1`参数</a></li>
                <li><a href='{surl("topic.$did.mod2")}'>添加`.mod2`参数</a></li>
                <li><a href='{surl("topic.$did.html")}'>添加`.html`参数</a></li>
            </ol>
            {/block:sider}
        </div>

        <div class="sidebar-module">
            <h4>相关链接</h4>
            <p>这是一组后台设置的链接</p>
            <ol class="list-unstyled">
                <?php
                    $data = devTopic::fmtRow($did,'links');
                    if(!empty($data['urels'])){ foreach ($data['urels'] as $key => $row) {
                ?>
                <li><a href="{=$row['url']}" target="_blank">{=$row['name']}</a></li>
                <?php } } ?>
            </ol>
        </div>

    </div><!-- /.blog-sidebar -->
</div><!-- /.row -->

{inc:"topic/_index/_foot"}

</body>
</html>
