|
|
|
@ -64,7 +64,8 @@ |
|
|
|
{include file="components/header"} |
|
|
|
|
|
|
|
<main class="main-news" data-header-dark data-nav="新闻动态"> |
|
|
|
{hcTaglib:category id="361" item="vo" field="id,title,alias"} |
|
|
|
{php}$news_root_id = uiId('news');{/php} |
|
|
|
{hcTaglib:category id="$news_root_id" item="vo" field="id,title,alias"} |
|
|
|
{php} |
|
|
|
$news_cate_info = $vo; |
|
|
|
$news_cate_info_alias = $vo['alias'] ?? ''; |
|
|
|
@ -83,6 +84,8 @@ |
|
|
|
$news_active_cat = (string)($current_cate_id ?: ($news_cate_info['id'] ?? '')); |
|
|
|
} |
|
|
|
$news_all_cat = (string)($news_cate_info['id'] ?? ''); |
|
|
|
$news_video_id = (string)uiId('news_video'); |
|
|
|
$is_news_video = ($news_video_id !== '' && $news_video_id !== '0' && $news_active_cat === $news_video_id); |
|
|
|
{/php} |
|
|
|
<a href="{$news_cate_info_alias}?cat={$news_cate_info['id']}" class="n-tabs__item{if $news_active_cat == $news_all_cat} is-active{/if}" role="tab" aria-selected="{if $news_active_cat == $news_all_cat}true{else /}false{/if}" data-cat="{$news_cate_info['id']}">All</a> |
|
|
|
{hcTaglib:subcategory pid="$news_cate_info['id']" item="vo" sort=""} |
|
|
|
@ -103,7 +106,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
{/php} |
|
|
|
{if $news_has_featured} |
|
|
|
{if $news_has_featured && !$is_news_video} |
|
|
|
<article class="n-featured"> |
|
|
|
<div class="n-featured__swiper swiper"> |
|
|
|
<div class="swiper-wrapper"> |
|
|
|
@ -167,9 +170,9 @@ |
|
|
|
</article> |
|
|
|
{/if} |
|
|
|
|
|
|
|
<div class="n-grid"> |
|
|
|
<div class="n-grid{if $is_news_video} n-grid--video{/if}"> |
|
|
|
|
|
|
|
{hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,content,description,create_time,is_top" subField="" name="hc_content" limit="6" item="content_sub22" isTop="222"} |
|
|
|
{hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,cover,content,description,create_time,publish_time,is_top" subField="" name="hc_content" limit="6" item="content_sub22" isTop="222"} |
|
|
|
{/hcTaglib:contentPage2} |
|
|
|
|
|
|
|
{volist name="hc_content" id="vo_content"} |
|
|
|
@ -179,6 +182,21 @@ |
|
|
|
$create_time_str = $vo_content['publish_time'] ?? $vo_content['create_time']; |
|
|
|
{/php} |
|
|
|
|
|
|
|
{if $is_news_video} |
|
|
|
<button type="button" class="n-v-card" data-video-src="{$vo_content['cover']['url'] ?? ''}"> |
|
|
|
<div class="n-v-card__media"> |
|
|
|
<img class="n-v-card__cover" src="{$vo_content['thumbnail']['url'] ?? ''}" alt="" width="400" height="225" loading="lazy" /> |
|
|
|
{notempty name="description"} |
|
|
|
<span class="n-v-card__duration">{$description}</span> |
|
|
|
{/notempty} |
|
|
|
<span class="n-v-card__play" aria-hidden="true"> |
|
|
|
<img src="data:image/svg+xml,%3csvg%20viewBox='0%200%2013.5386%2016'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='13.538574'%20height='16.000000'%20fill='none'%20customFrame='%23000000'%3e%3cpath%20id='多边形%201'%20d='M8.86093%201.45695L15.1085%2012.0297C15.5024%2012.6963%2015.0219%2013.5384%2014.2476%2013.5384L1.75245%2013.5384C0.978149%2013.5384%200.497614%2012.6963%200.891523%2012.0297L7.13907%201.45695C7.52614%200.801924%208.47387%200.801924%208.86093%201.45695Z'%20fill='rgb(255,255,255)'%20fill-rule='evenodd'%20transform='matrix(0,1,-1,0,13.5386,0)'%20/%3e%3c/svg%3e" alt="" width="14" height="16" /> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<h3 class="n-v-card__title">{$vo_content.title}</h3> |
|
|
|
<time class="n-v-card__date" datetime="{$create_time_str}">{$create_time_str|date='Y-m-d'}</time> |
|
|
|
</button> |
|
|
|
{else /} |
|
|
|
<article class="n-card" data-category="insight"> |
|
|
|
<div class="n-card__top"> |
|
|
|
<time class="n-card__date" datetime="{$create_time_str}">{$create_time_str}</time> |
|
|
|
@ -194,6 +212,7 @@ |
|
|
|
<img src="{$vo_content['thumbnail']['url'] ?? ''}" alt="" loading="lazy" /> |
|
|
|
</div> |
|
|
|
</article> |
|
|
|
{/if} |
|
|
|
{/volist} |
|
|
|
|
|
|
|
</div> |
|
|
|
@ -201,7 +220,7 @@ |
|
|
|
{php} |
|
|
|
$list_empty = isHcListEmpty($hc_content ?? null); |
|
|
|
if ($list_empty) { |
|
|
|
$empty_text = 'No matching news'; |
|
|
|
$empty_text = $is_news_video ? 'No matching videos' : 'No matching news'; |
|
|
|
} |
|
|
|
{/php} |
|
|
|
{if $list_empty} |
|
|
|
@ -211,6 +230,23 @@ |
|
|
|
{$hc_content|raw} |
|
|
|
{/if} |
|
|
|
|
|
|
|
{if $is_news_video} |
|
|
|
<div class="n-v-modal" id="n-v-modal" hidden> |
|
|
|
<div class="n-v-modal__backdrop" data-n-v-modal-close></div> |
|
|
|
<div class="n-v-modal__dialog" role="dialog" aria-modal="true" aria-labelledby="n-v-modal-title"> |
|
|
|
<div class="n-v-modal__head"> |
|
|
|
<h2 class="n-v-modal__title" id="n-v-modal-title">Video</h2> |
|
|
|
<button type="button" class="n-v-modal__close" data-n-v-modal-close aria-label="Close"> |
|
|
|
<img src="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20d='M1.5%201.5L14.5%2014.5M14.5%201.5L1.5%2014.5'%20stroke='%23fff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e" alt="" width="16" height="16" aria-hidden="true" /> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<div class="n-v-modal__body"> |
|
|
|
<video class="n-v-modal__video" id="n-v-modal-video" controls playsinline></video> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
|
|
|
|
</div> |
|
|
|
</main> |
|
|
|
{include file="components/mask"} |
|
|
|
|