<!doctype html>
[#escape x as (x)!?html]
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>${channel.title} - ${site.title}</title>
  <meta name="keywords" content="${channel.seoKeywords}">
  <meta name="description" content="${channel.seoDescription}">
  [#include 'includes_meta.html'/]
  [#include 'includes_css.html'/]
  [#include 'includes_js.html'/]
</head>
<body>
[#include 'includes_header.html'/]
[#if channel.parent?? || channel.children?size > 0]
<div class="bg-gray-200">
  <div class="container">
    <nav class="row" aria-label="breadcrumb">
      <ol class="col list-inline my-2">
        [#assign parent = channel.parent!channel/]
        <li class="list-inline-item"><a class="btn btn-sm [#if parent.id == channel.id]btn-primary[#else]btn-link[/#if]" href="${parent.url}">全部</a></li>
        [@ChannelList parentId=parent.id; list]
          [#list list as bean]
            <li class="list-inline-item"><a class="btn btn-sm [#if channel.id == bean.id]btn-primary[#else]btn-link[/#if]" href="${bean.url}">${bean.name}</a></li>
          [/#list]
        [/@ChannelList]
      </ol>
    </nav>
  </div>
</div>
[/#if]
<div class="container">
  <div class="row">
    <div class="col mt-2">
      <div>
        [#assign customsQueryMap={}/]
        [#list channel.articleModel.fieldList?filter(field->['radio','checkbox','select','multipleSelect']?seqContains(field.type)) as field]
          <div class="py-1 border-bottom">
            [#assign param=field.code+'_key'/]
            <a href="${addParam(channel.url, channel.dynamicUrl, param)}" class="btn btn-sm[#if !Params[param]??] btn-secondary[#else] btn-link text-reset[/#if]">全部${field.name}</a>
            [@DictList typeId=field.dictTypeId; list]
              [#list list as dict]
                <a href="${addParam(channel.url, channel.dynamicUrl, param, dict.value)}"
                   class="btn btn-sm [#if Params[param]! == dict.value]btn-secondary[#else]btn-link text-reset[/#if]">${dict.name}</a>
              [/#list]
            [/@DictList]
          </div>
          [#assign customsQueryMap=customsQueryMap + {'EQ_'+param: Params[param]!}/]
        [/#list]
      </div>
      [@ArticlePage channelId=channel.id isIncludeSubChannel='true' customs=customsQueryMap orderBy="sticky_desc,publishDate_desc,id_desc"; pagedList]
        <div class="row mx-n1 mb-3">
          [#list pagedList.content as bean]
            <div class="col-lg-3 col-6 px-1 mt-3">
              <div class="card">
                <div class="position-relative">
                  <img src="${bean.image}" class="card-img-top" alt="${bean.title}">
                  <div class="cm-trans-bottom clearfix px-2 text-light">
                    <div class="float-left"><i class="far fa-play-circle"></i></div>
                    <div class="float-right">${bean.videoTime}</div>
                  </div>
                </div>
                <div class="card-body p-2">
                  <p class="card-text text-truncate">[@A bean=bean class="text-reset stretched-link"/]</p>
                </div>
              </div>
            </div>
          [/#list]
        </div>
        [#include 'includes_page.html'/]
      [/@ArticlePage]
    </div>
  </div>
</div>
[#include 'includes_footer.html'/]
<script>axios.get('${api}/channel/view/${channel.id}');</script>
</body>
</html>
[/#escape]
