<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$title}</title>
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no, email=no">
    <meta name="apple-mobile-web-app-title" content="{$site_name}" />
    <meta name="generator" content="openwbs {$version}" />
    <meta name="author" content="openwbs team" />
    <meta name="copyright" content="2019-2039 OpenWBS Inc." />
    <!--#include file="include.css.html"-->
</head>
<body>
<!--#include file="include.header.html"-->

<section class="mbody">
    <div class="om-detail">
        <h1 class="title">{$content:title}</h1>
        <div class="byline">
            <span class="datetime"><%=OW.formatdatetime("{$content:post_time}",2)%></span><span class="website"><a href="{$site_url}">{$site_mini_name}</a></span>
        </div>
        <div class="om-content om-editor-content-text">
            {$content:mob_content}
        </div>
        <div class="tags" id="tags">标签：
            {tags cid="{$content:cid}"}
                {tags:loop}<a href="[tags:link]" title="[tags:tag]">[tags:tag]</a>{/tags:loop}
            {/tags}
        </div>
        <div class="pager">{$content:pages}</div>
        {if:OW.trim("{$content:author}")<>""}
        <div class="author">作者 <span>{$content:author}</span></div>
        {/if}
        <div class="views">阅读 <span>{$content:views}</span></div>
        <div class="prev-next">
            <div class="prev">上一篇：{$content:prev}</div>
            <div class="next">下一篇：{$content:next}</div>
        </div>
    </div>
    <div class="om-relate-content" id="ow_relate">
        <h2 class="header">相关推荐</h2>
        <div class="section">
            {content top="100" related_cid="{$content:cid}" model="news"}
            <ul class="om-news-list">
            {content:loop}
                <li class="li[content:i]"><a href="[content:link]"><h3 class="title">[content:title]</h3></a></li>
            {/content:loop}
            </ul>
            {/content}
        </div>
    </div>
    {if:OW.int("{$config(is_comment_open)}")=1}<div id="OWCMT"></div>{/if}
</section>

<!--底部-->
<!--#include file="include.footer.html"-->
<script type="text/javascript">
$(document).ready(function(){
	if(!$("#tags").find("a").length>0){$("#tags").remove();};
	if(!$(".pager").find("a").length>0){$(".pager").remove();};
	if(!$("#ow_relate").find("li").length>0){$("#ow_relate").remove();};
	//评论
	{if:OW.int("{$config(is_comment_open)}")=1}
	$("#OWCMT").html('<div id="owcmt_post_section"></div><div class="ow-owcmt-list-header"><span class="cmt-count"><b id="owcmt_count_section">0</b>条评论</span>最新评论</div><div id="owcmt_list_section"></div><div class="pager" id="owcmt_pager_section"></div>');
	OW.cmt.postSection  = $("#owcmt_post_section");
	OW.cmt.countSection = $("#owcmt_count_section");
	OW.cmt.listSection  = $("#owcmt_list_section");
	OW.cmt.pagerSection = $("#owcmt_pager_section");
	OW.cmt.pagesize = 20;
	OW.cmt.init({cid:{$content:cid},gid:0});
	OW.cmt.get({cid:{$content:cid},gid:0,page:1});
	OW.cmt.getCallBack = function(){
		var opt = {y:"年前",m:"个月前",w:"周前",d:"天前",h:"小时前",n:"分钟前",s:"秒前",z:"刚刚"}
		$("#OWCMT").find(".posttime").each(function(){
			var timeText = OW.timeAgoTip(opt,$(this).html(),"<%=SYS_TIME%>");
			$(this).html(timeText);
		});
	};
	{/if}
});
</script>
<% if OS.isWeixinShare then %>
<%=OS.getWXShareTicket%>
<script type="text/javascript">
wx.config({
    debug:false,appId:'<%=OS.wxShareAppid%>',timestamp:'<%=OS.wxShareTimestamp%>',nonceStr:'<%=OS.wxShareNonceStr%>',signature:'<%=OS.wxShareSignature%>',jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareQZone']
});
wx.ready(function(){
	var wxTitle = '{$title}',
	wxDesc      = '{$description}'
	wxLink      = OW.currentURL(),
	wxImgUrl    = '<%=OW.validImageUrl("{$config(share_default_img)}")%>';
	wx.onMenuShareTimeline({title:wxTitle,link:wxLink,imgUrl:wxImgUrl});
	wx.onMenuShareAppMessage({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl});
	wx.onMenuShareQQ({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl});
	wx.onMenuShareQZone({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl});
});
</script>
<% end if %>
</body>
</html>
