You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
9.9 KiB
192 lines
9.9 KiB
|
|
|
|
{php}
|
|
dd('此页面废弃');
|
|
{/php}
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{$current_cate.seo_title}</title>
|
|
<meta name="keywords" content="{$current_cate.seo_keywords}">
|
|
<meta name="description" content="{$current_cate.seo_description}">
|
|
<!-- 公共CSS 自动被打包进页面 -->
|
|
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
<script>
|
|
// 设计稿 1920px 宽度下 1rem = 16Px;放在 head 里避免刷新时 rem 闪动
|
|
(function () {
|
|
var h = document.documentElement
|
|
// 设计稿宽度
|
|
var DESIGN_WIDTH = 1920
|
|
// 设计稿1rem = 16Px
|
|
var REM_AT_DESIGN = 16
|
|
// 最小字体大小-限制, 同时注意所有的box的大小也有了最小限制
|
|
var MIN_ROOT_FONT_SIZE = 14
|
|
function setRootFontSize() {
|
|
// 当前屏幕可视宽度(每次计算都取最新值)
|
|
var W = h.getBoundingClientRect().width
|
|
var size = (W / DESIGN_WIDTH) * REM_AT_DESIGN
|
|
if (size < MIN_ROOT_FONT_SIZE) size = MIN_ROOT_FONT_SIZE
|
|
h.style.fontSize = size + 'px'
|
|
}
|
|
setRootFontSize()
|
|
var resizeRaf = 0
|
|
window.addEventListener('resize', function () {
|
|
if (resizeRaf) return
|
|
resizeRaf = requestAnimationFrame(function () {
|
|
resizeRaf = 0
|
|
setRootFontSize()
|
|
})
|
|
})
|
|
})()
|
|
</script>
|
|
<link rel="stylesheet" href="https://unpkg.com/lenis@1.3.23/dist/lenis.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net.cn/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
<link href="https://cdn.jsdelivr.net.cn/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
|
|
<script type="module" crossorigin src="/themes/dist_static/static/js/search.js"></script>
|
|
<link rel="modulepreload" crossorigin href="/themes/dist_static/static/js/common.js">
|
|
<link rel="stylesheet" crossorigin href="/themes/dist_static/static/css/common.css">
|
|
<link rel="stylesheet" crossorigin href="/themes/dist_static/static/css/pagination.css">
|
|
<link rel="stylesheet" crossorigin href="/themes/dist_static/static/css/empty.css">
|
|
<link rel="stylesheet" crossorigin href="/themes/dist_static/static/css/search.css">
|
|
</head>
|
|
|
|
<body>
|
|
<!-- 引入公共头部 -->
|
|
<!-- header -->
|
|
{include file="components/header"}
|
|
|
|
<main class="main-search" data-header-dark>
|
|
<div class="sr-page section__wrap">
|
|
<div class="sr-hero">
|
|
<h1 class="sr-hero__title">Search</h1>
|
|
<form class="s-search sr-search" action="/search.html" method="get" role="search">
|
|
<img class="s-search__icon" src="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='24.000000'%20height='24.000000'%20fill='none'%3e%3crect%20id='搜索'%20width='24.000000'%20height='24.000000'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='矢量%203'%20d='M15.8481%2017.1208C14.4808%2018.2114%2012.7482%2018.8633%2010.8633%2018.8633C6.44506%2018.8633%202.86328%2015.2816%202.86328%2010.8633C2.86328%206.445%206.44506%202.86328%2010.8633%202.86328C15.2815%202.86328%2018.8633%206.445%2018.8633%2010.8633C18.8633%2012.7482%2018.2114%2014.4808%2017.1208%2015.8481L21.136%2019.8633L19.8633%2021.136L15.8481%2017.1208ZM17.0632%2010.8633C17.0632%207.43908%2014.2874%204.66326%2010.8633%204.66326C7.4392%204.66326%204.66332%207.43908%204.66332%2010.8633C4.66332%2014.2875%207.4392%2017.0633%2010.8633%2017.0633C14.2874%2017.0633%2017.0632%2014.2875%2017.0632%2010.8633Z'%20fill='rgb(175,181,185)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e" alt="" width="24" height="24" />
|
|
<input class="s-search__input" type="search" name="q" value="{$keywords}" placeholder="Search what you want to know" autocomplete="off" />
|
|
<button class="s-search__btn" type="submit">Search</button>
|
|
</form>
|
|
<div class="sr-hot">
|
|
<span class="sr-hot__label">Popular searches:</span>
|
|
<div class="sr-hot__list">
|
|
<button type="button" class="sr-hot__tag" data-keyword="HMI">HMI</button>
|
|
<button type="button" class="sr-hot__tag" data-keyword="Servo systems">Servo systems</button>
|
|
<button type="button" class="sr-hot__tag" data-keyword="Textile products">Textile products</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="sr-tabs" role="tablist" aria-label="Result categories">
|
|
<button type="button" class="sr-tabs__item is-active" role="tab" aria-selected="true" data-type="all">
|
|
All ( <span data-count="all">0</span> )
|
|
</button>
|
|
<button type="button" class="sr-tabs__item" role="tab" aria-selected="false" data-type="product">
|
|
Products ( <span data-count="product">0</span> )
|
|
</button>
|
|
<button type="button" class="sr-tabs__item" role="tab" aria-selected="false" data-type="solution">
|
|
Solutions ( <span data-count="solution">0</span> )
|
|
</button>
|
|
<button type="button" class="sr-tabs__item" role="tab" aria-selected="false" data-type="news">
|
|
News ( <span data-count="news">0</span> )
|
|
</button>
|
|
<button type="button" class="sr-tabs__item" role="tab" aria-selected="false" data-type="faq">
|
|
FAQ ( <span data-count="faq">0</span> )
|
|
</button>
|
|
</div>
|
|
|
|
<div class="sr-list">
|
|
{volist name="list" id="vo"}
|
|
{php}
|
|
$sr_date = '';
|
|
$sr_time = $vo['publish_time'] ?? ($vo['create_time'] ?? '');
|
|
if (!empty($sr_time)) {
|
|
$sr_date = is_numeric($sr_time) ? date('Y-m-d', (int)$sr_time) : $sr_time;
|
|
}
|
|
$sr_cid = $vo['category_id'] ?? ($vo['category'][0]['id'] ?? 0);
|
|
$sr_thumb = is_array($vo['thumbnail'] ?? null) ? ($vo['thumbnail']['url'] ?? '') : '';
|
|
$sr_url = hcUrl('detail/index', ['id' => $vo['id'], 'cid' => $sr_cid]);
|
|
$sr_cate_title = $vo['category'][0]['title'] ?? '';
|
|
$sr_type = 'other';
|
|
if (mb_strpos($sr_cate_title, '产品') !== false) {
|
|
$sr_type = 'product';
|
|
} elseif (mb_strpos($sr_cate_title, '解决方案') !== false || mb_strpos($sr_cate_title, '方案') !== false) {
|
|
$sr_type = 'solution';
|
|
} elseif (mb_strpos($sr_cate_title, '新闻') !== false) {
|
|
$sr_type = 'news';
|
|
} elseif (mb_strpos($sr_cate_title, '常见问题') !== false || mb_strpos($sr_cate_title, 'FAQ') !== false || mb_strpos($sr_cate_title, '问题') !== false) {
|
|
$sr_type = 'faq';
|
|
}
|
|
{/php}
|
|
<article class="sr-item" data-type="{$sr_type}" data-keywords="{$vo.title}">
|
|
<a class="sr-item__media" href="{$sr_url}">
|
|
<img src="{$sr_thumb}" alt="" width="300" height="200" loading="lazy" />
|
|
</a>
|
|
<div class="sr-item__body">
|
|
<div class="sr-item__main">
|
|
<div class="sr-item__meta">
|
|
<span class="sr-item__type">{if !empty($vo['category'][0]['title'])}{$vo.category.0.title}{else /}Content{/if}</span>
|
|
<span class="sr-item__sep" aria-hidden="true"></span>
|
|
<time class="sr-item__date" datetime="{$sr_date}">{$sr_date}</time>
|
|
</div>
|
|
<h2 class="sr-item__title">
|
|
<a href="{$sr_url}">{$vo.title}</a>
|
|
</h2>
|
|
{notempty name="vo.description"}
|
|
<p class="sr-item__desc">{$vo.description}</p>
|
|
{/notempty}
|
|
</div>
|
|
<a class="sr-item__more" href="{$sr_url}">
|
|
<span>Explore more</span>
|
|
<svg viewBox="0 0 16.502 6.66113" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.501953" height="6.661133" fill="none" customFrame="#000000">
|
|
<path id="箭头 2" d="M0 2.83057L16 2.83057L16 3.83057L0 3.83057L0 2.83057ZM15.2929 3.33057L12.818 0.855693C12.62 0.657703 12.62 0.346575 12.818 0.148586C13.016 -0.0494041 13.3271 -0.0494046 13.5251 0.148585L16.3536 2.97701C16.5515 3.175 16.5515 3.48613 16.3536 3.68412L13.5251 6.51255C13.3271 6.71054 13.016 6.71054 12.818 6.51255C12.62 6.31456 12.62 6.00343 12.818 5.80544L15.2929 3.33057Z" fill="rgb(102,102,102)" fill-rule="nonzero" />
|
|
</svg>
|
|
|
|
</a>
|
|
</div>
|
|
</article>
|
|
{/volist}
|
|
</div>
|
|
|
|
<div class="s-empty sr-tabs-empty" hidden>
|
|
<p class="s-empty__text">No results in this category</p>
|
|
</div>
|
|
|
|
{php}
|
|
$list_empty = isHcListEmpty($list ?? null);
|
|
if ($list_empty) {
|
|
$empty_text = 'No matching results. Try another keyword';
|
|
}
|
|
{/php}
|
|
{if $list_empty}
|
|
{include file="components/empty"}
|
|
{else /}
|
|
{$list_page|raw}
|
|
{/if}
|
|
</div>
|
|
</main>
|
|
|
|
{include file="components/mask"}
|
|
<!-- 模块:底部 -->
|
|
{include file="components/footer"}
|
|
|
|
|
|
<script src="https://unpkg.com/lenis@1.3.23/dist/lenis.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net.cn/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.min.js"></script>
|
|
<script src="https://unpkg.com/counterup2@2.0.2/dist/index.js"></script>
|
|
</body>
|
|
|
|
</html>
|