增加租户官网模块

This commit is contained in:
2026-08-19 23:34:28 +08:00
parent ec5cf96d0b
commit 14f2e8b5c1
28 changed files with 3812 additions and 7 deletions
+13
View File
@@ -0,0 +1,13 @@
// default 模板脚本:Banner 简单轮播
(function () {
var items = document.querySelectorAll('.yz-banner-item');
if (items.length === 0) return;
var idx = 0;
items[0].classList.add('active');
if (items.length === 1) return;
setInterval(function () {
items[idx].classList.remove('active');
idx = (idx + 1) % items.length;
items[idx].classList.add('active');
}, 4000);
})();
+83
View File
@@ -0,0 +1,83 @@
/* default 模板样式(自包含,类名统一 yz- 前缀) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #333; background: #fff; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.yz-container { width: 1200px; max-width: 92%; margin: 0 auto; }
/* 头部 */
.yz-header { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 99; }
.yz-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.yz-logo img { height: 40px; }
.yz-nav ul { display: flex; gap: 4px; }
.yz-nav li { position: relative; }
.yz-nav li > a { display: block; padding: 0 18px; line-height: 64px; font-size: 15px; }
.yz-nav li > a:hover { color: #1890ff; }
.yz-sub-menu { display: none; position: absolute; left: 0; top: 64px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 140px; }
.yz-nav li:hover .yz-sub-menu { display: block; }
.yz-sub-menu li a { line-height: 40px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
.yz-sub-menu li a:hover { background: #f5f7fa; color: #1890ff; }
/* Banner */
.yz-banner { position: relative; height: 420px; overflow: hidden; background: #10253f; }
.yz-banner-item { display: none; position: relative; height: 420px; }
.yz-banner-item.active { display: block; }
.yz-banner-item img { width: 100%; height: 100%; object-fit: cover; }
.yz-banner-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 8%; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.yz-banner-caption h2 { font-size: 30px; margin-bottom: 8px; }
.yz-banner-caption p { font-size: 15px; opacity: .9; }
/* 通用区块 */
.yz-section { padding: 48px 0; }
.yz-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; border-bottom: 2px solid #1890ff; padding-bottom: 12px; }
.yz-section-head h2 { font-size: 24px; }
.yz-more { font-size: 14px; color: #888; }
.yz-more:hover { color: #1890ff; }
/* 首页新闻卡片 */
.yz-news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.yz-news-card a { display: block; border: 1px solid #eee; border-radius: 6px; overflow: hidden; transition: box-shadow .25s; background: #fff; height: 100%; }
.yz-news-card a:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.yz-news-thumb { width: 100%; height: 140px; object-fit: cover; }
.yz-news-card h3 { font-size: 15px; padding: 12px 14px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yz-news-desc { font-size: 13px; color: #888; padding: 0 14px; height: 38px; overflow: hidden; }
.yz-news-date { display: block; font-size: 12px; color: #aaa; padding: 8px 14px 12px; }
/* 新闻列表 */
.yz-news-list .yz-news-row { padding: 18px 0; border-bottom: 1px dashed #e5e5e5; }
.yz-news-title { font-size: 17px; font-weight: 600; }
.yz-news-title:hover { color: #1890ff; }
.yz-news-row .yz-news-desc { height: auto; padding: 6px 0; color: #777; font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.yz-news-meta { font-size: 12px; color: #aaa; display: flex; gap: 16px; }
/* 分页(引擎输出类名 yz-pagination / yz-page) */
.yz-pager { margin-top: 32px; text-align: center; }
.yz-pagination { display: inline-flex; gap: 6px; }
.yz-page { display: inline-block; min-width: 34px; height: 34px; line-height: 32px; padding: 0 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #555; }
.yz-page:hover { color: #1890ff; border-color: #1890ff; }
.yz-page.current { background: #1890ff; border-color: #1890ff; color: #fff; }
/* 文章/单页正文 */
.yz-article { max-width: 860px; }
.yz-article-title { font-size: 26px; text-align: center; margin-bottom: 16px; }
.yz-article-meta { text-align: center; color: #999; font-size: 13px; display: flex; gap: 20px; justify-content: center; padding-bottom: 20px; border-bottom: 1px solid #eee; margin-bottom: 24px; }
.yz-article-content { font-size: 15px; line-height: 1.9; min-height: 200px; }
.yz-article-content img { margin: 12px auto; }
.yz-article-back { margin-top: 40px; }
.yz-article-back a { color: #1890ff; font-size: 14px; }
/* 底部 */
.yz-footer { background: #10253f; color: #cfd8e3; padding: 28px 0; margin-top: 40px; }
.yz-friendlinks { font-size: 13px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 14px; }
.yz-friendlinks a { margin-right: 14px; opacity: .85; }
.yz-friendlinks a:hover { color: #fff; }
.yz-copyright { font-size: 13px; text-align: center; opacity: .8; }
.yz-copyright p { margin: 2px 0; }
@media (max-width: 900px) {
.yz-news-grid { grid-template-columns: repeat(2, 1fr); }
.yz-banner, .yz-banner-item { height: 260px; }
.yz-nav li > a { padding: 0 10px; }
}