chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<div class="section" style="text-align:center;padding:80px 0;">
|
||||
<div class="layui-container">
|
||||
<img src="/static/frontend/img/logo.png" style="width:80px;margin-bottom:20px;" alt="404">
|
||||
<h1 style="font-size:120px;color:#1E9FFF;font-weight:bold;line-height:1;margin:0;">404</h1>
|
||||
<p style="font-size:18px;color:#666;margin:20px 0 30px;">抱歉,您访问的页面不存在或已被移除</p>
|
||||
<a href="{:url('index/index')}" class="layui-btn layui-btn-normal" style="height:44px;line-height:44px;padding:0 40px;font-size:16px;">返回首页</a>
|
||||
<a href="{:url('contact/index')}" class="layui-btn layui-btn-primary" style="height:44px;line-height:44px;padding:0 40px;font-size:16px;margin-left:12px;">联系我们</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
{notempty name="adSlots[$slot]"}
|
||||
<div class="ad-slot ad-slot-{$slot}">
|
||||
{volist name="adSlots[$slot]" id="ad"}
|
||||
<div class="ad-item ad-type-{$ad.type}">
|
||||
{switch name="ad.type"}
|
||||
{case value="1"}
|
||||
{if condition="$ad.url"}
|
||||
<a href="{$ad.url}" target="_blank" rel="nofollow">
|
||||
<img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}">
|
||||
</a>
|
||||
{else /}
|
||||
<img src="{$ad.image}" alt="{$ad.title}" title="{$ad.title}">
|
||||
{/if}
|
||||
{/case}
|
||||
{case value="2"}
|
||||
{if condition="$ad.url"}
|
||||
<a href="{$ad.url}" target="_blank" rel="nofollow" class="ad-text-link">{$ad.content}</a>
|
||||
{else /}
|
||||
<span class="ad-text">{$ad.content}</span>
|
||||
{/if}
|
||||
{/case}
|
||||
{case value="3"}
|
||||
{$ad.content|raw}
|
||||
{/case}
|
||||
{/switch}
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
{/notempty}
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="footer">
|
||||
<div class="layui-container">
|
||||
<p class="footer-web">
|
||||
{volist name="links" id="link"}
|
||||
<a href="{$link.url}">{$link.title}</a>
|
||||
{/volist}
|
||||
</p>
|
||||
<div class="layui-row footer-contact">
|
||||
<div class="layui-col-sm2 layui-col-lg1"><img src="/static/frontend/img/erweima.jpg"></div>
|
||||
<div class="layui-col-sm10 layui-col-lg11">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-sm6 layui-col-md8 layui-col-lg9">
|
||||
<p class="contact-top"><i class="layui-icon layui-icon-cellphone"></i>{$siteConf.telephone|default='YwxApp'} (9:00-18:00)</p>
|
||||
<p class="contact-bottom"><i class="layui-icon layui-icon-home"></i>{$siteConf.site_email|default='YwxApp'} </span></p>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md4 layui-col-lg3">
|
||||
<p class="contact-top"><span class="right"> © 2023 {$siteConf.site_name|default='YwxApp'} 版权所有</span>
|
||||
<p class="contact-bottom"><span class="right"> <a href="http://beian.miit.gov.cn" target="_blank" class="icp-link">{$siteConf.beian|default='京ICP备12345678号'}</a></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<!-- 全站置顶公告条(方案 A) -->
|
||||
{notempty name="topNotices"}
|
||||
<div class="site-notice-bar" id="siteNoticeBar">
|
||||
{volist name="topNotices" id="nt"}
|
||||
<div class="notice-item notice-type-{$nt.type}" data-id="{$nt.id}">
|
||||
<span class="notice-badge">{$nt.type_text|default='公告'}</span>
|
||||
<span class="notice-title">{$nt.title}</span>
|
||||
<a href="{:url('notice/read', ['id'=>$nt.id])}" class="notice-link">查看详情</a>
|
||||
<span class="notice-close" data-id="{$nt.id}" title="关闭">×</span>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var KEY = 'closed_notices';
|
||||
try {
|
||||
var closed = JSON.parse(localStorage.getItem(KEY) || '[]');
|
||||
document.querySelectorAll('#siteNoticeBar .notice-item').forEach(function (el) {
|
||||
if (closed.indexOf(el.getAttribute('data-id')) > -1) el.style.display = 'none';
|
||||
});
|
||||
document.querySelectorAll('#siteNoticeBar .notice-close').forEach(function (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
var id = btn.getAttribute('data-id');
|
||||
btn.closest('.notice-item').style.display = 'none';
|
||||
var arr = JSON.parse(localStorage.getItem(KEY) || '[]');
|
||||
if (arr.indexOf(id) === -1) { arr.push(id); localStorage.setItem(KEY, JSON.stringify(arr)); }
|
||||
});
|
||||
});
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
{/notempty}
|
||||
|
||||
<!-- 重构导航:彻底解决移动端Logo重合 -->
|
||||
<header class="main-header">
|
||||
<div class="layui-container header-container">
|
||||
<div class="header-inner">
|
||||
<div class="logo-box">
|
||||
<a href="{:url('index/index')}" class=" ">
|
||||
<span class="logo-text">{$siteConf.sitename|default='YwxApp'}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-trigger" id="navToggle">
|
||||
<span></span><span></span><span></span>
|
||||
</div>
|
||||
<ul class="nav-menu" id="navMenu">
|
||||
{volist name="navMenus" id="m"}
|
||||
<li class="nav-item {if $m.ctrl == $site.controller}active{/if}{if !empty($m.child)} has-child{/if}">
|
||||
<a href="{if strpos($m.url,'http')===0}{$m.url}{else/}{:url($m.url)}{/if}">
|
||||
{if !empty($m.icon)}<i class="layui-icon {$m.icon}"></i> {/if}{$m.title}
|
||||
</a>
|
||||
{if !empty($m.child)}
|
||||
<ul class="sub-menu">
|
||||
{volist name="m.child" id="c"}
|
||||
<li class="sub-item {if $c.ctrl == $site.controller}active{/if}">
|
||||
<a href="{if strpos($c.url,'http')===0}{$c.url}{else/}{:url($c.url)}{/if}">
|
||||
{if !empty($c.icon)}<i class="layui-icon {$c.icon}"></i> {/if}{$c.title}
|
||||
</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,130 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user