131 lines
5.1 KiB
HTML
131 lines
5.1 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||
<title>{$title|default='YwxApp'}</title>
|
||
<meta name="keywords" content="{$seo_keywords|default=''}">
|
||
<meta name="description" content="{$seo_description|default=''}">
|
||
<link rel="stylesheet" href="/assets/layui/css/layui.css">
|
||
<link rel="stylesheet" href="/static/frontend/css/responsive.css?v=3.0">
|
||
<link rel="stylesheet" href="/static/frontend/css/style.css?v=1.2">
|
||
{block name="style"}{/block}
|
||
</head>
|
||
|
||
<body>
|
||
{include file="common/header" /}
|
||
|
||
<main class="main-wrapper">
|
||
{__CONTENT__}
|
||
</main>
|
||
|
||
{include file="common/footer" /}
|
||
|
||
<!-- 首页底部广告位(全站预埋钩子:仅当挂在首页时由 index 页控制,此处留作通用容器) -->
|
||
{notempty name="adSlots.home_bottom"}
|
||
<div class="ad-slot ad-slot-home_bottom">
|
||
{volist name="adSlots.home_bottom" id="ad"}
|
||
<div class="ad-item ad-type-{$ad.type}">
|
||
{switch name="ad.type"}
|
||
{case value="1"}<a href="{$ad.url}" target="_blank" rel="nofollow"><img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}"></a>{/case}
|
||
{case value="2"}<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{$ad.content}</a>{/case}
|
||
{case value="3"}{$ad.content|raw}{/case}
|
||
{/switch}
|
||
</div>
|
||
{/volist}
|
||
</div>
|
||
{/notempty}
|
||
|
||
<!-- 全站悬浮角标广告位(固定右下角,无数据时自动隐藏) -->
|
||
{notempty name="adSlots.float"}
|
||
<div class="ad-float" id="adFloat">
|
||
{volist name="adSlots.float" id="ad"}
|
||
<div class="ad-float-item ad-type-{$ad.type}">
|
||
{switch name="ad.type"}
|
||
{case value="1"}<a href="{$ad.url}" target="_blank" rel="nofollow"><img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}"></a>{/case}
|
||
{case value="2"}<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{$ad.content}</a>{/case}
|
||
{case value="3"}{$ad.content|raw}{/case}
|
||
{/switch}
|
||
</div>
|
||
{/volist}
|
||
<span class="ad-float-close" id="adFloatClose" title="关闭">×</span>
|
||
</div>
|
||
{/notempty}
|
||
|
||
<!-- 全站弹窗广告位 -->
|
||
{notempty name="adSlots.popup"}
|
||
<div class="ad-popup-mask" id="adPopupMask">
|
||
<div class="ad-popup-box">
|
||
<span class="ad-popup-close" id="adPopupClose" title="关闭">×</span>
|
||
{volist name="adSlots.popup" id="ad"}
|
||
<div class="ad-popup-item ad-type-{$ad.type}">
|
||
{switch name="ad.type"}
|
||
{case value="1"}
|
||
{if condition="$ad.url"}<a href="{$ad.url}" target="_blank" rel="nofollow">{/if}
|
||
<img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}">
|
||
{if condition="$ad.url"}</a>{/if}
|
||
{/case}
|
||
{case value="2"}
|
||
{if condition="$ad.url"}<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{/if}{$ad.content}{if condition="$ad.url"}</a>{/if}
|
||
{/case}
|
||
{case value="3"}
|
||
{$ad.content|raw}
|
||
{/case}
|
||
{/switch}
|
||
</div>
|
||
{/volist}
|
||
</div>
|
||
</div>
|
||
{/notempty}
|
||
|
||
<script src="/assets/layui/layui.js"></script>
|
||
<script src="/static/frontend/js/main.js?v=2.1"></script>
|
||
{block name="script"}{/block}
|
||
<script>
|
||
(function () {
|
||
var mask = document.getElementById('adPopupMask');
|
||
if (!mask) return;
|
||
var KEY = 'closed_popup_ads';
|
||
try {
|
||
if (localStorage.getItem(KEY) === '1') { mask.style.display = 'none'; return; }
|
||
} catch (e) {}
|
||
mask.style.display = 'flex';
|
||
var closeBtn = document.getElementById('adPopupClose');
|
||
if (closeBtn) {
|
||
closeBtn.addEventListener('click', function () {
|
||
mask.style.display = 'none';
|
||
try { localStorage.setItem(KEY, '1'); } catch (e) {}
|
||
});
|
||
mask.addEventListener('click', function (e) {
|
||
if (e.target === mask) {
|
||
mask.style.display = 'none';
|
||
try { localStorage.setItem(KEY, '1'); } catch (e) {}
|
||
}
|
||
});
|
||
}
|
||
})();
|
||
|
||
// 全站悬浮角标广告:关闭按钮
|
||
(function () {
|
||
var box = document.getElementById('adFloat');
|
||
if (!box) return;
|
||
var KEY = 'closed_float_ads';
|
||
try {
|
||
if (localStorage.getItem(KEY) === '1') { box.style.display = 'none'; return; }
|
||
} catch (e) {}
|
||
var closeBtn = document.getElementById('adFloatClose');
|
||
if (closeBtn) {
|
||
closeBtn.addEventListener('click', function (e) {
|
||
e.stopPropagation();
|
||
box.style.display = 'none';
|
||
try { localStorage.setItem(KEY, '1'); } catch (e2) {}
|
||
});
|
||
}
|
||
})();
|
||
</script>
|
||
</body>
|
||
|
||
</html>
|