<!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, viewport-fit=cover"/>
    <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"-->
    <link rel="stylesheet" href="../css/om.case.css?v={$version_sn}" />
</head>
<body>
<!--#include file="include.header.html"-->
<section class="mbody">
    <div class="ow-cate-header-slither">
        {cate parent_id="{$cate:cate_id}"}
        <ul name="slither">
            <li class="li0 current"><a href="{$site_hurl}<%=OW.DB.getFieldValueBySQL("SELECT [urlpath] FROM "& DB_PRE &"category WHERE cate_id={$cate:cate_id}")%>/">全部</a></li>
            {cate:loop}<li class="li[cate:i]"><a href="[cate:link]">[cate:name]</a></li>{/cate:loop}
        </ul>
        {/cate}
    </div>
    
    <div class="ow-case-list" id="list">
        {content top="20000" cate_id="{$cate:cate_id}" list_by_type="{$cate:list_by_type}" model="case" orderby="a.cid desc"}
            <ul>
                {content:loop}
                <li class="li[content:i]" name="item">
                    <div class="thumb"><a href="[content:link]" title="[content:title]" target="_blank"><img src="{if:OW.isNul("[content:thumbnail]")}../images/news_none_pic.png{else}[content:thumbnail]{/if}" alt="[content:title]"><i class="play"></i></a></div>
                    <div class="info">
                        <h3 class="title"><a href="[content:link]" title="[content:title]" target="_blank">[content:title]</a></h3>
                    </div>
                </li>
                {/content:loop}
            </ul>
            <div class="pager">[content:pages pagesize="20" pagetpl="{prev}{current}{next}"]</div>
        {/content}
    </div>
</section>
<!--#include file="include.footer.html"-->
<script type="text/javascript">
$(document).ready(function(){
		$("ul[name='slither']").each(function(){
		var ulWidth = 0,parDivWidth = OW.int($(this).parent().css("width"));
		$(this).find("li").each(function(){
			ulWidth = ulWidth + OW.int($(this).width()) + OW.int($(this).css("padding-left")) + OW.int($(this).css("padding-right"));
		});
		if(ulWidth==0){
			$(this).hide();
		}else{
			ulWidth = ulWidth + 10;
		};
		if(ulWidth<=parDivWidth){ulWidth=parDivWidth+10;};
		$(this).width(ulWidth);
	});
	if($("ul[name='slither']").find("li").length==1){$("ul[name='slither']").parent().hide();};
});
</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:['updateAppMessageShareData','updateTimelineShareData']
});
wx.ready(function(){
	var wxTitle = '{$title}',
	wxDesc      = '{$description}'
	wxLink      = OW.currentURL(),
	wxImgUrl    = '<%=OW.validImageUrl("{$config(share_default_img)}")%>';
	wx.updateAppMessageShareData({title:wxTitle,desc:wxDesc,link:wxLink,imgUrl:wxImgUrl,success:function(){}});
	wx.updateTimelineShareData({title:wxTitle,link:wxLink,imgUrl:wxImgUrl,success:function(){}});
});
</script>
<% end if %>
</body>
</html>
