增加租户官网模块
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<footer class="yz-footer">
|
||||
<div class="yz-container">
|
||||
<div class="yz-friendlinks">
|
||||
<span>友情链接:</span>
|
||||
{yz:friendlink}<a href="[field:url/]" target="_blank">[field:name/]</a>{/yz:friendlink}
|
||||
</div>
|
||||
<div class="yz-copyright">
|
||||
<p>{yz:companyname} {yz:copyright}</p>
|
||||
<p>{yz:icp}</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="{yz:description}">
|
||||
<title>{yz:sitename}</title>
|
||||
<link rel="icon" href="{yz:ico}">
|
||||
<link rel="stylesheet" href="/themes/default/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="yz-header">
|
||||
<div class="yz-container yz-header-inner">
|
||||
<a class="yz-logo" href="/">
|
||||
<img src="{yz:logo}" alt="{yz:sitename}">
|
||||
</a>
|
||||
<nav class="yz-nav">
|
||||
<ul>
|
||||
{yz:nav}<li><a href="[field:url/]">[field:name/]</a>[field:children/]</li>{/yz:nav}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,39 @@
|
||||
{yz:include file="header.html"/}
|
||||
|
||||
<!-- Banner 轮播 -->
|
||||
<section class="yz-banner">
|
||||
{yz:banner}
|
||||
<a class="yz-banner-item" href="[field:url/]">
|
||||
<img src="[field:image/]" alt="[field:title/]">
|
||||
<div class="yz-banner-caption">
|
||||
<h2>[field:title/]</h2>
|
||||
<p>[field:desc/]</p>
|
||||
</div>
|
||||
</a>
|
||||
{/yz:banner}
|
||||
</section>
|
||||
|
||||
<!-- 新闻动态 -->
|
||||
<section class="yz-section">
|
||||
<div class="yz-container">
|
||||
<div class="yz-section-head">
|
||||
<h2>新闻动态</h2>
|
||||
<a class="yz-more" href="/news">更多 »</a>
|
||||
</div>
|
||||
<ul class="yz-news-grid">
|
||||
{yz:arclist row="4" titlelen="24"}
|
||||
<li class="yz-news-card">
|
||||
<a href="[field:arcurl/]">
|
||||
<img class="yz-news-thumb" src="[field:image/]" alt="[field:titlefull/]" onerror="this.style.display='none'">
|
||||
<h3 title="[field:titlefull/]">[field:title/]</h3>
|
||||
<p class="yz-news-desc">[field:desc/]</p>
|
||||
<span class="yz-news-date">[field:pubdate/]</span>
|
||||
</a>
|
||||
</li>
|
||||
{/yz:arclist}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="/themes/default/static/main.js"></script>
|
||||
{yz:include file="footer.html"/}
|
||||
@@ -0,0 +1,24 @@
|
||||
{yz:include file="header.html"/}
|
||||
|
||||
<section class="yz-section">
|
||||
<div class="yz-container">
|
||||
<div class="yz-section-head">
|
||||
<h2>新闻动态</h2>
|
||||
</div>
|
||||
<ul class="yz-news-list">
|
||||
{yz:arclist row="10" titlelen="40"}
|
||||
<li class="yz-news-row">
|
||||
<a class="yz-news-title" href="[field:arcurl/]" title="[field:titlefull/]">[field:title/]</a>
|
||||
<p class="yz-news-desc">[field:desc/]</p>
|
||||
<div class="yz-news-meta">
|
||||
<span>[field:pubdate/]</span>
|
||||
<span>阅读 [field:views/]</span>
|
||||
</div>
|
||||
</li>
|
||||
{/yz:arclist}
|
||||
</ul>
|
||||
<div class="yz-pager">{yz:pagelist/}</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{yz:include file="footer.html"/}
|
||||
@@ -0,0 +1,18 @@
|
||||
{yz:include file="header.html"/}
|
||||
|
||||
<section class="yz-section">
|
||||
<div class="yz-container yz-article">
|
||||
{yz:arcview}
|
||||
<h1 class="yz-article-title">[field:title/]</h1>
|
||||
<div class="yz-article-meta">
|
||||
<span>发布时间:[field:pubdate/]</span>
|
||||
<span>作者:[field:author/]</span>
|
||||
<span>阅读:[field:views/]</span>
|
||||
</div>
|
||||
<div class="yz-article-content">[field:content/]</div>
|
||||
{/yz:arcview}
|
||||
<div class="yz-article-back"><a href="/news">« 返回新闻列表</a></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{yz:include file="footer.html"/}
|
||||
@@ -0,0 +1,12 @@
|
||||
{yz:include file="header.html"/}
|
||||
|
||||
<section class="yz-section">
|
||||
<div class="yz-container yz-article">
|
||||
<h1 class="yz-article-title">{yz:onepage field="title"/}</h1>
|
||||
<div class="yz-article-content">
|
||||
{yz:onepage/}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{yz:include file="footer.html"/}
|
||||
@@ -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);
|
||||
})();
|
||||
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user