<!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="2008-2020 OpenWBS Inc." />
    <!--#include file="include.css.html"-->
</head>
<body>
<!--头部-->
<header class="ow-header">
    <a href="{$site_url}" id="top_menu" class="goback"></a>
    <div class="title">{$cate:name}</div>
    <!--#include file="include.top.nav.html"-->
</header>

<section class="mbody">
    <div class="header ow-cate-header-slither">
        {cate parent_id="{$cate:cate_id}"}
        <ul name="header_slither">
            <li class="li0 current"><a href="{$site_hurl}<%=OW.DB.getFieldValueBySQL("SELECT [urlpath] FROM ow_category WHERE cate_id={$cate:cate_id} AND "& OW.DB.auxSQL &"")%>/">全部</a></li>
            {cate:loop}<li class="li[cate:i]"><a href="[cate:link]">[cate:name]</a></li>{/cate:loop}
        </ul>
        {/cate}
    </div>
    <div id="ow_type_filter">
        <div class="ow-type-filter-header" id="ow_type_filter_header">
            <span class="type-filter" id="ow_filter_btn"><em>筛选<i>-</i></em></span>
        </div>
        <div class="ow-type-filter-section" id="ow_type_filter_section">
            {typeattr type_cate_id="{$cate:type_cate_id}"}
            {typeattr:loop}
            <div class="type-line" i="[typeattr:i]">
                <div class="type-attr">[typeattr:type_attr_name]</div>
                <div class="type-value">
                    <ul class="type-value-list">
                        <li><a class="all" href="[typeattr:link]" name="typeattr" type_attr_id="[typeattr:type_attr_id]" target="_self">全部</a></li>
                        {ctype type_attr_id="[typeattr:type_attr_id]"}
                        {ctype:loop}
                        <li><a href="[ctype:link]" name="ctype" type_id="[ctype:type_id]" target="_self">[ctype:type_name]</a></li>
                        {/ctype:loop}
                        {/ctype}
                    </ul>
                </div>
            </div>
            {/typeattr:loop}
            {/typeattr}
        </div>
    </div>
    <div class="ow-cate-case" id="list">
        {content top="2000" cate_id="{$cate:cate_id}" list_by_type="{$cate:list_by_type}" model="case" orderby="a.cid desc"}
        <div class="section">
            <ul class="ow-case-horizlist">
                {content:loop}
                <li class="li[content:i]">
                    <a href="[content:link]">
                    <div class="thumb"><img src="[content:thumbnail]" alt="[content:title]" title="[content:title]"></div>
                    <div class="info">
                        <h3 class="title">[content:title]</h3>
                        <div class="subtitle">[content:subtitle]</div>
                    </div>
                    </a>
                </li>
                {/content:loop}
            </ul>
        </div>
        <div class="footer">
            <div class="pager">[content:pages pagesize="20" pagetpl="{prev}{current}{next}"]</div>
        </div>
        {/content}
    </div>
</section>

<!--底部-->
<!--#include file="include.footer.html"-->
<script type="text/javascript">
$(document).ready(function(){
	//栏目菜单
	OW.mobile.menu();
	$("ul[name='header_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='header_slither']").find("li").length==1){$(".ow-cate-header-slither").hide();};
	//筛选
	var $omTypeFilter= $("#ow_type_filter"),
	$omFilterBtn     = $("#ow_filter_btn"),
	$omFilterSection = $("#ow_type_filter_section");
	$omFilterBtn.toggle(
		function(){
			$(this).find("em").html("筛选<i>+</i>");
			$omFilterSection.slideUp(100);
		},function(){
			$(this).find("em").html("筛选<i>-</i>");
			$omFilterSection.slideDown(100);
		}
	);
	if($omFilterSection.find(".type-line").length==0){
		$omTypeFilter.hide();
	};
	OW.client.typeInit({section:$omFilterSection});
	//暂无内容
	if($("#list").find("li").length==0){
		$("#list").html('<div class="ow-none-content-tip">暂无内容</div>');
	};
});
</script>
<% if OS.isJWeixinCanUse then %>
<%=OS.getWeixinTicket%>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
wx.config({
    debug:false,appId:'<%=OS.weixinAppid%>',timestamp:'<%=OS.weixinTimestamp%>',nonceStr:'<%=OS.weixinNonceStr%>',signature:'<%=OS.weixinSignature%>',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>
