init local code
@@ -0,0 +1,23 @@
|
||||
# blue-white 皮肤包
|
||||
|
||||
由 default 派生的演示皮肤(方案 §7)。**升级随版本发布,不在站点间复制目录**。
|
||||
|
||||
## 数据契约(模板可取用的 model 属性全集,§4.3)
|
||||
|
||||
| 页面 | 属性 |
|
||||
| --- | --- |
|
||||
| 全部 | `site`(快照:config/分类树/轮播/友链组/院系子站)、`url`(PortalUrlHelper:home/category/article/asset/search/siteHome)、`themeBase`(=`themes/blue-white`)、`navCategories`、`pageTitle`、`seoDescription`、`canonical`、`themeParams`(微调参数,仅 theme.json 声明过的 key)、`themeVarsCss`(服务端预构建 `:root{}` 覆盖串,无参数为空) |
|
||||
| home | `banners`(时间窗内 home 位)、`topArticles`(置顶+最新 6)、`categoryBlocks`(LIST 型根栏目块,各 top 8) |
|
||||
| list / search | `listData`(分页)、`category`(list)、`q` + `searchMode`(search) |
|
||||
| detail | `article`、`prevArticle`、`nextArticle`、`currentCategoryId` |
|
||||
| single | `category`(含 `content`)、`currentCategoryId` |
|
||||
|
||||
原则:皮肤不得假设"首页一定有轮播",对空集合优雅降级。
|
||||
|
||||
## 轮播图尺寸约定(bannerSize)
|
||||
|
||||
1920x560(管理端上传端按此引导裁剪,D2 决策点)。
|
||||
|
||||
## 可调参数
|
||||
|
||||
见 `theme.json` 的 `params`(color 进 CSS 变量;select 供模板 `th:if` 分支布局)。
|
||||
@@ -0,0 +1,332 @@
|
||||
/* ============================================================
|
||||
* blue-white 皮肤包样式(default 派生)(方案 §8.2)
|
||||
* 换肤 = 拷贝 default 目录改 CSS 变量与布局,零后端代码。
|
||||
* 轮播图设计尺寸约定:1920×560(管理端上传端按此引导裁剪,D2 决策点确认)。
|
||||
* ============================================================ */
|
||||
:root {
|
||||
--primary: #2f6bd8;
|
||||
--primary-dark: #1d4fae;
|
||||
--text: #333;
|
||||
--text-light: #777;
|
||||
--bg: #f7f9fc;
|
||||
--card-bg: #fff;
|
||||
--border: #e3e9f2;
|
||||
--max-width: 1200px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
a:hover { color: var(--primary); }
|
||||
img { max-width: 100%; }
|
||||
time, .item-meta { color: var(--text-light); font-size: 13px; }
|
||||
.empty { color: var(--text-light); text-align: center; padding: 32px 0; }
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
.site-header { background: var(--card-bg); border-bottom: 1px solid var(--border); }
|
||||
.header-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
.site-brand { display: flex; align-items: center; gap: 12px; }
|
||||
.site-logo { height: 44px; }
|
||||
.site-name { font-size: 26px; font-weight: 700; color: var(--primary); }
|
||||
.site-search { display: flex; }
|
||||
.site-search input {
|
||||
border: 1px solid var(--border);
|
||||
border-right: none;
|
||||
padding: 8px 12px;
|
||||
width: 220px;
|
||||
outline: none;
|
||||
}
|
||||
.site-search button {
|
||||
border: none;
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
padding: 8px 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ===== 专业院系下拉(院系子站切换,《院系子站方案》) ===== */
|
||||
/* 悬停展开白底纵向列表,右对齐 + 超高滚动(院系数十个子站场景) */
|
||||
.site-colleges { position: relative; }
|
||||
.site-colleges .colleges-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
border: 1px solid var(--border);
|
||||
padding: 8px 14px;
|
||||
cursor: pointer;
|
||||
color: var(--primary);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-arrow { font-style: normal; font-size: 12px; color: var(--text-light); }
|
||||
.site-colleges .colleges-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
min-width: 200px;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--primary);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
|
||||
z-index: 110;
|
||||
}
|
||||
.site-colleges:hover .colleges-menu { display: block; }
|
||||
.site-colleges .colleges-menu li a {
|
||||
display: block;
|
||||
padding: 9px 16px;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-menu li a:hover { background: #f2f6fc; color: var(--primary); }
|
||||
.site-colleges .colleges-menu li.active a { color: var(--primary); font-weight: 600; }
|
||||
.site-nav { background: var(--primary); }
|
||||
.site-nav ul {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 16px;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-nav li a {
|
||||
display: block;
|
||||
padding: 12px 22px;
|
||||
color: #fff;
|
||||
}
|
||||
.site-nav li:hover a, .site-nav li.active a { background: var(--primary-dark); }
|
||||
|
||||
/* ===== 二级下拉导航 ===== */
|
||||
/* 面板为白底纵向列表:需整体覆盖 .site-nav ul 的横向 flex 与内边距 */
|
||||
.site-nav > ul > li { position: relative; }
|
||||
.site-nav li.has-sub > a::after { content: " ▾"; font-size: 12px; opacity: .85; }
|
||||
.site-nav ul.sub-nav {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 168px;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--primary);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
|
||||
z-index: 100;
|
||||
}
|
||||
.site-nav li:hover > .sub-nav { display: block; }
|
||||
.site-nav .sub-nav li a {
|
||||
padding: 9px 16px;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
}
|
||||
.site-nav .sub-nav li a:hover { background: #f2f6fc; color: var(--primary); }
|
||||
.site-nav .sub-nav li.active a { color: var(--primary); font-weight: 600; }
|
||||
|
||||
/* ===== 首页轮播 ===== */
|
||||
.banner { position: relative; max-width: var(--max-width); margin: 16px auto; overflow: hidden; }
|
||||
.banner-slides { position: relative; height: 420px; }
|
||||
.banner-slide { display: none; position: absolute; inset: 0; }
|
||||
.banner-slide.active { display: block; }
|
||||
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.banner-title {
|
||||
position: absolute;
|
||||
left: 0; right: 0; bottom: 0;
|
||||
padding: 12px 20px;
|
||||
color: #fff;
|
||||
background: linear-gradient(transparent, rgba(0, 0, 0, .6));
|
||||
}
|
||||
.banner-dots {
|
||||
position: absolute;
|
||||
bottom: 12px; right: 20px;
|
||||
display: flex; gap: 8px;
|
||||
}
|
||||
.banner-dots button {
|
||||
width: 10px; height: 10px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: rgba(255, 255, 255, .6);
|
||||
cursor: pointer;
|
||||
}
|
||||
.banner-dots button.active { background: #fff; }
|
||||
|
||||
/* ===== 通用区块 ===== */
|
||||
.top-strip, .category-block {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 20px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.section-title, .block-head h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 20px;
|
||||
border-left: 4px solid var(--primary);
|
||||
padding-left: 10px;
|
||||
}
|
||||
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
|
||||
.more { font-size: 13px; color: var(--text-light); }
|
||||
.top-strip ul, .block-list { list-style: none; margin: 0; padding: 0; }
|
||||
.top-strip li, .block-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 9px 0;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
.top-strip li:last-child, .block-list li:last-child { border-bottom: none; }
|
||||
.top-strip li a, .block-list li a {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.top-badge {
|
||||
flex: none;
|
||||
color: #fff;
|
||||
background: var(--primary);
|
||||
font-size: 12px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* ===== 列表页 ===== */
|
||||
.list-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 24px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.breadcrumb { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }
|
||||
.breadcrumb a { margin-right: 8px; }
|
||||
.breadcrumb span { margin-left: 8px; }
|
||||
.page-title {
|
||||
font-size: 22px;
|
||||
border-left: 4px solid var(--primary);
|
||||
padding-left: 10px;
|
||||
margin: 0 0 18px;
|
||||
}
|
||||
.article-list { list-style: none; margin: 0; padding: 0; }
|
||||
.article-list li { padding: 14px 0; border-bottom: 1px dashed var(--border); }
|
||||
.item-title { font-size: 17px; }
|
||||
.item-summary {
|
||||
color: var(--text-light);
|
||||
font-size: 14px;
|
||||
margin: 6px 0;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.item-meta { display: flex; gap: 10px; align-items: center; }
|
||||
|
||||
/* ===== 分页 ===== */
|
||||
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0 4px; }
|
||||
.pagination a {
|
||||
min-width: 34px;
|
||||
text-align: center;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--card-bg);
|
||||
}
|
||||
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
|
||||
|
||||
/* ===== 详情/单页 ===== */
|
||||
.detail-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 32px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.article-title { margin: 8px 0 12px; font-size: 26px; text-align: center; }
|
||||
.article-meta {
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
color: var(--text-light);
|
||||
font-size: 13px;
|
||||
padding-bottom: 18px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.article-content { line-height: 1.9; font-size: 16px; padding-top: 20px; word-break: break-word; }
|
||||
.article-content img { height: auto; }
|
||||
.article-content table { border-collapse: collapse; width: 100%; }
|
||||
.article-content table td, .article-content table th { border: 1px solid var(--border); padding: 6px 10px; }
|
||||
.article-sibling { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; font-size: 14px; }
|
||||
|
||||
/* ===== 页脚 ===== */
|
||||
.site-footer { margin-top: 32px; background: var(--primary-dark); color: rgba(255, 255, 255, .85); }
|
||||
.footer-links {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px 16px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.links-group { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; }
|
||||
.group-name { font-weight: 600; margin-right: 4px; }
|
||||
.footer-info {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 12px 16px 20px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
}
|
||||
.footer-info p { margin: 4px 0; }
|
||||
|
||||
/* ===== 移动端适配 ===== */
|
||||
@media (max-width: 768px) {
|
||||
.header-inner { flex-direction: column; align-items: stretch; }
|
||||
.site-search input { flex: 1; width: auto; }
|
||||
.site-colleges { align-self: flex-start; }
|
||||
.site-colleges .colleges-menu { left: 0; right: auto; min-width: 100%; }
|
||||
.banner-slides { height: 200px; }
|
||||
.detail-main, .list-main { padding: 18px 14px; }
|
||||
.article-title { font-size: 22px; }
|
||||
/* 触屏无 hover:子菜单静态平铺(缩进列表),不做浮层 */
|
||||
.site-nav ul.sub-nav {
|
||||
display: block;
|
||||
position: static;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
min-width: 0;
|
||||
padding: 0 0 6px;
|
||||
}
|
||||
.site-nav .sub-nav li a { color: rgba(255, 255, 255, .9); padding: 8px 16px 8px 34px; }
|
||||
.site-nav .sub-nav li a:hover { background: var(--primary-dark); color: #fff; }
|
||||
}
|
||||
|
||||
|
||||
/* ===== blue-white 主题差异层(方案 §7:差异仅限 CSS + fragments)===== */
|
||||
/* 细线顶栏 + 大留白 + 卡片化列表 */
|
||||
.site-header { border-bottom: 1px solid var(--border); box-shadow: none; }
|
||||
.home-main, .list-main, .detail-main { padding-top: 36px; padding-bottom: 56px; }
|
||||
.article-list .article-title, .block-head, .page-title { letter-spacing: .02em; }
|
||||
.article-list li, .banner, .banner-title { border-radius: 4px; }
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||
<defs><linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#5486df"/><stop offset="1" stop-color="#214b97"/>
|
||||
</linearGradient></defs>
|
||||
<rect width="64" height="64" fill="url(#bg)"/>
|
||||
<circle cx="32" cy="25" r="10" fill="#ffffff"/>
|
||||
<path d="M 16 49.3 Q 32 30.7 48 49.3 Z" fill="#ffffff" opacity="0.92"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 434 B |
@@ -0,0 +1,40 @@
|
||||
/* default 皮肤包脚本:仅首页轮播自动播放与圆点切换,无任何外部依赖 */
|
||||
(function () {
|
||||
var slides = document.querySelectorAll('.banner-slide');
|
||||
var dots = document.querySelectorAll('.banner-dots button');
|
||||
if (!slides.length) {
|
||||
return;
|
||||
}
|
||||
var current = 0;
|
||||
var timer = null;
|
||||
|
||||
function show(index) {
|
||||
slides[current].classList.remove('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.remove('active');
|
||||
}
|
||||
current = (index + slides.length) % slides.length;
|
||||
slides[current].classList.add('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (slides.length > 1) {
|
||||
timer = window.setInterval(function () {
|
||||
show(current + 1);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
dots.forEach(function (dot, index) {
|
||||
dot.addEventListener('click', function () {
|
||||
window.clearInterval(timer);
|
||||
show(index);
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
start();
|
||||
})();
|
||||
|
After Width: | Height: | Size: 85 KiB |
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main">
|
||||
<nav class="breadcrumb">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<a th:if="${currentCategoryId != null}" th:href="${url.category(currentCategoryId)}">栏目</a>
|
||||
<span>正文</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${article.title}">文章标题</h1>
|
||||
<div class="article-meta">
|
||||
<time th:if="${article.publishTime != null}"
|
||||
th:text="${'发布时间:' + #temporals.format(article.publishTime, 'yyyy-MM-dd HH:mm')}">2026-01-01 10:00</time>
|
||||
<span th:if="${!#strings.isEmpty(article.authorName)}"
|
||||
th:text="'作者:' + ${article.authorName}">作者</span>
|
||||
<span th:if="${!#strings.isEmpty(article.source)}"
|
||||
th:text="'来源:' + ${article.source}">来源</span>
|
||||
<span th:text="'浏览量:' + ${article.viewCount}">浏览量</span>
|
||||
</div>
|
||||
<!-- 正文:入库前已经 jsoup 白名单清洗(方案 §8.5),此处允许 utext;
|
||||
其余字段一律 th:text 转义输出 -->
|
||||
<div class="article-content" th:utext="${article.content}">正文</div>
|
||||
</article>
|
||||
|
||||
<nav class="article-sibling">
|
||||
<a th:if="${prevArticle != null}" class="prev"
|
||||
th:href="${url.article(prevArticle.id)}"
|
||||
th:text="'上一篇:' + ${prevArticle.title}">上一篇</a>
|
||||
<a th:if="${nextArticle != null}" class="next"
|
||||
th:href="${url.article(nextArticle.id)}"
|
||||
th:text="'下一篇:' + ${nextArticle.title}">下一篇</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共页脚:联系信息 + 友情链接(分组渲染,方案 §8.1:友链不设独立路由) -->
|
||||
<footer class="site-footer" th:fragment="footer">
|
||||
<div class="footer-links" th:if="${!#lists.isEmpty(site.linkGroups)}">
|
||||
<div class="links-group" th:each="group : ${site.linkGroups}">
|
||||
<span class="group-name" th:text="${group.groupName}">分组</span>
|
||||
<a th:each="link : ${group.links}" th:href="${link.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${link.name}">链接</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<p th:if="${site.config['contact'] != null}" th:text="${site.config['contact']}">联系方式</p>
|
||||
<p th:if="${site.config['copyright'] != null}" th:text="${site.config['copyright']}">版权信息</p>
|
||||
<p th:if="${site.config['beian'] != null}" th:text="${site.config['beian']}">备案号</p>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<!-- 公共 head 片段:SEO(title/description/canonical)+ 主题资产(方案 §8.3/§8.6) -->
|
||||
<head th:fragment="head">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title th:text="${pageTitle}">页面标题</title>
|
||||
<meta name="description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}"
|
||||
th:content="${seoDescription}">
|
||||
<link rel="canonical" th:if="${canonical != null}" th:href="${canonical}">
|
||||
<!-- og 标签基本三件(C-7,方案 §8.6 canonical/og 同基准) -->
|
||||
<meta property="og:title" th:if="${pageTitle != null}" th:content="${pageTitle}">
|
||||
<meta property="og:description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}" th:content="${seoDescription}">
|
||||
<meta property="og:image" th:if="${ogImage != null}" th:content="${ogImage}">
|
||||
<link rel="stylesheet" th:href="${url.asset('css/main.css')}">
|
||||
<!-- 微调参数 CSS 变量覆盖(方案 §5.3):位于皮肤 CSS 之后层叠覆盖;值由服务端预构建并校验 -->
|
||||
<style th:if="${not #strings.isEmpty(themeVarsCss)}" th:utext="${themeVarsCss}"></style>
|
||||
<!-- favicon:管理端配置了 favicon 键用上传图,未配置输出主题内置兜底 icon(assets/favicon.png) -->
|
||||
<link rel="icon" type="image/png"
|
||||
th:href="${site.config['favicon'] != null ? url.upload(site.config['favicon']) : url.asset('favicon.png')}">
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共头部:站点名 + 栏目导航 + 站内搜索 + 专业院系下拉(院系子站切换,《院系子站方案》) -->
|
||||
<header class="site-header" th:fragment="header">
|
||||
<div class="header-inner">
|
||||
<div class="site-brand">
|
||||
<img th:if="${site.config['logo'] != null}" class="site-logo"
|
||||
th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
<a class="site-name" th:href="${url.home()}" th:text="${site.name}">站点名称</a>
|
||||
</div>
|
||||
<form class="site-search" th:action="${url.search('', null)}" method="get">
|
||||
<input type="text" name="q" placeholder="站内搜索" aria-label="站内搜索">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
<!-- 专业院系下拉:顶层站取其子站、院系子站取兄弟站(含自身);无子站不渲染;文案经 config_json.colleges_label 覆盖 -->
|
||||
<div class="site-colleges" th:if="${!site.colleges.isEmpty()}"
|
||||
th:with="collegesLabel=${site.config['colleges_label'] ?: '专业院系'}">
|
||||
<span class="colleges-toggle">
|
||||
<a href="javascript:void(0)" th:text="${collegesLabel}">专业院系</a>
|
||||
<i class="colleges-arrow">▾</i>
|
||||
</span>
|
||||
<ul class="colleges-menu">
|
||||
<li th:each="col : ${site.colleges}" th:classappend="${col.code == site.code} ? 'active'">
|
||||
<a th:href="${url.siteHome(col.code, col.publicBaseUrl)}"
|
||||
th:title="${col.name}" th:text="${col.name}">学院名称</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="site-nav">
|
||||
<ul>
|
||||
<li th:classappend="${currentCategoryId == null} ? 'active'">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
</li>
|
||||
<li th:each="cat : ${navCategories}"
|
||||
th:classappend="${(currentCategoryId == cat.id ? 'active' : '') + (!cat.children.isEmpty() ? ' has-sub' : '')}">
|
||||
<!-- 外链栏目直接外跳;其余进栏目页(方案 §8.1) -->
|
||||
<a th:if="${cat.type == 3}" th:href="${cat.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${cat.name}">栏目</a>
|
||||
<a th:unless="${cat.type == 3}" th:href="${url.category(cat.id)}" th:text="${cat.name}">栏目</a>
|
||||
<!-- 二级下拉:悬停展开(样式见 assets/css/main.css .sub-nav) -->
|
||||
<ul class="sub-nav" th:if="${!cat.children.isEmpty()}">
|
||||
<li th:each="sub : ${cat.children}">
|
||||
<a th:if="${sub.type == 3}" th:href="${sub.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${sub.name}">子栏目</a>
|
||||
<a th:unless="${sub.type == 3}" th:href="${url.category(sub.id)}" th:text="${sub.name}">子栏目</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</html>
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="home-main">
|
||||
<!-- 首页轮播位(cms_banner position=home;设计尺寸约定 1920×560,见 assets/css 注释) -->
|
||||
<section class="banner" th:if="${!#lists.isEmpty(banners)}">
|
||||
<div class="banner-slides">
|
||||
<a class="banner-slide" th:each="b, stat : ${banners}"
|
||||
th:classappend="${stat.first} ? 'active'"
|
||||
th:href="${b.linkUrl}" th:title="${b.title}">
|
||||
<img th:src="${b.imageUrl}" th:alt="${b.title}">
|
||||
<span class="banner-title" th:text="${b.title}">标题</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="banner-dots" th:if="${#lists.size(banners) > 1}">
|
||||
<button th:each="b, stat : ${banners}" th:classappend="${stat.first} ? 'active'"
|
||||
th:aria-label="${'第' + (stat.count) + '张'}"></button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 置顶/头条区(cms_article topmost 优先) -->
|
||||
<section class="top-strip" th:if="${!#lists.isEmpty(topArticles)}">
|
||||
<h2 class="section-title">头条推荐</h2>
|
||||
<ul>
|
||||
<li th:each="item : ${topArticles}">
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<!-- 一级栏目区块(每栏目 top 8) -->
|
||||
<section class="category-block" th:each="block : ${categoryBlocks}">
|
||||
<div class="block-head">
|
||||
<h2 th:text="${block.category.name}">栏目名</h2>
|
||||
<a class="more" th:href="${block.moreUrl}">更多 ></a>
|
||||
</div>
|
||||
<ul class="block-list" th:if="${!#lists.isEmpty(block.items)}">
|
||||
<li th:each="item : ${block.items}">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="empty" th:if="${#lists.isEmpty(block.items)}">暂无内容</p>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="list-main">
|
||||
<nav class="breadcrumb" th:if="${searchMode != true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
<nav class="breadcrumb" th:if="${searchMode == true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span>搜索结果</span>
|
||||
</nav>
|
||||
|
||||
<h1 class="page-title" th:if="${searchMode != true}" th:text="${category.name}">栏目名</h1>
|
||||
<h1 class="page-title" th:if="${searchMode == true}" th:text="'搜索:' + ${q}">搜索词</h1>
|
||||
|
||||
<ul class="article-list">
|
||||
<li th:each="item : ${listData.items}">
|
||||
<a class="item-title" th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<p class="item-summary" th:if="${!#strings.isEmpty(item.summary)}" th:text="${item.summary}">摘要</p>
|
||||
<div class="item-meta">
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="empty" th:if="${#lists.isEmpty(listData.items)}">暂无内容</p>
|
||||
|
||||
<!-- 分页(列表页/搜索页共用) -->
|
||||
<nav class="pagination" th:if="${listData.totalPages > 1}"
|
||||
th:with="cur=${listData.page}, total=${listData.totalPages}">
|
||||
<a th:if="${cur > 1}"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur - 1)} : ${url.category(listData.categoryId) + '?page=' + (cur - 1)}">上一页</a>
|
||||
<a th:each="p : ${#numbers.sequence(1, total)}"
|
||||
th:classappend="${p == cur} ? 'active'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, p)} : ${url.category(listData.categoryId) + '?page=' + p}"
|
||||
th:text="${p}">1</a>
|
||||
<a th:if="${cur < total}"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur + 1)} : ${url.category(listData.categoryId) + '?page=' + (cur + 1)}">下一页</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main">
|
||||
<nav class="breadcrumb">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${category.name}">栏目名</h1>
|
||||
<!-- 单页栏目内容(type=2,入库前已 jsoup 清洗) -->
|
||||
<div class="article-content" th:utext="${category.content}">单页内容</div>
|
||||
<p class="empty" th:if="${#strings.isEmpty(category.content)}">暂无内容</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"specVersion": 1,
|
||||
"name": "blue-white",
|
||||
"title": "蓝白简约",
|
||||
"version": "1.0.0",
|
||||
"author": "yunhai",
|
||||
"description": "细线顶栏 + 卡片化列表 + 大留白,适合高校与职业院校(方案 §7)。",
|
||||
"screenshot": "assets/screenshot.png",
|
||||
"bannerSize": "1920x560",
|
||||
"params": [
|
||||
{ "key": "primary", "cssVar": "--primary", "label": "主色", "type": "color", "default": "#2f6bd8" },
|
||||
{ "key": "primaryDark", "cssVar": "--primary-dark", "label": "主色加深", "type": "color", "default": "#1d4fae" },
|
||||
{ "key": "bg", "cssVar": "--bg", "label": "页面底色", "type": "color", "default": "#f7f9fc" },
|
||||
{ "key": "border", "cssVar": "--border", "label": "边框色", "type": "color", "default": "#e3e9f2" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# classic-red 皮肤包
|
||||
|
||||
由 default 派生的演示皮肤(方案 §7)。**升级随版本发布,不在站点间复制目录**。
|
||||
|
||||
## 数据契约(模板可取用的 model 属性全集,§4.3)
|
||||
|
||||
| 页面 | 属性 |
|
||||
| --- | --- |
|
||||
| 全部 | `site`(快照:config/分类树/轮播/友链组/院系子站)、`url`(PortalUrlHelper:home/category/article/asset/search/siteHome)、`themeBase`(=`themes/classic-red`)、`navCategories`、`pageTitle`、`seoDescription`、`canonical`、`themeParams`(微调参数,仅 theme.json 声明过的 key)、`themeVarsCss`(服务端预构建 `:root{}` 覆盖串,无参数为空) |
|
||||
| home | `banners`(时间窗内 home 位)、`topArticles`(置顶+最新 6)、`categoryBlocks`(LIST 型根栏目块,各 top 8) |
|
||||
| list / search | `listData`(分页)、`category`(list)、`q` + `searchMode`(search) |
|
||||
| detail | `article`、`prevArticle`、`nextArticle`、`currentCategoryId` |
|
||||
| single | `category`(含 `content`)、`currentCategoryId` |
|
||||
|
||||
原则:皮肤不得假设"首页一定有轮播",对空集合优雅降级。
|
||||
|
||||
## 轮播图尺寸约定(bannerSize)
|
||||
|
||||
1920x560(管理端上传端按此引导裁剪,D2 决策点)。
|
||||
|
||||
## 可调参数
|
||||
|
||||
见 `theme.json` 的 `params`(color 进 CSS 变量;select 供模板 `th:if` 分支布局)。
|
||||
@@ -0,0 +1,334 @@
|
||||
/* ============================================================
|
||||
* classic-red 皮肤包样式(default 派生)(方案 §8.2)
|
||||
* 换肤 = 拷贝 default 目录改 CSS 变量与布局,零后端代码。
|
||||
* 轮播图设计尺寸约定:1920×560(管理端上传端按此引导裁剪,D2 决策点确认)。
|
||||
* ============================================================ */
|
||||
:root {
|
||||
--primary: #b01a2e;
|
||||
--primary-dark: #7f1224;
|
||||
--text: #333;
|
||||
--text-light: #777;
|
||||
--bg: #f7f5f2;
|
||||
--card-bg: #fff;
|
||||
--border: #e5e6eb;
|
||||
--max-width: 1200px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
a:hover { color: var(--primary); }
|
||||
img { max-width: 100%; }
|
||||
time, .item-meta { color: var(--text-light); font-size: 13px; }
|
||||
.empty { color: var(--text-light); text-align: center; padding: 32px 0; }
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
.site-header { background: var(--card-bg); border-bottom: 1px solid var(--border); }
|
||||
.header-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
.site-brand { display: flex; align-items: center; gap: 12px; }
|
||||
.site-logo { height: 44px; }
|
||||
.site-name { font-size: 26px; font-weight: 700; color: var(--primary); }
|
||||
.site-search { display: flex; }
|
||||
.site-search input {
|
||||
border: 1px solid var(--border);
|
||||
border-right: none;
|
||||
padding: 8px 12px;
|
||||
width: 220px;
|
||||
outline: none;
|
||||
}
|
||||
.site-search button {
|
||||
border: none;
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
padding: 8px 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ===== 专业院系下拉(院系子站切换,《院系子站方案》) ===== */
|
||||
/* 悬停展开白底纵向列表,右对齐 + 超高滚动(院系数十个子站场景) */
|
||||
.site-colleges { position: relative; }
|
||||
.site-colleges .colleges-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
border: 1px solid var(--border);
|
||||
padding: 8px 14px;
|
||||
cursor: pointer;
|
||||
color: var(--primary);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-arrow { font-style: normal; font-size: 12px; color: var(--text-light); }
|
||||
.site-colleges .colleges-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
min-width: 200px;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--primary);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
|
||||
z-index: 110;
|
||||
}
|
||||
.site-colleges:hover .colleges-menu { display: block; }
|
||||
.site-colleges .colleges-menu li a {
|
||||
display: block;
|
||||
padding: 9px 16px;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-menu li a:hover { background: #f2f6fc; color: var(--primary); }
|
||||
.site-colleges .colleges-menu li.active a { color: var(--primary); font-weight: 600; }
|
||||
.site-nav { background: var(--primary); }
|
||||
.site-nav ul {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 16px;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-nav li a {
|
||||
display: block;
|
||||
padding: 12px 22px;
|
||||
color: #fff;
|
||||
}
|
||||
.site-nav li:hover a, .site-nav li.active a { background: var(--primary-dark); }
|
||||
|
||||
/* ===== 二级下拉导航 ===== */
|
||||
/* 面板为白底纵向列表:需整体覆盖 .site-nav ul 的横向 flex 与内边距 */
|
||||
.site-nav > ul > li { position: relative; }
|
||||
.site-nav li.has-sub > a::after { content: " ▾"; font-size: 12px; opacity: .85; }
|
||||
.site-nav ul.sub-nav {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 168px;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--primary);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
|
||||
z-index: 100;
|
||||
}
|
||||
.site-nav li:hover > .sub-nav { display: block; }
|
||||
.site-nav .sub-nav li a {
|
||||
padding: 9px 16px;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
}
|
||||
.site-nav .sub-nav li a:hover { background: #f2f6fc; color: var(--primary); }
|
||||
.site-nav .sub-nav li.active a { color: var(--primary); font-weight: 600; }
|
||||
|
||||
/* ===== 首页轮播 ===== */
|
||||
.banner { position: relative; max-width: var(--max-width); margin: 16px auto; overflow: hidden; }
|
||||
.banner-slides { position: relative; height: 420px; }
|
||||
.banner-slide { display: none; position: absolute; inset: 0; }
|
||||
.banner-slide.active { display: block; }
|
||||
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.banner-title {
|
||||
position: absolute;
|
||||
left: 0; right: 0; bottom: 0;
|
||||
padding: 12px 20px;
|
||||
color: #fff;
|
||||
background: linear-gradient(transparent, rgba(0, 0, 0, .6));
|
||||
}
|
||||
.banner-dots {
|
||||
position: absolute;
|
||||
bottom: 12px; right: 20px;
|
||||
display: flex; gap: 8px;
|
||||
}
|
||||
.banner-dots button {
|
||||
width: 10px; height: 10px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: rgba(255, 255, 255, .6);
|
||||
cursor: pointer;
|
||||
}
|
||||
.banner-dots button.active { background: #fff; }
|
||||
|
||||
/* ===== 通用区块 ===== */
|
||||
.top-strip, .category-block {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 20px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.section-title, .block-head h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 20px;
|
||||
border-left: 4px solid var(--primary);
|
||||
padding-left: 10px;
|
||||
}
|
||||
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
|
||||
.more { font-size: 13px; color: var(--text-light); }
|
||||
.top-strip ul, .block-list { list-style: none; margin: 0; padding: 0; }
|
||||
.top-strip li, .block-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 9px 0;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
.top-strip li:last-child, .block-list li:last-child { border-bottom: none; }
|
||||
.top-strip li a, .block-list li a {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.top-badge {
|
||||
flex: none;
|
||||
color: #fff;
|
||||
background: var(--primary);
|
||||
font-size: 12px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* ===== 列表页 ===== */
|
||||
.list-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 24px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.breadcrumb { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }
|
||||
.breadcrumb a { margin-right: 8px; }
|
||||
.breadcrumb span { margin-left: 8px; }
|
||||
.page-title {
|
||||
font-size: 22px;
|
||||
border-left: 4px solid var(--primary);
|
||||
padding-left: 10px;
|
||||
margin: 0 0 18px;
|
||||
}
|
||||
.article-list { list-style: none; margin: 0; padding: 0; }
|
||||
.article-list li { padding: 14px 0; border-bottom: 1px dashed var(--border); }
|
||||
.item-title { font-size: 17px; }
|
||||
.item-summary {
|
||||
color: var(--text-light);
|
||||
font-size: 14px;
|
||||
margin: 6px 0;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.item-meta { display: flex; gap: 10px; align-items: center; }
|
||||
|
||||
/* ===== 分页 ===== */
|
||||
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0 4px; }
|
||||
.pagination a {
|
||||
min-width: 34px;
|
||||
text-align: center;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--card-bg);
|
||||
}
|
||||
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
|
||||
|
||||
/* ===== 详情/单页 ===== */
|
||||
.detail-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 32px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.article-title { margin: 8px 0 12px; font-size: 26px; text-align: center; }
|
||||
.article-meta {
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
color: var(--text-light);
|
||||
font-size: 13px;
|
||||
padding-bottom: 18px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.article-content { line-height: 1.9; font-size: 16px; padding-top: 20px; word-break: break-word; }
|
||||
.article-content img { height: auto; }
|
||||
.article-content table { border-collapse: collapse; width: 100%; }
|
||||
.article-content table td, .article-content table th { border: 1px solid var(--border); padding: 6px 10px; }
|
||||
.article-sibling { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; font-size: 14px; }
|
||||
|
||||
/* ===== 页脚 ===== */
|
||||
.site-footer { margin-top: 32px; background: var(--primary-dark); color: rgba(255, 255, 255, .85); }
|
||||
.footer-links {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px 16px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.links-group { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; }
|
||||
.group-name { font-weight: 600; margin-right: 4px; }
|
||||
.footer-info {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 12px 16px 20px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
}
|
||||
.footer-info p { margin: 4px 0; }
|
||||
|
||||
/* ===== 移动端适配 ===== */
|
||||
@media (max-width: 768px) {
|
||||
.header-inner { flex-direction: column; align-items: stretch; }
|
||||
.site-search input { flex: 1; width: auto; }
|
||||
.site-colleges { align-self: flex-start; }
|
||||
.site-colleges .colleges-menu { left: 0; right: auto; min-width: 100%; }
|
||||
.banner-slides { height: 200px; }
|
||||
.detail-main, .list-main { padding: 18px 14px; }
|
||||
.article-title { font-size: 22px; }
|
||||
/* 触屏无 hover:子菜单静态平铺(缩进列表),不做浮层 */
|
||||
.site-nav ul.sub-nav {
|
||||
display: block;
|
||||
position: static;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
min-width: 0;
|
||||
padding: 0 0 6px;
|
||||
}
|
||||
.site-nav .sub-nav li a { color: rgba(255, 255, 255, .9); padding: 8px 16px 8px 34px; }
|
||||
.site-nav .sub-nav li a:hover { background: var(--primary-dark); color: #fff; }
|
||||
}
|
||||
|
||||
|
||||
/* ===== classic-red 主题差异层(方案 §7:差异仅限 CSS + fragments)===== */
|
||||
/* 宋体标题(中小学/党政风) */
|
||||
.site-name, .banner-title, .page-title, .section-title, .article-title, .item-title {
|
||||
font-family: "SimSun", "STSong", "Songti SC", serif;
|
||||
}
|
||||
/* 头部样式参数(theme.json headerStyle=plain → 简洁顶栏) */
|
||||
.site-header.header-plain { background: #fff; border-bottom: 2px solid var(--primary); }
|
||||
.site-header.header-plain .site-name { color: var(--primary-dark); }
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||
<defs><linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#be4354"/><stop offset="1" stop-color="#7b1220"/>
|
||||
</linearGradient></defs>
|
||||
<rect width="64" height="64" fill="url(#bg)"/>
|
||||
<circle cx="32" cy="25" r="10" fill="#ffffff"/>
|
||||
<path d="M 16 49.3 Q 32 30.7 48 49.3 Z" fill="#ffffff" opacity="0.92"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 434 B |
@@ -0,0 +1,40 @@
|
||||
/* default 皮肤包脚本:仅首页轮播自动播放与圆点切换,无任何外部依赖 */
|
||||
(function () {
|
||||
var slides = document.querySelectorAll('.banner-slide');
|
||||
var dots = document.querySelectorAll('.banner-dots button');
|
||||
if (!slides.length) {
|
||||
return;
|
||||
}
|
||||
var current = 0;
|
||||
var timer = null;
|
||||
|
||||
function show(index) {
|
||||
slides[current].classList.remove('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.remove('active');
|
||||
}
|
||||
current = (index + slides.length) % slides.length;
|
||||
slides[current].classList.add('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (slides.length > 1) {
|
||||
timer = window.setInterval(function () {
|
||||
show(current + 1);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
dots.forEach(function (dot, index) {
|
||||
dot.addEventListener('click', function () {
|
||||
window.clearInterval(timer);
|
||||
show(index);
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
start();
|
||||
})();
|
||||
|
After Width: | Height: | Size: 84 KiB |
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main">
|
||||
<nav class="breadcrumb">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<a th:if="${currentCategoryId != null}" th:href="${url.category(currentCategoryId)}">栏目</a>
|
||||
<span>正文</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${article.title}">文章标题</h1>
|
||||
<div class="article-meta">
|
||||
<time th:if="${article.publishTime != null}"
|
||||
th:text="${'发布时间:' + #temporals.format(article.publishTime, 'yyyy-MM-dd HH:mm')}">2026-01-01 10:00</time>
|
||||
<span th:if="${!#strings.isEmpty(article.authorName)}"
|
||||
th:text="'作者:' + ${article.authorName}">作者</span>
|
||||
<span th:if="${!#strings.isEmpty(article.source)}"
|
||||
th:text="'来源:' + ${article.source}">来源</span>
|
||||
<span th:text="'浏览量:' + ${article.viewCount}">浏览量</span>
|
||||
</div>
|
||||
<!-- 正文:入库前已经 jsoup 白名单清洗(方案 §8.5),此处允许 utext;
|
||||
其余字段一律 th:text 转义输出 -->
|
||||
<div class="article-content" th:utext="${article.content}">正文</div>
|
||||
</article>
|
||||
|
||||
<nav class="article-sibling">
|
||||
<a th:if="${prevArticle != null}" class="prev"
|
||||
th:href="${url.article(prevArticle.id)}"
|
||||
th:text="'上一篇:' + ${prevArticle.title}">上一篇</a>
|
||||
<a th:if="${nextArticle != null}" class="next"
|
||||
th:href="${url.article(nextArticle.id)}"
|
||||
th:text="'下一篇:' + ${nextArticle.title}">下一篇</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共页脚:联系信息 + 友情链接(分组渲染,方案 §8.1:友链不设独立路由) -->
|
||||
<footer class="site-footer" th:fragment="footer">
|
||||
<div class="footer-links" th:if="${!#lists.isEmpty(site.linkGroups)}">
|
||||
<div class="links-group" th:each="group : ${site.linkGroups}">
|
||||
<span class="group-name" th:text="${group.groupName}">分组</span>
|
||||
<a th:each="link : ${group.links}" th:href="${link.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${link.name}">链接</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<p th:if="${site.config['contact'] != null}" th:text="${site.config['contact']}">联系方式</p>
|
||||
<p th:if="${site.config['copyright'] != null}" th:text="${site.config['copyright']}">版权信息</p>
|
||||
<p th:if="${site.config['beian'] != null}" th:text="${site.config['beian']}">备案号</p>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<!-- 公共 head 片段:SEO(title/description/canonical)+ 主题资产(方案 §8.3/§8.6) -->
|
||||
<head th:fragment="head">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title th:text="${pageTitle}">页面标题</title>
|
||||
<meta name="description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}"
|
||||
th:content="${seoDescription}">
|
||||
<link rel="canonical" th:if="${canonical != null}" th:href="${canonical}">
|
||||
<!-- og 标签基本三件(C-7,方案 §8.6 canonical/og 同基准) -->
|
||||
<meta property="og:title" th:if="${pageTitle != null}" th:content="${pageTitle}">
|
||||
<meta property="og:description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}" th:content="${seoDescription}">
|
||||
<meta property="og:image" th:if="${ogImage != null}" th:content="${ogImage}">
|
||||
<link rel="stylesheet" th:href="${url.asset('css/main.css')}">
|
||||
<!-- 微调参数 CSS 变量覆盖(方案 §5.3):位于皮肤 CSS 之后层叠覆盖;值由服务端预构建并校验 -->
|
||||
<style th:if="${not #strings.isEmpty(themeVarsCss)}" th:utext="${themeVarsCss}"></style>
|
||||
<!-- favicon:管理端配置了 favicon 键用上传图,未配置输出主题内置兜底 icon(assets/favicon.png) -->
|
||||
<link rel="icon" type="image/png"
|
||||
th:href="${site.config['favicon'] != null ? url.upload(site.config['favicon']) : url.asset('favicon.png')}">
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共头部:站点名 + 栏目导航 + 站内搜索 + 专业院系下拉(院系子站切换,《院系子站方案》) -->
|
||||
<header class="site-header" th:fragment="header"
|
||||
th:classappend="${themeParams['headerStyle'] == 'plain'} ? 'header-plain'">
|
||||
<div class="header-inner">
|
||||
<div class="site-brand">
|
||||
<img th:if="${site.config['logo'] != null}" class="site-logo"
|
||||
th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
<a class="site-name" th:href="${url.home()}" th:text="${site.name}">站点名称</a>
|
||||
</div>
|
||||
<form class="site-search" th:action="${url.search('', null)}" method="get">
|
||||
<input type="text" name="q" placeholder="站内搜索" aria-label="站内搜索">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
<!-- 专业院系下拉:顶层站取其子站、院系子站取兄弟站(含自身);无子站不渲染;文案经 config_json.colleges_label 覆盖 -->
|
||||
<div class="site-colleges" th:if="${!site.colleges.isEmpty()}"
|
||||
th:with="collegesLabel=${site.config['colleges_label'] ?: '专业院系'}">
|
||||
<span class="colleges-toggle">
|
||||
<a href="javascript:void(0)" th:text="${collegesLabel}">专业院系</a>
|
||||
<i class="colleges-arrow">▾</i>
|
||||
</span>
|
||||
<ul class="colleges-menu">
|
||||
<li th:each="col : ${site.colleges}" th:classappend="${col.code == site.code} ? 'active'">
|
||||
<a th:href="${url.siteHome(col.code, col.publicBaseUrl)}"
|
||||
th:title="${col.name}" th:text="${col.name}">学院名称</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="site-nav">
|
||||
<ul>
|
||||
<li th:classappend="${currentCategoryId == null} ? 'active'">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
</li>
|
||||
<li th:each="cat : ${navCategories}"
|
||||
th:classappend="${(currentCategoryId == cat.id ? 'active' : '') + (!cat.children.isEmpty() ? ' has-sub' : '')}">
|
||||
<!-- 外链栏目直接外跳;其余进栏目页(方案 §8.1) -->
|
||||
<a th:if="${cat.type == 3}" th:href="${cat.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${cat.name}">栏目</a>
|
||||
<a th:unless="${cat.type == 3}" th:href="${url.category(cat.id)}" th:text="${cat.name}">栏目</a>
|
||||
<!-- 二级下拉:悬停展开(样式见 assets/css/main.css .sub-nav) -->
|
||||
<ul class="sub-nav" th:if="${!cat.children.isEmpty()}">
|
||||
<li th:each="sub : ${cat.children}">
|
||||
<a th:if="${sub.type == 3}" th:href="${sub.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${sub.name}">子栏目</a>
|
||||
<a th:unless="${sub.type == 3}" th:href="${url.category(sub.id)}" th:text="${sub.name}">子栏目</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</html>
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="home-main">
|
||||
<!-- 首页轮播位(cms_banner position=home;设计尺寸约定 1920×560,见 assets/css 注释) -->
|
||||
<section class="banner" th:if="${!#lists.isEmpty(banners)}">
|
||||
<div class="banner-slides">
|
||||
<a class="banner-slide" th:each="b, stat : ${banners}"
|
||||
th:classappend="${stat.first} ? 'active'"
|
||||
th:href="${b.linkUrl}" th:title="${b.title}">
|
||||
<img th:src="${b.imageUrl}" th:alt="${b.title}">
|
||||
<span class="banner-title" th:text="${b.title}">标题</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="banner-dots" th:if="${#lists.size(banners) > 1}">
|
||||
<button th:each="b, stat : ${banners}" th:classappend="${stat.first} ? 'active'"
|
||||
th:aria-label="${'第' + (stat.count) + '张'}"></button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 置顶/头条区(cms_article topmost 优先) -->
|
||||
<section class="top-strip" th:if="${!#lists.isEmpty(topArticles)}">
|
||||
<h2 class="section-title">头条推荐</h2>
|
||||
<ul>
|
||||
<li th:each="item : ${topArticles}">
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<!-- 一级栏目区块(每栏目 top 8) -->
|
||||
<section class="category-block" th:each="block : ${categoryBlocks}">
|
||||
<div class="block-head">
|
||||
<h2 th:text="${block.category.name}">栏目名</h2>
|
||||
<a class="more" th:href="${block.moreUrl}">更多 ></a>
|
||||
</div>
|
||||
<ul class="block-list" th:if="${!#lists.isEmpty(block.items)}">
|
||||
<li th:each="item : ${block.items}">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="empty" th:if="${#lists.isEmpty(block.items)}">暂无内容</p>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="list-main">
|
||||
<nav class="breadcrumb" th:if="${searchMode != true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
<nav class="breadcrumb" th:if="${searchMode == true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span>搜索结果</span>
|
||||
</nav>
|
||||
|
||||
<h1 class="page-title" th:if="${searchMode != true}" th:text="${category.name}">栏目名</h1>
|
||||
<h1 class="page-title" th:if="${searchMode == true}" th:text="'搜索:' + ${q}">搜索词</h1>
|
||||
|
||||
<ul class="article-list">
|
||||
<li th:each="item : ${listData.items}">
|
||||
<a class="item-title" th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<p class="item-summary" th:if="${!#strings.isEmpty(item.summary)}" th:text="${item.summary}">摘要</p>
|
||||
<div class="item-meta">
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="empty" th:if="${#lists.isEmpty(listData.items)}">暂无内容</p>
|
||||
|
||||
<!-- 分页(列表页/搜索页共用) -->
|
||||
<nav class="pagination" th:if="${listData.totalPages > 1}"
|
||||
th:with="cur=${listData.page}, total=${listData.totalPages}">
|
||||
<a th:if="${cur > 1}"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur - 1)} : ${url.category(listData.categoryId) + '?page=' + (cur - 1)}">上一页</a>
|
||||
<a th:each="p : ${#numbers.sequence(1, total)}"
|
||||
th:classappend="${p == cur} ? 'active'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, p)} : ${url.category(listData.categoryId) + '?page=' + p}"
|
||||
th:text="${p}">1</a>
|
||||
<a th:if="${cur < total}"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur + 1)} : ${url.category(listData.categoryId) + '?page=' + (cur + 1)}">下一页</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main">
|
||||
<nav class="breadcrumb">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${category.name}">栏目名</h1>
|
||||
<!-- 单页栏目内容(type=2,入库前已 jsoup 清洗) -->
|
||||
<div class="article-content" th:utext="${category.content}">单页内容</div>
|
||||
<p class="empty" th:if="${#strings.isEmpty(category.content)}">暂无内容</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"specVersion": 1,
|
||||
"name": "classic-red",
|
||||
"title": "红蓝经典",
|
||||
"version": "1.0.0",
|
||||
"author": "yunhai",
|
||||
"description": "深红横幅头图 + 通栏轮播 + 宋体标题,适合中小学与党政风格的学校(方案 §7)。",
|
||||
"screenshot": "assets/screenshot.png",
|
||||
"bannerSize": "1920x560",
|
||||
"params": [
|
||||
{ "key": "primary", "cssVar": "--primary", "label": "主色", "type": "color", "default": "#b01a2e" },
|
||||
{ "key": "primaryDark", "cssVar": "--primary-dark", "label": "主色加深", "type": "color", "default": "#7f1224" },
|
||||
{ "key": "bg", "cssVar": "--bg", "label": "页面底色", "type": "color", "default": "#f7f5f2" },
|
||||
{ "key": "headerStyle", "label": "头部样式", "type": "select", "default": "banner",
|
||||
"options": [ { "value": "banner", "label": "横幅头图" }, { "value": "plain", "label": "简洁顶栏" } ] }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,936 @@
|
||||
/* ============================================================
|
||||
* default 皮肤包样式(方案 §8.2 · 视觉规范见 docs/design-system.md)
|
||||
* 换肤 = 拷贝 default 目录改 CSS 变量与布局,零后端代码。
|
||||
* 轮播图设计尺寸约定:1920×560(theme.json bannerSize)。
|
||||
* 规则:色值/字号/间距/圆角/阴影一律引用变量,禁止硬编码。
|
||||
* ============================================================ */
|
||||
:root {
|
||||
/* —— 色板(design-system §2)—— */
|
||||
--primary: #1a5cb0;
|
||||
--primary-dark: #12447f;
|
||||
--primary-deep: #0d2f5c;
|
||||
--primary-deeper: #0a2242;
|
||||
--accent: #c9972c;
|
||||
--text: #1f2933;
|
||||
--text-light: #52606d; /* 次要文字(兼容 theme.json 参数名 --text-light) */
|
||||
--text-muted: #5f6b7a; /* 弱化文字:三种底色下对比度≥4.83(原#7b8794仅3.66不达标) */
|
||||
--bg: #f4f6f9;
|
||||
--card-bg: #ffffff;
|
||||
--surface-variant: #eef2f7;
|
||||
--border: #dde3ec;
|
||||
--border-strong: #c3cddb;
|
||||
--white: #ffffff;
|
||||
--scrim: rgba(10, 26, 48, 0.62); /* 轮播标题条渐变深端 */
|
||||
--overlay-dark: rgba(13, 47, 92, 0.55); /* 遮罩层 */
|
||||
--shadow-color: rgba(13, 47, 92, 0.10);
|
||||
--print-ink: #000000;
|
||||
--on-dark: #ffffff;
|
||||
--on-dark-muted: rgba(255, 255, 255, 0.78);
|
||||
--on-dark-faint: rgba(255, 255, 255, 0.55);
|
||||
|
||||
/* —— 字号阶梯(design-system §3)—— */
|
||||
--fs-xs: 12px;
|
||||
--fs-sm: 13px;
|
||||
--fs-base: 14px;
|
||||
--fs-md: 15px;
|
||||
--fs-lg: 17px;
|
||||
--fs-xl: 20px;
|
||||
--fs-2xl: 24px;
|
||||
--fs-3xl: 30px;
|
||||
--fs-brand: 26px;
|
||||
|
||||
/* —— 间距刻度(design-system §4)—— */
|
||||
--sp-1: 4px;
|
||||
--sp-2: 8px;
|
||||
--sp-3: 12px;
|
||||
--sp-4: 16px;
|
||||
--sp-6: 24px;
|
||||
--sp-8: 32px;
|
||||
--sp-12: 48px;
|
||||
--sp-16: 64px;
|
||||
|
||||
/* —— 圆角 / 阴影 / 层级 —— */
|
||||
--r-sm: 4px;
|
||||
--r-md: 8px;
|
||||
--r-lg: 12px;
|
||||
--shadow-sm: 0 1px 2px var(--shadow-color);
|
||||
--shadow-md: 0 4px 16px var(--shadow-color);
|
||||
--z-header: 100;
|
||||
--z-dropdown: 110;
|
||||
|
||||
/* —— 栅格 —— */
|
||||
--max-width: 1200px;
|
||||
--gutter: 24px;
|
||||
}
|
||||
|
||||
/* ===== 基础与重置 ===== */
|
||||
* { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: var(--fs-base);
|
||||
line-height: 1.75;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 { line-height: 1.35; color: var(--text); margin: 0; }
|
||||
p { margin: 0 0 var(--sp-3); }
|
||||
ul, ol { margin: 0; padding: 0; }
|
||||
a { color: inherit; text-decoration: none; transition: color .18s ease; }
|
||||
a:hover { color: var(--primary); }
|
||||
a:focus-visible, button:focus-visible, input:focus-visible {
|
||||
outline: 2px solid var(--primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
img { max-width: 100%; height: auto; }
|
||||
button { font-family: inherit; }
|
||||
time, .item-meta { color: var(--text-muted); font-size: var(--fs-sm); }
|
||||
|
||||
/* 跳过链接(无障碍) */
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: 0;
|
||||
z-index: 200;
|
||||
background: var(--primary);
|
||||
color: var(--on-dark);
|
||||
padding: var(--sp-2) var(--sp-4);
|
||||
border-radius: 0 0 var(--r-sm) 0;
|
||||
}
|
||||
.skip-link:focus { left: 0; color: var(--on-dark); }
|
||||
|
||||
/* ===== 页头 ===== */
|
||||
/* 顶条:日期 + 专业院系(深蓝,真实功能项) */
|
||||
.topbar {
|
||||
background: var(--primary-deeper);
|
||||
color: var(--on-dark-muted);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
.topbar-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: var(--sp-1) var(--gutter);
|
||||
min-height: 38px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-4);
|
||||
}
|
||||
.topbar-date { white-space: nowrap; }
|
||||
.topbar-side { display: flex; align-items: center; gap: var(--sp-4); }
|
||||
|
||||
.site-colleges { position: relative; }
|
||||
.site-colleges .colleges-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-1);
|
||||
padding: 4px 2px;
|
||||
cursor: pointer;
|
||||
color: var(--on-dark-muted);
|
||||
font-size: var(--fs-sm);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-toggle:hover { color: var(--on-dark); }
|
||||
.site-colleges .colleges-arrow {
|
||||
font-style: normal;
|
||||
font-size: 11px;
|
||||
transition: transform .18s ease;
|
||||
}
|
||||
.site-colleges:hover .colleges-arrow { transform: rotate(180deg); }
|
||||
.site-colleges .colleges-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
min-width: 200px;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
padding: var(--sp-1) 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--accent);
|
||||
border-radius: 0 0 var(--r-md) var(--r-md);
|
||||
box-shadow: var(--shadow-md);
|
||||
z-index: var(--z-dropdown);
|
||||
}
|
||||
.site-colleges:hover .colleges-menu, .site-colleges:focus-within .colleges-menu { display: block; }
|
||||
.site-colleges .colleges-menu li a {
|
||||
display: block;
|
||||
padding: var(--sp-2) var(--sp-4);
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
font-size: var(--fs-base);
|
||||
}
|
||||
.site-colleges .colleges-menu li a:hover { background: var(--surface-variant); color: var(--primary); }
|
||||
.site-colleges .colleges-menu li.active a { color: var(--primary); font-weight: 600; }
|
||||
|
||||
/* 品牌行:校徽 + 站名 + 站内搜索 */
|
||||
.site-header { background: var(--card-bg); box-shadow: var(--shadow-sm); }
|
||||
.header-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 20px var(--gutter);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-6);
|
||||
}
|
||||
.site-brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
|
||||
.site-logo { height: 56px; width: auto; flex: none; }
|
||||
.site-name {
|
||||
font-size: var(--fs-brand);
|
||||
font-weight: 700;
|
||||
color: var(--primary-deep);
|
||||
letter-spacing: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.site-search { display: flex; flex: none; }
|
||||
.site-search input {
|
||||
border: 1px solid var(--border-strong);
|
||||
border-right: none;
|
||||
border-radius: var(--r-sm) 0 0 var(--r-sm);
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
width: 260px;
|
||||
font-size: var(--fs-base);
|
||||
color: var(--text);
|
||||
background: var(--card-bg);
|
||||
outline: none;
|
||||
transition: border-color .18s ease, box-shadow .18s ease;
|
||||
}
|
||||
.site-search input::placeholder { color: var(--text-muted); }
|
||||
.site-search input:focus {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 4px var(--shadow-color);
|
||||
}
|
||||
.site-search button {
|
||||
border: none;
|
||||
background: var(--primary);
|
||||
color: var(--on-dark);
|
||||
padding: var(--sp-2) var(--sp-6);
|
||||
font-size: var(--fs-base);
|
||||
border-radius: 0 var(--r-sm) var(--r-sm) 0;
|
||||
cursor: pointer;
|
||||
transition: background .18s ease;
|
||||
}
|
||||
.site-search button:hover { background: var(--primary-dark); }
|
||||
|
||||
/* 主导航(蓝底 + 金色当前项下杠) */
|
||||
.site-nav { background: var(--primary); box-shadow: var(--shadow-sm); }
|
||||
.site-nav ul {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--gutter);
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-nav > ul > li { position: relative; }
|
||||
.site-nav li a {
|
||||
display: block;
|
||||
padding: var(--sp-3) var(--sp-6);
|
||||
color: var(--on-dark);
|
||||
font-size: var(--fs-md);
|
||||
position: relative;
|
||||
transition: background .18s ease;
|
||||
}
|
||||
.site-nav li a::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: var(--sp-6);
|
||||
right: var(--sp-6);
|
||||
bottom: 0;
|
||||
height: 3px;
|
||||
background: var(--accent);
|
||||
border-radius: 2px 2px 0 0;
|
||||
transform: scaleX(0);
|
||||
transition: transform .18s ease;
|
||||
}
|
||||
.site-nav li:hover > a, .site-nav li.active > a { background: var(--primary-dark); }
|
||||
.site-nav li.active > a::after, .site-nav li:hover > a::after { transform: scaleX(1); }
|
||||
|
||||
/* 二级下拉(白底面板) */
|
||||
.site-nav li.has-sub > a .caret {
|
||||
font-style: normal;
|
||||
font-size: 11px;
|
||||
margin-left: var(--sp-1);
|
||||
opacity: .8;
|
||||
}
|
||||
.site-nav ul.sub-nav {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 176px;
|
||||
margin: 0;
|
||||
padding: var(--sp-1) 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--accent);
|
||||
border-radius: 0 0 var(--r-md) var(--r-md);
|
||||
box-shadow: var(--shadow-md);
|
||||
z-index: var(--z-dropdown);
|
||||
}
|
||||
.site-nav li:hover > ul.sub-nav, .site-nav li:focus-within > ul.sub-nav { display: block; }
|
||||
.site-nav .sub-nav li a {
|
||||
padding: var(--sp-2) var(--sp-4);
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
font-size: var(--fs-base);
|
||||
}
|
||||
.site-nav .sub-nav li a::after { display: none; }
|
||||
.site-nav .sub-nav li a:hover { background: var(--surface-variant); color: var(--primary); }
|
||||
.site-nav .sub-nav li.active a { color: var(--primary); font-weight: 600; }
|
||||
|
||||
/* ===== 首页轮播(通栏 1920×560)===== */
|
||||
.banner { position: relative; overflow: hidden; background: var(--primary-deep); }
|
||||
.banner-slides { position: relative; aspect-ratio: 1920 / 560; max-height: 560px; }
|
||||
.banner-slide { display: none; position: absolute; inset: 0; }
|
||||
.banner-slide.active { display: block; }
|
||||
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.banner-title {
|
||||
position: absolute;
|
||||
left: 0; right: 0; bottom: 0;
|
||||
padding: var(--sp-12) var(--gutter) var(--sp-4);
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
color: var(--on-dark);
|
||||
font-size: var(--fs-xl);
|
||||
font-weight: 600;
|
||||
text-shadow: 0 1px 4px var(--scrim);
|
||||
background: linear-gradient(transparent, var(--scrim));
|
||||
}
|
||||
.banner-dots {
|
||||
position: absolute;
|
||||
bottom: var(--sp-4);
|
||||
right: max(var(--gutter), calc((100% - var(--max-width)) / 2 + var(--gutter)));
|
||||
display: flex;
|
||||
gap: var(--sp-2);
|
||||
z-index: 20;
|
||||
}
|
||||
.banner-dots button {
|
||||
width: 10px; height: 10px;
|
||||
padding: 0;
|
||||
border-radius: 999px;
|
||||
border: none;
|
||||
background: var(--on-dark-faint);
|
||||
cursor: pointer;
|
||||
transition: width .25s ease, background .25s ease;
|
||||
}
|
||||
.banner-dots button.active { width: 28px; background: var(--on-dark); }
|
||||
.banner-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 44px; height: 44px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: var(--overlay-dark);
|
||||
color: var(--on-dark);
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
opacity: .55;
|
||||
transition: opacity .2s ease, background .2s ease;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
}
|
||||
.banner-arrow:hover { opacity: 1; background: var(--primary-dark); }
|
||||
.banner-arrow.prev { left: max(var(--gutter), calc((100% - var(--max-width)) / 2)); }
|
||||
.banner-arrow.next { right: max(var(--gutter), calc((100% - var(--max-width)) / 2)); }
|
||||
|
||||
/* ===== 通用容器 ===== */
|
||||
.home-main, .list-main, .detail-main { display: block; }
|
||||
.container {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--gutter);
|
||||
}
|
||||
.section { margin: var(--sp-6) 0; }
|
||||
.empty {
|
||||
color: var(--text-muted);
|
||||
text-align: center;
|
||||
padding: var(--sp-12) var(--sp-4);
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
|
||||
/* 空状态插画(design-system §8:与正常态同等用心) */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: var(--sp-12) var(--sp-4);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.empty-state::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 72px;
|
||||
height: 54px;
|
||||
margin: 0 auto var(--sp-4);
|
||||
border: 2px solid var(--border-strong);
|
||||
border-radius: var(--r-md);
|
||||
background:
|
||||
linear-gradient(var(--surface-variant) 60%, transparent 60%) 12px 10px / 40px 6px no-repeat,
|
||||
linear-gradient(var(--surface-variant) 62%, transparent 62%) 12px 22px / 28px 6px no-repeat,
|
||||
linear-gradient(var(--border) 100%, transparent 100%) 0 38px / 64px 2px no-repeat;
|
||||
}
|
||||
.empty-state .empty-hint { font-size: var(--fs-sm); margin-top: var(--sp-1); }
|
||||
|
||||
/* ===== 首页:头条区 ===== */
|
||||
.headline-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: var(--sp-6);
|
||||
align-items: stretch;
|
||||
}
|
||||
.headline-card, .focus-card, .category-block {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--r-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
padding: var(--sp-6);
|
||||
}
|
||||
/* 图片新闻卡内容纵向撑满:小图行贴底,与左卡等高时无底部空洞 */
|
||||
.focus-card { display: flex; flex-direction: column; }
|
||||
.focus-card .focus-rows { margin-top: auto; padding-top: var(--sp-3); }
|
||||
.block-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-4);
|
||||
margin-bottom: var(--sp-4);
|
||||
padding-bottom: var(--sp-3);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.block-head h2, .section-title {
|
||||
font-size: var(--fs-xl);
|
||||
color: var(--text);
|
||||
position: relative;
|
||||
padding-left: var(--sp-3);
|
||||
}
|
||||
.block-head h2::before, .section-title::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 6px;
|
||||
bottom: 6px;
|
||||
width: 4px;
|
||||
border-radius: 2px;
|
||||
background: linear-gradient(var(--primary), var(--primary-dark));
|
||||
}
|
||||
.more { font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
|
||||
.more:hover { color: var(--primary); }
|
||||
|
||||
/* 头条列表 */
|
||||
.headline-list { list-style: none; }
|
||||
.headline-lead { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
|
||||
.headline-lead .lead-title {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
font-size: var(--fs-2xl);
|
||||
font-weight: 700;
|
||||
line-height: 1.4;
|
||||
color: var(--primary-deep);
|
||||
margin-bottom: var(--sp-2);
|
||||
}
|
||||
.headline-lead .lead-title:hover { color: var(--primary); }
|
||||
.headline-lead .lead-meta { display: flex; gap: var(--sp-3); align-items: center; }
|
||||
.headline-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-3);
|
||||
padding: var(--sp-3) var(--sp-2);
|
||||
margin: 0 calc(-1 * var(--sp-2));
|
||||
border-bottom: 1px solid var(--border);
|
||||
border-radius: var(--r-sm);
|
||||
transition: background .15s ease;
|
||||
}
|
||||
.headline-list li:last-child { border-bottom: none; }
|
||||
.headline-list li:hover { background: var(--surface-variant); }
|
||||
.headline-list li a {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
.top-badge {
|
||||
flex: none;
|
||||
color: var(--on-dark);
|
||||
background: var(--accent);
|
||||
font-size: var(--fs-xs);
|
||||
line-height: 1;
|
||||
padding: 3px var(--sp-2);
|
||||
border-radius: var(--r-sm);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 图片新闻卡(右侧) */
|
||||
.focus-card .focus-item { display: block; }
|
||||
.focus-card .focus-cover {
|
||||
display: block;
|
||||
border-radius: var(--r-md);
|
||||
overflow: hidden;
|
||||
aspect-ratio: 16 / 9;
|
||||
margin-bottom: var(--sp-3);
|
||||
background: var(--surface-variant);
|
||||
}
|
||||
.focus-card .focus-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.focus-card .focus-title {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
line-height: 1.5;
|
||||
}
|
||||
.focus-card .focus-item:hover .focus-title { color: var(--primary); }
|
||||
.focus-rows { list-style: none; margin-top: var(--sp-4); border-top: 1px solid var(--border); }
|
||||
.focus-rows li { border-bottom: 1px solid var(--border); }
|
||||
.focus-rows li:last-child { border-bottom: none; }
|
||||
.focus-rows a { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; }
|
||||
.focus-rows .row-cover {
|
||||
flex: none;
|
||||
display: block;
|
||||
width: 96px;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: var(--r-sm);
|
||||
overflow: hidden;
|
||||
background: var(--surface-variant);
|
||||
}
|
||||
.focus-rows .row-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.focus-rows .row-title {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: var(--fs-base);
|
||||
line-height: 1.6;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.focus-rows a:hover .row-title { color: var(--primary); }
|
||||
|
||||
/* ===== 首页:栏目区块 ===== */
|
||||
.blocks-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--sp-6);
|
||||
}
|
||||
.block-list { list-style: none; }
|
||||
.block-featured { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
|
||||
.block-featured > a { display: flex; gap: var(--sp-4); align-items: flex-start; }
|
||||
.block-featured .feat-cover {
|
||||
flex: none;
|
||||
display: block;
|
||||
width: 168px;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: var(--r-sm);
|
||||
overflow: hidden;
|
||||
background: var(--surface-variant);
|
||||
}
|
||||
.block-featured .feat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.block-featured .feat-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
|
||||
.block-featured .feat-title {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
line-height: 1.5;
|
||||
}
|
||||
.block-featured .feat-summary {
|
||||
color: var(--text-light);
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.6;
|
||||
margin-top: var(--sp-2);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.block-featured .feat-meta { margin-top: auto; padding-top: var(--sp-2); }
|
||||
.block-featured a:hover .feat-title { color: var(--primary); }
|
||||
.block-list li.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-3);
|
||||
padding: var(--sp-3) var(--sp-2);
|
||||
margin: 0 calc(-1 * var(--sp-2));
|
||||
border-bottom: 1px solid var(--border);
|
||||
border-radius: var(--r-sm);
|
||||
transition: background .15s ease;
|
||||
}
|
||||
.block-list li.item:last-child { border-bottom: none; }
|
||||
.block-list li.item:hover { background: var(--surface-variant); }
|
||||
.block-list li.item a {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
padding-left: var(--sp-3);
|
||||
}
|
||||
.block-list li.item a::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
margin-top: -2.5px;
|
||||
border-radius: 50%;
|
||||
background: var(--border-strong);
|
||||
transition: background .15s ease;
|
||||
}
|
||||
.block-list li.item:hover a::before { background: var(--primary); }
|
||||
|
||||
/* ===== 列表页 ===== */
|
||||
.list-main { margin: var(--sp-6) auto; }
|
||||
.page-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--r-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
padding: var(--sp-8) var(--sp-6);
|
||||
}
|
||||
.breadcrumb {
|
||||
color: var(--text-muted);
|
||||
font-size: var(--fs-sm);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--sp-2);
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
.breadcrumb a { color: var(--text-muted); }
|
||||
.breadcrumb a:hover { color: var(--primary); }
|
||||
.breadcrumb .crumb-sep { color: var(--border-strong); }
|
||||
.breadcrumb .current { color: var(--text-light); font-weight: 500; }
|
||||
.page-title {
|
||||
font-size: var(--fs-2xl);
|
||||
color: var(--text);
|
||||
position: relative;
|
||||
padding-left: var(--sp-3);
|
||||
margin: 0 0 var(--sp-6);
|
||||
}
|
||||
.page-title::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 8px;
|
||||
bottom: 8px;
|
||||
width: 4px;
|
||||
border-radius: 2px;
|
||||
background: linear-gradient(var(--primary), var(--primary-dark));
|
||||
}
|
||||
|
||||
.article-list { list-style: none; }
|
||||
.article-list > li {
|
||||
padding: var(--sp-4) 0;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.article-list > li:last-child { border-bottom: none; }
|
||||
.article-item { display: flex; gap: var(--sp-4); align-items: flex-start; }
|
||||
.article-item .item-cover {
|
||||
flex: none;
|
||||
width: 168px;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: var(--r-sm);
|
||||
overflow: hidden;
|
||||
background: var(--surface-variant);
|
||||
}
|
||||
.article-item .item-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.article-item .item-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: var(--sp-1); }
|
||||
.article-item.plain { padding: var(--sp-1) 0; align-items: baseline; }
|
||||
.article-item.plain .item-title { font-size: var(--fs-lg); }
|
||||
.item-title { font-size: var(--fs-lg); font-weight: 500; line-height: 1.5; }
|
||||
.item-title a:hover { color: var(--primary); }
|
||||
.item-summary {
|
||||
color: var(--text-light);
|
||||
font-size: var(--fs-base);
|
||||
line-height: 1.65;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.item-meta { display: flex; gap: var(--sp-3); align-items: center; margin-top: var(--sp-1); }
|
||||
.article-item .item-meta { margin-top: auto; }
|
||||
|
||||
/* ===== 分页 ===== */
|
||||
.pagination { display: flex; gap: var(--sp-2); justify-content: center; align-items: center; padding: var(--sp-8) 0 var(--sp-2); flex-wrap: wrap; }
|
||||
.pagination a {
|
||||
min-width: 36px;
|
||||
text-align: center;
|
||||
padding: var(--sp-1) var(--sp-3);
|
||||
border: 1px solid var(--border);
|
||||
background: var(--card-bg);
|
||||
border-radius: var(--r-sm);
|
||||
font-size: var(--fs-base);
|
||||
color: var(--text-light);
|
||||
transition: border-color .15s ease, color .15s ease, background .15s ease;
|
||||
}
|
||||
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-variant); }
|
||||
.pagination a.active { background: var(--primary); color: var(--on-dark); border-color: var(--primary); font-weight: 600; }
|
||||
.pagination a.disabled { opacity: .4; pointer-events: none; }
|
||||
|
||||
/* ===== 详情 / 单页 ===== */
|
||||
.detail-main { margin: var(--sp-6) auto; }
|
||||
.article-title {
|
||||
margin: var(--sp-2) 0 var(--sp-4);
|
||||
font-size: var(--fs-3xl);
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.article-meta {
|
||||
display: flex;
|
||||
gap: var(--sp-4);
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
color: var(--text-muted);
|
||||
font-size: var(--fs-sm);
|
||||
padding: var(--sp-2) 0 var(--sp-4);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.article-content {
|
||||
line-height: 1.9;
|
||||
font-size: 16px;
|
||||
color: var(--text);
|
||||
padding-top: var(--sp-6);
|
||||
word-break: break-word;
|
||||
}
|
||||
.article-content p { text-indent: 2em; margin: 0 0 var(--sp-3); }
|
||||
.article-content p:has(img), .article-content figure p { text-indent: 0; text-align: center; }
|
||||
.article-content p > img:only-child { display: inline-block; }
|
||||
.article-content img { height: auto; border-radius: var(--r-sm); }
|
||||
.article-content figure { margin: var(--sp-4) auto; text-align: center; text-indent: 0; }
|
||||
.article-content figcaption { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--sp-2); }
|
||||
.article-content h2, .article-content h3 { margin: var(--sp-6) 0 var(--sp-3); }
|
||||
.article-content h2 { font-size: var(--fs-xl); }
|
||||
.article-content h3 { font-size: var(--fs-lg); }
|
||||
.article-content ul, .article-content ol { margin: 0 0 var(--sp-3) 2em; text-indent: 0; }
|
||||
.article-content li { margin-bottom: var(--sp-1); }
|
||||
.article-content blockquote {
|
||||
margin: var(--sp-4) 0;
|
||||
padding: var(--sp-3) var(--sp-4);
|
||||
border-left: 4px solid var(--accent);
|
||||
background: var(--surface-variant);
|
||||
border-radius: 0 var(--r-sm) var(--r-sm) 0;
|
||||
color: var(--text-light);
|
||||
text-indent: 0;
|
||||
}
|
||||
.article-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: var(--sp-4) 0;
|
||||
font-size: var(--fs-base);
|
||||
}
|
||||
.article-content table td, .article-content table th {
|
||||
border: 1px solid var(--border-strong);
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
}
|
||||
.article-content table th { background: var(--surface-variant); font-weight: 600; }
|
||||
.article-content table tbody tr:nth-child(even) { background: var(--surface-variant); }
|
||||
.article-content table tbody tr:hover { background: var(--border); }
|
||||
|
||||
/* 上下篇 */
|
||||
.article-sibling {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--sp-4);
|
||||
margin-top: var(--sp-8);
|
||||
padding-top: var(--sp-6);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.article-sibling a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-1);
|
||||
padding: var(--sp-3) var(--sp-4);
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--r-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
|
||||
}
|
||||
.article-sibling a:hover {
|
||||
border-color: var(--primary);
|
||||
box-shadow: var(--shadow-md);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.article-sibling a.next { text-align: right; }
|
||||
.article-sibling .sib-label { font-size: var(--fs-sm); color: var(--text-muted); }
|
||||
.article-sibling .sib-title {
|
||||
font-size: var(--fs-base);
|
||||
color: var(--text);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.article-sibling a:hover .sib-title { color: var(--primary); }
|
||||
.article-sibling .sib-none {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-1);
|
||||
padding: var(--sp-3) var(--sp-4);
|
||||
background: var(--surface-variant);
|
||||
border: 1px dashed var(--border-strong);
|
||||
border-radius: var(--r-md);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.article-sibling .sib-none.next { text-align: right; }
|
||||
|
||||
/* ===== 页脚 ===== */
|
||||
/* 友链区(浅底) */
|
||||
.footer-links { background: var(--surface-variant); border-top: 1px solid var(--border); }
|
||||
.footer-links-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: var(--sp-4) var(--gutter);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-2);
|
||||
}
|
||||
.links-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--sp-2) var(--sp-4);
|
||||
align-items: baseline;
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
.links-group .group-name {
|
||||
font-weight: 600;
|
||||
color: var(--primary-deep);
|
||||
margin-right: var(--sp-2);
|
||||
position: relative;
|
||||
padding-left: var(--sp-3);
|
||||
}
|
||||
.links-group .group-name::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
margin-top: -2px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
}
|
||||
.links-group a { color: var(--text-light); }
|
||||
.links-group a:hover { color: var(--primary); }
|
||||
|
||||
/* 页脚主区(深蓝) */
|
||||
.site-footer { margin-top: var(--sp-8); background: var(--primary-deep); color: var(--on-dark-muted); }
|
||||
.footer-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: var(--sp-8) var(--gutter) var(--sp-6);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--sp-8);
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.footer-brand { display: flex; align-items: center; gap: var(--sp-3); }
|
||||
.footer-brand .footer-logo { height: 48px; width: auto; }
|
||||
.footer-brand .footer-site { font-size: var(--fs-xl); font-weight: 600; color: var(--on-dark); letter-spacing: 1px; }
|
||||
.footer-info {
|
||||
text-align: right;
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 2;
|
||||
margin: 0;
|
||||
}
|
||||
.footer-info p { margin: 0; }
|
||||
.footer-info a { color: var(--on-dark-muted); }
|
||||
.footer-info a:hover { color: var(--on-dark); }
|
||||
|
||||
/* 页脚底条 */
|
||||
.footer-bottom {
|
||||
background: var(--primary-deeper);
|
||||
border-top: 1px solid var(--on-dark-faint);
|
||||
}
|
||||
.footer-bottom-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: var(--sp-3) var(--gutter);
|
||||
text-align: center;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--on-dark-faint);
|
||||
}
|
||||
.footer-bottom-inner p { margin: var(--sp-1) 0; }
|
||||
.footer-bottom-inner a { color: var(--on-dark-muted); }
|
||||
.footer-bottom-inner a:hover { color: var(--on-dark); }
|
||||
|
||||
/* ===== 移动端适配 ===== */
|
||||
@media (max-width: 1024px) {
|
||||
.headline-grid { grid-template-columns: 1fr; }
|
||||
.blocks-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
:root { --gutter: 16px; }
|
||||
.topbar-inner { justify-content: center; }
|
||||
.topbar-side { display: none; }
|
||||
.header-inner { flex-direction: column; align-items: stretch; gap: var(--sp-3); padding: var(--sp-3) var(--gutter); }
|
||||
.site-logo { height: 44px; }
|
||||
.site-name { font-size: var(--fs-xl); }
|
||||
.site-search { width: 100%; }
|
||||
.site-search input { flex: 1; width: auto; }
|
||||
.site-nav ul { overflow-x: auto; flex-wrap: nowrap; }
|
||||
.site-nav li a { padding: var(--sp-3) var(--sp-4); white-space: nowrap; }
|
||||
.banner-slides { aspect-ratio: 4 / 3; max-height: none; }
|
||||
.banner-title { font-size: var(--fs-md); padding: var(--sp-8) var(--sp-4) var(--sp-3); }
|
||||
.banner-arrow { display: none; }
|
||||
.page-card, .headline-card, .focus-card, .category-block { padding: var(--sp-4) var(--sp-3); }
|
||||
.article-item { flex-direction: column; }
|
||||
.article-item .item-cover { width: 100%; }
|
||||
.article-sibling { grid-template-columns: 1fr; }
|
||||
.footer-main { flex-direction: column; gap: var(--sp-4); }
|
||||
.footer-info { text-align: left; }
|
||||
.article-title { font-size: var(--fs-2xl); }
|
||||
/* 触屏无 hover:子菜单静态平铺,不做浮层 */
|
||||
.site-nav ul.sub-nav {
|
||||
display: block;
|
||||
position: static;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: var(--primary-dark);
|
||||
border-radius: 0;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.site-nav .sub-nav li a { color: var(--on-dark-muted); padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-8); }
|
||||
.site-nav .sub-nav li a:hover { background: var(--primary-deep); color: var(--on-dark); }
|
||||
}
|
||||
|
||||
/* ===== 打印样式(公告高频打印场景)===== */
|
||||
@media print {
|
||||
.site-header, .topbar, .site-nav, .banner, .footer-links, .site-footer,
|
||||
.article-sibling, .pagination, .skip-link, .site-search, .site-colleges { display: none !important; }
|
||||
body { background: var(--white); color: var(--print-ink); font-size: 12pt; }
|
||||
.page-card, .detail-main .page-card { border: none; box-shadow: none; padding: 0; margin: 0; max-width: 100%; }
|
||||
.article-title { font-size: 20pt; }
|
||||
.article-content { font-size: 11.5pt; line-height: 1.8; }
|
||||
.article-content p { text-indent: 2em; }
|
||||
.article-content table th { background: var(--surface-variant) !important; }
|
||||
a { color: inherit; }
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||
<defs><linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#4379be"/><stop offset="1" stop-color="#12407b"/>
|
||||
</linearGradient></defs>
|
||||
<rect width="64" height="64" fill="url(#bg)"/>
|
||||
<circle cx="32" cy="25" r="10" fill="#ffffff"/>
|
||||
<path d="M 16 49.3 Q 32 30.7 48 49.3 Z" fill="#ffffff" opacity="0.92"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 434 B |
@@ -0,0 +1,87 @@
|
||||
/* default 皮肤包脚本:顶条日期 + 首页轮播(自动播放/圆点/箭头/悬停暂停/键盘),无任何外部依赖 */
|
||||
(function () {
|
||||
/* 顶条日期(本地时间,YYYY年M月D日 星期X) */
|
||||
var dateEl = document.getElementById('siteDate');
|
||||
if (dateEl) {
|
||||
var now = new Date();
|
||||
var week = ['日', '一', '二', '三', '四', '五', '六'][now.getDay()];
|
||||
dateEl.textContent = now.getFullYear() + '年' + (now.getMonth() + 1) + '月'
|
||||
+ now.getDate() + '日 星期' + week;
|
||||
}
|
||||
|
||||
/* 轮播 */
|
||||
var root = document.querySelector('.banner');
|
||||
var slides = document.querySelectorAll('.banner-slide');
|
||||
var dots = document.querySelectorAll('.banner-dots button');
|
||||
var prevBtn = document.querySelector('.banner-arrow.prev');
|
||||
var nextBtn = document.querySelector('.banner-arrow.next');
|
||||
if (!slides.length || !root) {
|
||||
return;
|
||||
}
|
||||
var current = 0;
|
||||
var timer = null;
|
||||
var INTERVAL = 5000;
|
||||
|
||||
function show(index) {
|
||||
slides[current].classList.remove('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.remove('active');
|
||||
}
|
||||
current = (index + slides.length) % slides.length;
|
||||
slides[current].classList.add('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
stop();
|
||||
if (slides.length > 1) {
|
||||
timer = window.setInterval(function () {
|
||||
show(current + 1);
|
||||
}, INTERVAL);
|
||||
}
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (timer) {
|
||||
window.clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
dots.forEach(function (dot, index) {
|
||||
dot.addEventListener('click', function () {
|
||||
show(index);
|
||||
start();
|
||||
});
|
||||
});
|
||||
if (prevBtn) {
|
||||
prevBtn.addEventListener('click', function () {
|
||||
show(current - 1);
|
||||
start();
|
||||
});
|
||||
}
|
||||
if (nextBtn) {
|
||||
nextBtn.addEventListener('click', function () {
|
||||
show(current + 1);
|
||||
start();
|
||||
});
|
||||
}
|
||||
root.addEventListener('mouseenter', stop);
|
||||
root.addEventListener('mouseleave', start);
|
||||
root.addEventListener('focusin', stop);
|
||||
root.addEventListener('focusout', start);
|
||||
root.setAttribute('tabindex', '-1');
|
||||
root.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'ArrowLeft') {
|
||||
show(current - 1);
|
||||
start();
|
||||
} else if (e.key === 'ArrowRight') {
|
||||
show(current + 1);
|
||||
start();
|
||||
}
|
||||
});
|
||||
|
||||
start();
|
||||
})();
|
||||
|
After Width: | Height: | Size: 118 KiB |
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main container" id="main-content">
|
||||
<div class="page-card">
|
||||
<nav class="breadcrumb" aria-label="面包屑">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="crumb-sep" aria-hidden="true">/</span>
|
||||
<a th:if="${currentCategoryId != null}" th:href="${url.category(currentCategoryId)}"
|
||||
th:text="${currentCategoryName}">栏目</a>
|
||||
<span class="crumb-sep" th:if="${currentCategoryId != null}" aria-hidden="true">/</span>
|
||||
<span class="current">正文</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${article.title}">文章标题</h1>
|
||||
<div class="article-meta">
|
||||
<time th:if="${article.publishTime != null}"
|
||||
th:text="${'发布时间:' + #temporals.format(article.publishTime, 'yyyy-MM-dd HH:mm')}">2026-01-01 10:00</time>
|
||||
<span th:if="${!#strings.isEmpty(article.authorName)}"
|
||||
th:text="'作者:' + ${article.authorName}">作者</span>
|
||||
<span th:if="${!#strings.isEmpty(article.source)}"
|
||||
th:text="'来源:' + ${article.source}">来源</span>
|
||||
<span th:text="'浏览量:' + ${article.viewCount}">浏览量</span>
|
||||
</div>
|
||||
<!-- 正文:入库前已经 jsoup 白名单清洗(方案 §8.5),此处允许 utext;
|
||||
其余字段一律 th:text 转义输出 -->
|
||||
<div class="article-content" th:utext="${article.content}">正文</div>
|
||||
</article>
|
||||
|
||||
<nav class="article-sibling" aria-label="上下篇导航">
|
||||
<a th:if="${prevArticle != null}" class="prev"
|
||||
th:href="${url.article(prevArticle.id)}">
|
||||
<span class="sib-label">上一篇</span>
|
||||
<span class="sib-title" th:text="${prevArticle.title}">上一篇标题</span>
|
||||
</a>
|
||||
<span class="sib-none prev" th:if="${prevArticle == null}">
|
||||
<span class="sib-label">上一篇</span>
|
||||
<span class="sib-title">已经是最早一篇</span>
|
||||
</span>
|
||||
<a th:if="${nextArticle != null}" class="next"
|
||||
th:href="${url.article(nextArticle.id)}">
|
||||
<span class="sib-label">下一篇</span>
|
||||
<span class="sib-title" th:text="${nextArticle.title}">下一篇标题</span>
|
||||
</a>
|
||||
<span class="sib-none next" th:if="${nextArticle == null}">
|
||||
<span class="sib-label">下一篇</span>
|
||||
<span class="sib-title">已是最新一篇</span>
|
||||
</span>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共页脚:友链区(浅底,分组渲染,方案 §8.1 友链不设独立路由)+ 深蓝主区 + 底条(视觉规范 docs/design-system.md) -->
|
||||
<footer class="site-footer" th:fragment="footer">
|
||||
<!-- 友情链接(无分组的站整段不渲染;分组无链接时防御性跳过——数据上分组由链接行物化,不可达) -->
|
||||
<div class="footer-links" th:if="${!#lists.isEmpty(site.linkGroups)}">
|
||||
<div class="footer-links-inner">
|
||||
<div class="links-group" th:each="group : ${site.linkGroups}"
|
||||
th:if="${!#lists.isEmpty(group.links)}">
|
||||
<span class="group-name" th:text="${group.groupName}">分组</span>
|
||||
<a th:each="link : ${group.links}" th:href="${link.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${link.name}">链接</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 主区:校徽 + 站名 | 联系/版权/备案(config_json: contact/copyright/beian) -->
|
||||
<div class="footer-main">
|
||||
<div class="footer-brand">
|
||||
<img th:if="${site.config['logo'] != null}" class="footer-logo"
|
||||
th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
<span class="footer-site" th:text="${site.name}">站点名称</span>
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<p th:if="${site.config['contact'] != null}" th:text="${site.config['contact']}">联系方式</p>
|
||||
<p th:if="${site.config['copyright'] != null}" th:text="${site.config['copyright']}">版权信息</p>
|
||||
<p th:if="${site.config['beian'] != null}" th:text="${site.config['beian']}">备案号</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底条:全站无任何配置信息时仍保留结构完整(空块由 CSS 收敛) -->
|
||||
<div class="footer-bottom">
|
||||
<div class="footer-bottom-inner">
|
||||
<p th:if="${site.schName != null and !#strings.isEmpty(site.schName)}"
|
||||
th:text="${site.schName}">学校名称</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<!-- 公共 head 片段:SEO(title/description/canonical)+ 主题资产(方案 §8.3/§8.6) -->
|
||||
<head th:fragment="head">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title th:text="${pageTitle}">页面标题</title>
|
||||
<meta name="description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}"
|
||||
th:content="${seoDescription}">
|
||||
<link rel="canonical" th:if="${canonical != null}" th:href="${canonical}">
|
||||
<!-- og 标签基本三件(C-7,方案 §8.6 canonical/og 同基准) -->
|
||||
<meta property="og:title" th:if="${pageTitle != null}" th:content="${pageTitle}">
|
||||
<meta property="og:description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}" th:content="${seoDescription}">
|
||||
<meta property="og:image" th:if="${ogImage != null}" th:content="${ogImage}">
|
||||
<link rel="stylesheet" th:href="${url.asset('css/main.css')}">
|
||||
<!-- 微调参数 CSS 变量覆盖(方案 §5.3):位于皮肤 CSS 之后层叠覆盖;值由服务端预构建并校验 -->
|
||||
<style th:if="${not #strings.isEmpty(themeVarsCss)}" th:utext="${themeVarsCss}"></style>
|
||||
<!-- favicon:管理端配置了 favicon 键用上传图,未配置输出主题内置兜底 icon(assets/favicon.png) -->
|
||||
<link rel="icon" type="image/png"
|
||||
th:href="${site.config['favicon'] != null ? url.upload(site.config['favicon']) : url.asset('favicon.png')}">
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共头部:顶条(日期+专业院系) + 品牌行(校徽/站名/搜索) + 栏目导航(视觉规范 docs/design-system.md) -->
|
||||
<header class="site-header" th:fragment="header">
|
||||
<a class="skip-link" href="#main-content">跳到主要内容</a>
|
||||
|
||||
<!-- 顶条:左侧今日日期(main.js 填充);右侧院系子站切换(《院系子站方案》):顶层站取其子站、
|
||||
院系子站取兄弟站(含自身);无子站整块不渲染;文案经 config_json.colleges_label 覆盖 -->
|
||||
<div class="topbar">
|
||||
<div class="topbar-inner">
|
||||
<span class="topbar-date" id="siteDate" th:aria-label="'今日日期'">加载日期…</span>
|
||||
<div class="topbar-side" th:if="${!site.colleges.isEmpty()}"
|
||||
th:with="collegesLabel=${site.config['colleges_label'] ?: '专业院系'}">
|
||||
<div class="site-colleges">
|
||||
<span class="colleges-toggle">
|
||||
<a href="javascript:void(0)" th:text="${collegesLabel}">专业院系</a>
|
||||
<i class="colleges-arrow" aria-hidden="true">▾</i>
|
||||
</span>
|
||||
<ul class="colleges-menu">
|
||||
<li th:each="col : ${site.colleges}" th:classappend="${col.code == site.code} ? 'active'">
|
||||
<a th:href="${url.siteHome(col.code, col.publicBaseUrl)}"
|
||||
th:title="${col.name}" th:text="${col.name}">学院名称</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 品牌行 -->
|
||||
<div class="header-inner">
|
||||
<div class="site-brand">
|
||||
<img th:if="${site.config['logo'] != null}" class="site-logo"
|
||||
th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
<a class="site-name" th:href="${url.home()}" th:text="${site.name}">站点名称</a>
|
||||
</div>
|
||||
<form class="site-search" th:action="${url.search('', null)}" method="get" role="search">
|
||||
<input type="text" name="q" placeholder="站内搜索" aria-label="站内搜索">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 栏目导航:外链栏目直接外跳;其余进栏目页(方案 §8.1) -->
|
||||
<nav class="site-nav" aria-label="栏目导航">
|
||||
<ul>
|
||||
<li th:classappend="${currentCategoryId == null} ? 'active'">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
</li>
|
||||
<li th:each="cat : ${navCategories}"
|
||||
th:classappend="${(currentCategoryId == cat.id ? 'active' : '') + (!cat.children.isEmpty() ? ' has-sub' : '')}">
|
||||
<a th:if="${cat.type == 3}" th:href="${cat.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${cat.name}">栏目</a>
|
||||
<a th:unless="${cat.type == 3}" th:href="${url.category(cat.id)}"><span th:text="${cat.name}">栏目</span><i th:if="${!cat.children.isEmpty()}" class="caret" aria-hidden="true">▾</i></a>
|
||||
<!-- 二级下拉:悬停展开(.sub-nav 样式见 assets/css/main.css) -->
|
||||
<ul class="sub-nav" th:if="${!cat.children.isEmpty()}">
|
||||
<li th:each="sub : ${cat.children}">
|
||||
<a th:if="${sub.type == 3}" th:href="${sub.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${sub.name}">子栏目</a>
|
||||
<a th:unless="${sub.type == 3}" th:href="${url.category(sub.id)}" th:text="${sub.name}">子栏目</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</html>
|
||||
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="home-main" id="main-content">
|
||||
<!-- 首页轮播位(cms_banner position=home;设计尺寸 1920×560,见 theme.json bannerSize) -->
|
||||
<section class="banner" th:if="${!#lists.isEmpty(banners)}" aria-label="焦点图片">
|
||||
<div class="banner-slides">
|
||||
<a class="banner-slide" th:each="b, stat : ${banners}"
|
||||
th:classappend="${stat.first} ? 'active'"
|
||||
th:href="${b.linkUrl}" th:title="${b.title}">
|
||||
<img th:src="${b.imageUrl}" th:alt="${b.title}">
|
||||
<span class="banner-title" th:text="${b.title}">标题</span>
|
||||
</a>
|
||||
</div>
|
||||
<button class="banner-arrow prev" type="button" aria-label="上一张" th:if="${#lists.size(banners) > 1}">‹</button>
|
||||
<button class="banner-arrow next" type="button" aria-label="下一张" th:if="${#lists.size(banners) > 1}">›</button>
|
||||
<div class="banner-dots" th:if="${#lists.size(banners) > 1}">
|
||||
<button th:each="b, stat : ${banners}" th:classappend="${stat.first} ? 'active'"
|
||||
th:aria-label="${'第' + (stat.count) + '张'}"></button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 头条区:头条推荐(置顶优先) + 图片新闻(有封面文章) -->
|
||||
<section class="section container" aria-label="头条与图片新闻">
|
||||
<div class="headline-grid">
|
||||
<div class="headline-card" th:if="${!#lists.isEmpty(topArticles)}">
|
||||
<div class="block-head">
|
||||
<h2>头条推荐</h2>
|
||||
</div>
|
||||
<ul class="headline-list">
|
||||
<li class="headline-lead" th:with="lead=${topArticles[0]}">
|
||||
<a class="lead-title" th:href="${url.article(lead.id)}" th:text="${lead.title}">头条标题</a>
|
||||
<div class="lead-meta">
|
||||
<span class="top-badge" th:if="${lead.topmost == 1}">置顶</span>
|
||||
<time th:if="${lead.publishTime != null}"
|
||||
th:text="${#temporals.format(lead.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</div>
|
||||
</li>
|
||||
<li th:each="item, stat : ${topArticles}" th:if="${stat.index > 0}">
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="focus-card" th:if="${!#lists.isEmpty(focusArticles)}">
|
||||
<div class="block-head">
|
||||
<h2>图片新闻</h2>
|
||||
</div>
|
||||
<a class="focus-item" th:with="cover=${focusArticles[0]}"
|
||||
th:href="${url.article(cover.id)}">
|
||||
<span class="focus-cover">
|
||||
<img th:src="${url.upload(cover.coverImage)}" th:alt="${cover.title}">
|
||||
</span>
|
||||
<span class="focus-title" th:text="${cover.title}">图片新闻标题</span>
|
||||
</a>
|
||||
<ul class="focus-rows">
|
||||
<li th:each="row, stat : ${focusArticles}" th:if="${stat.index > 0}">
|
||||
<a th:href="${url.article(row.id)}">
|
||||
<span class="row-cover"><img th:src="${url.upload(row.coverImage)}" th:alt="${row.title}"></span>
|
||||
<span class="row-title" th:text="${row.title}">图片新闻标题</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 一级栏目区块(聚合列表型子孙栏目 top 8,D1-2) -->
|
||||
<section class="section container" aria-label="栏目区块">
|
||||
<div class="blocks-grid">
|
||||
<div class="category-block" th:each="block : ${categoryBlocks}">
|
||||
<div class="block-head">
|
||||
<h2 th:text="${block.category.name}">栏目名</h2>
|
||||
<a class="more" th:href="${block.moreUrl}">更多 ></a>
|
||||
</div>
|
||||
<ul class="block-list" th:if="${!#lists.isEmpty(block.items)}">
|
||||
<!-- 区块头条:有封面则图文,无封面则带摘要纯文 -->
|
||||
<li class="block-featured" th:with="feat=${block.items[0]}">
|
||||
<a th:href="${url.article(feat.id)}">
|
||||
<span class="feat-cover" th:if="${feat.coverImage != null}">
|
||||
<img th:src="${url.upload(feat.coverImage)}" th:alt="${feat.title}">
|
||||
</span>
|
||||
<span class="feat-body">
|
||||
<span class="feat-title" th:text="${feat.title}">头条标题</span>
|
||||
<span class="feat-summary" th:if="${!#strings.isEmpty(feat.summary)}"
|
||||
th:text="${feat.summary}">摘要</span>
|
||||
<span class="feat-meta item-meta">
|
||||
<span class="top-badge" th:if="${feat.topmost == 1}">置顶</span>
|
||||
<time th:if="${feat.publishTime != null}"
|
||||
th:text="${#temporals.format(feat.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="item" th:each="item, stat : ${block.items}" th:if="${stat.index > 0}">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="empty-state" th:if="${#lists.isEmpty(block.items)}">
|
||||
<p>栏目暂无内容</p>
|
||||
<p class="empty-hint">内容发布后将在此展示</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="list-main container" id="main-content">
|
||||
<div class="page-card">
|
||||
<nav class="breadcrumb" aria-label="面包屑" th:if="${searchMode != true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="crumb-sep" aria-hidden="true">/</span>
|
||||
<span class="current" th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
<nav class="breadcrumb" aria-label="面包屑" th:if="${searchMode == true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="crumb-sep" aria-hidden="true">/</span>
|
||||
<span class="current">搜索结果</span>
|
||||
</nav>
|
||||
|
||||
<h1 class="page-title" th:if="${searchMode != true}" th:text="${category.name}">栏目名</h1>
|
||||
<h1 class="page-title" th:if="${searchMode == true}" th:text="'搜索:' + ${q}">搜索词</h1>
|
||||
|
||||
<ul class="article-list">
|
||||
<!-- 有封面:图文行;无封面:文字行(与图文行同等用心,不造占位图) -->
|
||||
<li th:each="item : ${listData.items}">
|
||||
<div class="article-item" th:if="${item.coverImage != null}">
|
||||
<a class="item-cover" th:href="${url.article(item.id)}">
|
||||
<img th:src="${url.upload(item.coverImage)}" th:alt="${item.title}">
|
||||
</a>
|
||||
<div class="item-body">
|
||||
<div class="item-title">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
</div>
|
||||
<p class="item-summary" th:if="${!#strings.isEmpty(item.summary)}"
|
||||
th:text="${item.summary}">摘要</p>
|
||||
<div class="item-meta">
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article-item plain" th:if="${item.coverImage == null}">
|
||||
<div class="item-title">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
</div>
|
||||
<p class="item-summary" th:if="${!#strings.isEmpty(item.summary)}"
|
||||
th:text="${item.summary}">摘要</p>
|
||||
<div class="item-meta">
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="empty-state" th:if="${#lists.isEmpty(listData.items)}">
|
||||
<p th:if="${searchMode == true}">未找到相关内容</p>
|
||||
<p th:if="${searchMode != true}">栏目暂无内容</p>
|
||||
<p class="empty-hint" th:if="${searchMode == true}">换个关键词试试</p>
|
||||
<p class="empty-hint" th:if="${searchMode != true}">内容发布后将在此展示</p>
|
||||
</div>
|
||||
|
||||
<!-- 分页(列表页/搜索页共用) -->
|
||||
<nav class="pagination" th:if="${listData.totalPages > 1}"
|
||||
th:with="cur=${listData.page}, total=${listData.totalPages}" aria-label="分页">
|
||||
<a th:classappend="${cur <= 1} ? 'disabled'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur - 1)} : ${url.category(listData.categoryId) + '?page=' + (cur - 1)}"
|
||||
th:aria-disabled="${cur <= 1}">上一页</a>
|
||||
<a th:each="p : ${#numbers.sequence(1, total)}"
|
||||
th:classappend="${p == cur} ? 'active'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, p)} : ${url.category(listData.categoryId) + '?page=' + p}"
|
||||
th:aria-label="${'第' + p + '页'}"
|
||||
th:text="${p}">1</a>
|
||||
<a th:classappend="${cur >= total} ? 'disabled'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur + 1)} : ${url.category(listData.categoryId) + '?page=' + (cur + 1)}"
|
||||
th:aria-disabled="${cur >= total}">下一页</a>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main container" id="main-content">
|
||||
<div class="page-card">
|
||||
<nav class="breadcrumb" aria-label="面包屑">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="crumb-sep" aria-hidden="true">/</span>
|
||||
<span class="current" th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${category.name}">栏目名</h1>
|
||||
<!-- 单页栏目内容(type=2,入库前已 jsoup 清洗) -->
|
||||
<div class="article-content" th:if="${!#strings.isEmpty(category.content)}"
|
||||
th:utext="${category.content}">单页内容</div>
|
||||
<div class="empty-state" th:if="${#strings.isEmpty(category.content)}">
|
||||
<p>页面暂无内容</p>
|
||||
<p class="empty-hint">内容编辑后将在此展示</p>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"specVersion": 1,
|
||||
"name": "default",
|
||||
"title": "高校蓝(默认)",
|
||||
"version": "1.0.0",
|
||||
"author": "yunhai",
|
||||
"description": "高校蓝主题:顶栏 + 通栏轮播布局,现行基准皮肤(方案 §7)。",
|
||||
"screenshot": "assets/screenshot.png",
|
||||
"bannerSize": "1920x560",
|
||||
"params": [
|
||||
{ "key": "primary", "cssVar": "--primary", "label": "主色", "type": "color", "default": "#1a5cb0" },
|
||||
{ "key": "primaryDark", "cssVar": "--primary-dark", "label": "主色加深", "type": "color", "default": "#12447f" },
|
||||
{ "key": "text", "cssVar": "--text", "label": "正文文字色", "type": "color", "default": "#333333" },
|
||||
{ "key": "textLight", "cssVar": "--text-light", "label": "次要文字色", "type": "color", "default": "#777777" },
|
||||
{ "key": "bg", "cssVar": "--bg", "label": "页面底色", "type": "color", "default": "#f5f6f8" },
|
||||
{ "key": "cardBg", "cssVar": "--card-bg", "label": "卡片底色", "type": "color", "default": "#ffffff" },
|
||||
{ "key": "border", "cssVar": "--border", "label": "边框色", "type": "color", "default": "#e5e6eb" }
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 721 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
|
||||
<rect width="96" height="96" rx="20" fill="#0a5aa8"/>
|
||||
<path d="M48 16l8.6 17.5 19.3 2.8-14 13.6 3.3 19.2L48 60.1 30.8 69.1l3.3-19.2-14-13.6 19.3-2.8L48 16z" fill="#ffffff"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 246 B |
@@ -0,0 +1,190 @@
|
||||
/* scholar-blue 主题脚本:顶栏日期 + 轮播(圆点/箭头/触摸) + 导航吸顶反蓝 + 移动端抽屉与二级手风琴。
|
||||
与 default 同源逻辑,无任何外部依赖。 */
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/* ---------- 顶栏日期(本地时间,YYYY年M月D日 星期X) ---------- */
|
||||
var dateEl = document.getElementById('siteDate');
|
||||
if (dateEl) {
|
||||
var now = new Date();
|
||||
var week = ['日', '一', '二', '三', '四', '五', '六'][now.getDay()];
|
||||
dateEl.textContent = now.getFullYear() + '年' + (now.getMonth() + 1) + '月'
|
||||
+ now.getDate() + '日 星期' + week;
|
||||
}
|
||||
|
||||
/* ---------- 导航吸顶反蓝(桌面端;≤768 不吸顶) ---------- */
|
||||
var nav = document.getElementById('spNav');
|
||||
var DESKTOP_MIN = 769;
|
||||
var navBaseTop = 0;
|
||||
var holder = null;
|
||||
|
||||
function measureNavTop() {
|
||||
unlockNav();
|
||||
navBaseTop = nav.getBoundingClientRect().top + window.pageYOffset;
|
||||
}
|
||||
|
||||
function lockNav() {
|
||||
if (!nav.classList.contains('sp-nav--fixed')) {
|
||||
holder = document.createElement('div');
|
||||
holder.className = 'sp-nav-holder';
|
||||
holder.style.height = nav.offsetHeight + 'px';
|
||||
nav.parentNode.insertBefore(holder, nav);
|
||||
nav.classList.add('sp-nav--fixed');
|
||||
} else if (holder) {
|
||||
holder.style.height = nav.offsetHeight + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
function unlockNav() {
|
||||
nav.classList.remove('sp-nav--fixed');
|
||||
if (holder && holder.parentNode) {
|
||||
holder.parentNode.removeChild(holder);
|
||||
}
|
||||
holder = null;
|
||||
}
|
||||
|
||||
function onScrollNav() {
|
||||
if (window.innerWidth < DESKTOP_MIN) {
|
||||
unlockNav();
|
||||
return;
|
||||
}
|
||||
if (window.pageYOffset > navBaseTop) {
|
||||
lockNav();
|
||||
} else {
|
||||
unlockNav();
|
||||
}
|
||||
}
|
||||
|
||||
if (nav) {
|
||||
measureNavTop();
|
||||
window.addEventListener('scroll', onScrollNav, { passive: true });
|
||||
var resizeTimer = null;
|
||||
window.addEventListener('resize', function () {
|
||||
if (resizeTimer) { window.clearTimeout(resizeTimer); }
|
||||
resizeTimer = window.setTimeout(function () {
|
||||
measureNavTop();
|
||||
onScrollNav();
|
||||
}, 150);
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------- 移动端抽屉 + 二级手风琴 ---------- */
|
||||
var navToggle = document.querySelector('.sp-nav-toggle');
|
||||
var navList = document.querySelector('.sp-nav-list');
|
||||
|
||||
if (navToggle && navList) {
|
||||
navToggle.addEventListener('click', function () {
|
||||
var open = navList.classList.toggle('sp-open');
|
||||
navToggle.setAttribute('aria-expanded', open ? 'true' : 'false');
|
||||
});
|
||||
}
|
||||
|
||||
/* 窄屏下:点击带二级的项先展开面板,再点才跳转;宽屏交还给 CSS hover */
|
||||
if (navList) {
|
||||
navList.addEventListener('click', function (e) {
|
||||
if (window.innerWidth >= DESKTOP_MIN) { return; }
|
||||
var link = e.target.closest ? e.target.closest('a') : null;
|
||||
if (!link) { return; }
|
||||
var li = link.parentElement;
|
||||
if (!li || !li.classList.contains('has-sub')) { return; }
|
||||
var sub = li.querySelector('.sp-sub');
|
||||
if (!sub) { return; }
|
||||
if (!li.classList.contains('sp-sub-open')) {
|
||||
e.preventDefault();
|
||||
li.classList.add('sp-sub-open');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------- 首页轮播 ---------- */
|
||||
var root = document.querySelector('.sp-banner');
|
||||
var slides = document.querySelectorAll('.sp-banner-slide');
|
||||
var dots = document.querySelectorAll('.sp-banner-dots button');
|
||||
var prevBtn = document.querySelector('.sp-banner-arrow.prev');
|
||||
var nextBtn = document.querySelector('.sp-banner-arrow.next');
|
||||
if (!slides.length || !root) {
|
||||
return;
|
||||
}
|
||||
var current = 0;
|
||||
var timer = null;
|
||||
var INTERVAL = 5000;
|
||||
|
||||
function show(index) {
|
||||
slides[current].classList.remove('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.remove('active');
|
||||
}
|
||||
current = (index + slides.length) % slides.length;
|
||||
slides[current].classList.add('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
stop();
|
||||
if (slides.length > 1) {
|
||||
timer = window.setInterval(function () {
|
||||
show(current + 1);
|
||||
}, INTERVAL);
|
||||
}
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (timer) {
|
||||
window.clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
dots.forEach(function (dot, index) {
|
||||
dot.addEventListener('click', function () {
|
||||
show(index);
|
||||
start();
|
||||
});
|
||||
});
|
||||
if (prevBtn) {
|
||||
prevBtn.addEventListener('click', function () {
|
||||
show(current - 1);
|
||||
start();
|
||||
});
|
||||
}
|
||||
if (nextBtn) {
|
||||
nextBtn.addEventListener('click', function () {
|
||||
show(current + 1);
|
||||
start();
|
||||
});
|
||||
}
|
||||
root.addEventListener('mouseenter', stop);
|
||||
root.addEventListener('mouseleave', start);
|
||||
root.addEventListener('focusin', stop);
|
||||
root.addEventListener('focusout', start);
|
||||
root.setAttribute('tabindex', '-1');
|
||||
root.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'ArrowLeft') {
|
||||
show(current - 1);
|
||||
start();
|
||||
} else if (e.key === 'ArrowRight') {
|
||||
show(current + 1);
|
||||
start();
|
||||
}
|
||||
});
|
||||
|
||||
/* 触摸滑动切页 */
|
||||
var touchX = null;
|
||||
root.addEventListener('touchstart', function (e) {
|
||||
touchX = e.changedTouches[0].clientX;
|
||||
stop();
|
||||
}, { passive: true });
|
||||
root.addEventListener('touchend', function (e) {
|
||||
if (touchX === null) { return; }
|
||||
var dx = e.changedTouches[0].clientX - touchX;
|
||||
if (Math.abs(dx) > 40) {
|
||||
show(dx < 0 ? current + 1 : current - 1);
|
||||
}
|
||||
touchX = null;
|
||||
start();
|
||||
}, { passive: true });
|
||||
|
||||
start();
|
||||
})();
|
||||
|
After Width: | Height: | Size: 8.0 KiB |
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="sp-page sp-container" id="main-content">
|
||||
<div class="sp-page-card">
|
||||
<nav class="sp-crumb" aria-label="面包屑">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="sp-crumb-sep" aria-hidden="true">/</span>
|
||||
<a th:if="${currentCategoryId != null}" th:href="${url.category(currentCategoryId)}"
|
||||
th:text="${currentCategoryName}">栏目</a>
|
||||
<span class="sp-crumb-sep" th:if="${currentCategoryId != null}" aria-hidden="true">/</span>
|
||||
<span class="sp-crumb-current">正文</span>
|
||||
</nav>
|
||||
|
||||
<article class="sp-article">
|
||||
<h1 class="sp-article-title" th:text="${article.title}">文章标题</h1>
|
||||
<div class="sp-article-meta">
|
||||
<time th:if="${article.publishTime != null}"
|
||||
th:text="${#temporals.format(article.publishTime, 'yyyy-MM-dd HH:mm')}">2026-01-01 10:00</time>
|
||||
<span th:if="${!#strings.isEmpty(article.authorName)}"
|
||||
th:text="'作者:' + ${article.authorName}">作者</span>
|
||||
<span th:if="${!#strings.isEmpty(article.source)}"
|
||||
th:text="'来源:' + ${article.source}">来源</span>
|
||||
<span th:text="'浏览量:' + ${article.viewCount}">浏览量</span>
|
||||
</div>
|
||||
<!-- 正文:入库前已经 jsoup 白名单清洗(方案 §8.5),此处允许 utext;
|
||||
其余字段一律 th:text 转义输出 -->
|
||||
<div class="sp-article-content" th:utext="${article.content}">正文</div>
|
||||
</article>
|
||||
|
||||
<nav class="sp-sibling" aria-label="上下篇导航">
|
||||
<a th:if="${prevArticle != null}" class="sp-sib prev"
|
||||
th:href="${url.article(prevArticle.id)}">
|
||||
<span class="sp-sib-label">上一篇</span>
|
||||
<span class="sp-sib-title" th:text="${prevArticle.title}">上一篇标题</span>
|
||||
</a>
|
||||
<span class="sp-sib-none prev" th:if="${prevArticle == null}">
|
||||
<span class="sp-sib-label">上一篇</span>
|
||||
<span class="sp-sib-title">已经是最早一篇</span>
|
||||
</span>
|
||||
<a th:if="${nextArticle != null}" class="sp-sib next"
|
||||
th:href="${url.article(nextArticle.id)}">
|
||||
<span class="sp-sib-label">下一篇</span>
|
||||
<span class="sp-sib-title" th:text="${nextArticle.title}">下一篇标题</span>
|
||||
</a>
|
||||
<span class="sp-sib-none next" th:if="${nextArticle == null}">
|
||||
<span class="sp-sib-label">下一篇</span>
|
||||
<span class="sp-sib-title">已是最新一篇</span>
|
||||
</span>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- scholar-blue 公共页脚:深蓝渐变底 + 同心圆环纹理(CSS 绘制) + 三栏(品牌/联系备案/友链分组) + 底条校名。
|
||||
数据绑定与 default 契约一致(linkGroups/contact/copyright/beian/logo/schName),仅换皮。 -->
|
||||
<footer class="sp-footer" th:fragment="footer">
|
||||
<i class="sp-ring sp-ring--1" aria-hidden="true"></i>
|
||||
<i class="sp-ring sp-ring--2" aria-hidden="true"></i>
|
||||
<i class="sp-ring sp-ring--3" aria-hidden="true"></i>
|
||||
|
||||
<div class="sp-footer-inner">
|
||||
<!-- 品牌栏 -->
|
||||
<div class="sp-footer-brand">
|
||||
<span class="sp-footer-badge" th:if="${site.config['logo'] != null}">
|
||||
<img class="sp-footer-logo" th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
</span>
|
||||
<span class="sp-footer-badge sp-footer-badge--plain" th:if="${site.config['logo'] == null}" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" width="30" height="30" focusable="false">
|
||||
<path d="M12 2l2.4 4.9 5.4.8-3.9 3.8.9 5.4L12 14.4 7.2 16.9l.9-5.4L4.2 7.7l5.4-.8L12 2z"
|
||||
fill="currentColor"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="sp-footer-site" th:text="${site.name}">站点名称</span>
|
||||
</div>
|
||||
|
||||
<!-- 联系/版权/备案 -->
|
||||
<div class="sp-footer-info">
|
||||
<p class="sp-footer-line" th:if="${site.config['contact'] != null}">
|
||||
<i class="sp-dot" aria-hidden="true"></i><span th:text="${site.config['contact']}">联系方式</span>
|
||||
</p>
|
||||
<p class="sp-footer-line" th:if="${site.config['copyright'] != null}">
|
||||
<i class="sp-dot" aria-hidden="true"></i><span th:text="${site.config['copyright']}">版权信息</span>
|
||||
</p>
|
||||
<p class="sp-footer-line" th:if="${site.config['beian'] != null}">
|
||||
<i class="sp-dot" aria-hidden="true"></i><span th:text="${site.config['beian']}">备案号</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 友情链接(分组渲染;无分组整栏不渲染) -->
|
||||
<div class="sp-footer-links" th:if="${!#lists.isEmpty(site.linkGroups)}">
|
||||
<div class="sp-links-group" th:each="group : ${site.linkGroups}"
|
||||
th:if="${!#lists.isEmpty(group.links)}">
|
||||
<span class="sp-group-name" th:text="${group.groupName}">分组</span>
|
||||
<p class="sp-links-row">
|
||||
<a th:each="link : ${group.links}" th:href="${link.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${link.name}">链接</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sp-footer-bottom">
|
||||
<p th:if="${site.schName != null and !#strings.isEmpty(site.schName)}"
|
||||
th:text="${site.schName}">学校名称</p>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<!-- scholar-blue 公共 head 片段:与 default 契约一致(pageTitle/seo/canonical/og/themeVarsCss/favicon 兜底) -->
|
||||
<head th:fragment="head">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title th:text="${pageTitle}">页面标题</title>
|
||||
<meta name="description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}"
|
||||
th:content="${seoDescription}">
|
||||
<link rel="canonical" th:if="${canonical != null}" th:href="${canonical}">
|
||||
<meta property="og:title" th:if="${pageTitle != null}" th:content="${pageTitle}">
|
||||
<meta property="og:description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}" th:content="${seoDescription}">
|
||||
<meta property="og:image" th:if="${ogImage != null}" th:content="${ogImage}">
|
||||
<link rel="stylesheet" th:href="${url.asset('css/main.css')}">
|
||||
<style th:if="${not #strings.isEmpty(themeVarsCss)}" th:utext="${themeVarsCss}"></style>
|
||||
<link rel="icon" type="image/png"
|
||||
th:href="${site.config['favicon'] != null ? url.upload(site.config['favicon']) : url.asset('favicon.png')}">
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- scholar-blue 公共头部:深蓝顶栏(日期+院系切换) + 深蓝品牌行(徽标+站名+圆角搜索) + 白底主导航(吸顶反蓝、
|
||||
主蓝半透明下拉面板)。数据绑定与 default 契约一致,仅换皮。 -->
|
||||
<header class="sp-header" th:fragment="header">
|
||||
<a class="skip-link" href="#main-content">跳到主要内容</a>
|
||||
|
||||
<!-- 顶栏 -->
|
||||
<div class="sp-topbar">
|
||||
<div class="sp-topbar-inner">
|
||||
<span class="sp-topbar-date" id="siteDate" th:aria-label="'今日日期'">加载日期…</span>
|
||||
<div class="sp-topbar-side" th:if="${!site.colleges.isEmpty()}"
|
||||
th:with="collegesLabel=${site.config['colleges_label'] ?: '专业院系'}">
|
||||
<div class="sp-colleges">
|
||||
<span class="sp-colleges-toggle">
|
||||
<a href="javascript:void(0)" th:text="${collegesLabel}">专业院系</a>
|
||||
<i class="sp-colleges-arrow" aria-hidden="true">▾</i>
|
||||
</span>
|
||||
<ul class="sp-colleges-menu">
|
||||
<li th:each="col : ${site.colleges}" th:classappend="${col.code == site.code} ? 'active'">
|
||||
<a th:href="${url.siteHome(col.code, col.publicBaseUrl)}"
|
||||
th:title="${col.name}" th:text="${col.name}">学院名称</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 品牌行 -->
|
||||
<div class="sp-brandbar">
|
||||
<div class="sp-brandbar-inner">
|
||||
<div class="sp-brand">
|
||||
<span class="sp-brand-badge" th:if="${site.config['logo'] != null}">
|
||||
<img class="sp-logo" th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
</span>
|
||||
<span class="sp-brand-badge sp-brand-badge--plain" th:if="${site.config['logo'] == null}" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" width="26" height="26" focusable="false">
|
||||
<path d="M12 2l2.4 4.9 5.4.8-3.9 3.8.9 5.4L12 14.4 7.2 16.9l.9-5.4L4.2 7.7l5.4-.8L12 2z"
|
||||
fill="currentColor"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<a class="sp-site-name" th:href="${url.home()}" th:text="${site.name}">站点名称</a>
|
||||
</div>
|
||||
<form class="sp-search" th:action="${url.search('', null)}" method="get" role="search">
|
||||
<input type="text" name="q" placeholder="请输入关键字…" aria-label="站内搜索">
|
||||
<button type="submit" aria-label="搜索">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" focusable="false" aria-hidden="true">
|
||||
<path d="M10.5 3a7.5 7.5 0 015.9 12.1l4.3 4.3-1.4 1.4-4.3-4.3A7.5 7.5 0 1110.5 3zm0 2a5.5 5.5 0 100 11 5.5 5.5 0 000-11z"
|
||||
fill="currentColor"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 主导航:白底深蓝字;下拉为主蓝半透明面板(.sp-sub 展开动效见 main.css);吸顶反蓝由 main.js 处理 -->
|
||||
<nav class="sp-nav" id="spNav" aria-label="栏目导航">
|
||||
<div class="sp-nav-inner">
|
||||
<button class="sp-nav-toggle" type="button" aria-label="展开菜单" aria-expanded="false">
|
||||
<span></span><span></span><span></span>
|
||||
</button>
|
||||
<ul class="sp-nav-list">
|
||||
<li th:classappend="${currentCategoryId == null} ? 'active'">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
</li>
|
||||
<li th:each="cat : ${navCategories}"
|
||||
th:classappend="${(currentCategoryId == cat.id ? 'active' : '') + (!cat.children.isEmpty() ? ' has-sub' : '')}">
|
||||
<a th:if="${cat.type == 3}" th:href="${cat.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${cat.name}">栏目</a>
|
||||
<a th:unless="${cat.type == 3}" th:href="${url.category(cat.id)}"><span th:text="${cat.name}">栏目</span><i th:if="${!cat.children.isEmpty()}" class="sp-caret" aria-hidden="true">▾</i></a>
|
||||
<!-- 二级下拉:主蓝半透明面板,顶部亮线,项 hover 加深+左亮条 -->
|
||||
<ul class="sp-sub" th:if="${!cat.children.isEmpty()}">
|
||||
<li th:each="sub : ${cat.children}">
|
||||
<a th:if="${sub.type == 3}" th:href="${sub.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${sub.name}">子栏目</a>
|
||||
<a th:unless="${sub.type == 3}" th:href="${url.category(sub.id)}" th:text="${sub.name}">子栏目</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
</html>
|
||||
@@ -0,0 +1,124 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="sp-home" id="main-content">
|
||||
<!-- 首页轮播位(cms_banner position=home;设计尺寸见 theme.json bannerSize) -->
|
||||
<section class="sp-banner" th:if="${!#lists.isEmpty(banners)}" aria-label="焦点图片">
|
||||
<div class="sp-banner-slides">
|
||||
<a class="sp-banner-slide" th:each="b, stat : ${banners}"
|
||||
th:classappend="${stat.first} ? 'active'"
|
||||
th:href="${b.linkUrl}" th:title="${b.title}">
|
||||
<img th:src="${b.imageUrl}" th:alt="${b.title}">
|
||||
<span class="sp-banner-title" th:text="${b.title}">标题</span>
|
||||
</a>
|
||||
</div>
|
||||
<button class="sp-banner-arrow prev" type="button" aria-label="上一张" th:if="${#lists.size(banners) > 1}">‹</button>
|
||||
<button class="sp-banner-arrow next" type="button" aria-label="下一张" th:if="${#lists.size(banners) > 1}">›</button>
|
||||
<div class="sp-banner-dots" th:if="${#lists.size(banners) > 1}">
|
||||
<button th:each="b, stat : ${banners}" th:classappend="${stat.first} ? 'active'"
|
||||
th:aria-label="${'第' + (stat.count) + '张'}"></button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 头条区:头条推荐(置顶优先) + 图片新闻(有封面文章) -->
|
||||
<section class="sp-section sp-container" aria-label="头条与图片新闻">
|
||||
<div class="sp-headline">
|
||||
<div class="sp-headline-card" th:if="${!#lists.isEmpty(topArticles)}">
|
||||
<div class="sp-block-head">
|
||||
<h2>头条推荐</h2>
|
||||
<i class="sp-block-tick" aria-hidden="true"></i>
|
||||
</div>
|
||||
<ul class="sp-headline-list">
|
||||
<li class="sp-headline-lead" th:with="lead=${topArticles[0]}">
|
||||
<a class="sp-lead-title" th:href="${url.article(lead.id)}" th:text="${lead.title}">头条标题</a>
|
||||
<div class="sp-lead-meta">
|
||||
<span class="sp-top-badge" th:if="${lead.topmost == 1}">置顶</span>
|
||||
<time th:if="${lead.publishTime != null}"
|
||||
th:text="${#temporals.format(lead.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</div>
|
||||
</li>
|
||||
<li th:each="item, stat : ${topArticles}" th:if="${stat.index > 0}">
|
||||
<span class="sp-top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sp-focus-card" th:if="${!#lists.isEmpty(focusArticles)}">
|
||||
<div class="sp-block-head">
|
||||
<h2>图片新闻</h2>
|
||||
<i class="sp-block-tick" aria-hidden="true"></i>
|
||||
</div>
|
||||
<a class="sp-focus-lead" th:with="cover=${focusArticles[0]}"
|
||||
th:href="${url.article(cover.id)}">
|
||||
<span class="sp-focus-cover">
|
||||
<img th:src="${url.upload(cover.coverImage)}" th:alt="${cover.title}">
|
||||
</span>
|
||||
<span class="sp-focus-title" th:text="${cover.title}">图片新闻标题</span>
|
||||
</a>
|
||||
<ul class="sp-focus-rows">
|
||||
<li th:each="row, stat : ${focusArticles}" th:if="${stat.index > 0}">
|
||||
<a th:href="${url.article(row.id)}">
|
||||
<span class="sp-row-cover"><img th:src="${url.upload(row.coverImage)}" th:alt="${row.title}"></span>
|
||||
<span class="sp-row-title" th:text="${row.title}">图片新闻标题</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 一级栏目区块(聚合列表型子孙栏目 top 8) -->
|
||||
<section class="sp-section sp-container" aria-label="栏目区块">
|
||||
<div class="sp-blocks">
|
||||
<div class="sp-block" th:each="block : ${categoryBlocks}">
|
||||
<div class="sp-block-head sp-block-head--bar">
|
||||
<h2 th:text="${block.category.name}">栏目名</h2>
|
||||
<a class="sp-more" th:href="${block.moreUrl}">更多 ›</a>
|
||||
</div>
|
||||
<ul class="sp-block-list" th:if="${!#lists.isEmpty(block.items)}">
|
||||
<!-- 区块头条:有封面则图文,无封面则带摘要纯文 -->
|
||||
<li class="sp-block-featured" th:with="feat=${block.items[0]}">
|
||||
<a th:href="${url.article(feat.id)}">
|
||||
<span class="sp-feat-cover" th:if="${feat.coverImage != null}">
|
||||
<img th:src="${url.upload(feat.coverImage)}" th:alt="${feat.title}">
|
||||
</span>
|
||||
<span class="sp-feat-body">
|
||||
<span class="sp-feat-title" th:text="${feat.title}">头条标题</span>
|
||||
<span class="sp-feat-summary" th:if="${!#strings.isEmpty(feat.summary)}"
|
||||
th:text="${feat.summary}">摘要</span>
|
||||
<span class="sp-feat-meta">
|
||||
<span class="sp-top-badge" th:if="${feat.topmost == 1}">置顶</span>
|
||||
<time th:if="${feat.publishTime != null}"
|
||||
th:text="${#temporals.format(feat.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sp-block-item" th:each="item, stat : ${block.items}" th:if="${stat.index > 0}">
|
||||
<span class="sp-date-chip" th:if="${item.publishTime != null}"
|
||||
th:with="d=${item.publishTime}">
|
||||
<b th:text="${#temporals.format(d, 'dd')}">01</b>
|
||||
<i th:text="${#temporals.format(d, 'yyyy-MM')}">2026-01</i>
|
||||
</span>
|
||||
<a class="sp-block-item-title" th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<span class="sp-top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="sp-empty" th:if="${#lists.isEmpty(block.items)}">
|
||||
<p>栏目暂无内容</p>
|
||||
<p class="sp-empty-hint">内容发布后将在此展示</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="sp-page sp-container" id="main-content">
|
||||
<div class="sp-page-card">
|
||||
<nav class="sp-crumb" aria-label="面包屑" th:if="${searchMode != true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="sp-crumb-sep" aria-hidden="true">/</span>
|
||||
<span class="sp-crumb-current" th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
<nav class="sp-crumb" aria-label="面包屑" th:if="${searchMode == true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="sp-crumb-sep" aria-hidden="true">/</span>
|
||||
<span class="sp-crumb-current">搜索结果</span>
|
||||
</nav>
|
||||
|
||||
<h1 class="sp-page-title" th:if="${searchMode != true}" th:text="${category.name}">栏目名</h1>
|
||||
<h1 class="sp-page-title" th:if="${searchMode == true}" th:text="'搜索:' + ${q}">搜索词</h1>
|
||||
|
||||
<ul class="sp-article-list">
|
||||
<!-- 有封面:图文行;无封面:行式(符号 + 标题 + 右侧日期) -->
|
||||
<li th:each="item : ${listData.items}">
|
||||
<div class="sp-article-row" th:if="${item.coverImage != null}">
|
||||
<a class="sp-item-cover" th:href="${url.article(item.id)}">
|
||||
<img th:src="${url.upload(item.coverImage)}" th:alt="${item.title}">
|
||||
</a>
|
||||
<div class="sp-item-body">
|
||||
<div class="sp-item-title">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
</div>
|
||||
<p class="sp-item-summary" th:if="${!#strings.isEmpty(item.summary)}"
|
||||
th:text="${item.summary}">摘要</p>
|
||||
<div class="sp-item-meta">
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
<span class="sp-top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sp-article-line" th:if="${item.coverImage == null}">
|
||||
<i class="sp-line-tick" aria-hidden="true"></i>
|
||||
<div class="sp-line-main">
|
||||
<a class="sp-line-title" th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<p class="sp-item-summary" th:if="${!#strings.isEmpty(item.summary)}"
|
||||
th:text="${item.summary}">摘要</p>
|
||||
</div>
|
||||
<div class="sp-line-side">
|
||||
<span class="sp-top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="sp-empty" th:if="${#lists.isEmpty(listData.items)}">
|
||||
<p th:if="${searchMode == true}">未找到相关内容</p>
|
||||
<p th:if="${searchMode != true}">栏目暂无内容</p>
|
||||
<p class="sp-empty-hint" th:if="${searchMode == true}">换个关键词试试</p>
|
||||
<p class="sp-empty-hint" th:if="${searchMode != true}">内容发布后将在此展示</p>
|
||||
</div>
|
||||
|
||||
<!-- 分页(列表页/搜索页共用) -->
|
||||
<nav class="sp-pagination" th:if="${listData.totalPages > 1}"
|
||||
th:with="cur=${listData.page}, total=${listData.totalPages}" aria-label="分页">
|
||||
<a th:classappend="${cur <= 1} ? 'disabled'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur - 1)} : ${url.category(listData.categoryId) + '?page=' + (cur - 1)}"
|
||||
th:aria-disabled="${cur <= 1}">上一页</a>
|
||||
<a th:each="p : ${#numbers.sequence(1, total)}"
|
||||
th:classappend="${p == cur} ? 'active'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, p)} : ${url.category(listData.categoryId) + '?page=' + p}"
|
||||
th:aria-label="${'第' + p + '页'}"
|
||||
th:text="${p}">1</a>
|
||||
<a th:classappend="${cur >= total} ? 'disabled'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur + 1)} : ${url.category(listData.categoryId) + '?page=' + (cur + 1)}"
|
||||
th:aria-disabled="${cur >= total}">下一页</a>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="sp-page sp-container" id="main-content">
|
||||
<div class="sp-page-card">
|
||||
<nav class="sp-crumb" aria-label="面包屑">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span class="sp-crumb-sep" aria-hidden="true">/</span>
|
||||
<span class="sp-crumb-current" th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
|
||||
<article class="sp-article">
|
||||
<h1 class="sp-article-title" th:text="${category.name}">栏目名</h1>
|
||||
<!-- 单页栏目内容(type=2,入库前已 jsoup 清洗) -->
|
||||
<div class="sp-article-content" th:if="${!#strings.isEmpty(category.content)}"
|
||||
th:utext="${category.content}">单页内容</div>
|
||||
<div class="sp-empty" th:if="${#strings.isEmpty(category.content)}">
|
||||
<p>页面暂无内容</p>
|
||||
<p class="sp-empty-hint">内容编辑后将在此展示</p>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"specVersion": 1,
|
||||
"name": "scholar-blue",
|
||||
"title": "学院蓝(scholar-blue)",
|
||||
"version": "1.0.0",
|
||||
"author": "yunhai",
|
||||
"description": "学院蓝·经典学院派门户:深蓝品牌行+白底主导航(吸顶反蓝)+主蓝半透明下拉面板+居中双线栏目标题+日期方块+圆环纹理页脚(设计语言参考建平中学,仅学设计不复制实现)。",
|
||||
"screenshot": "assets/screenshot.png",
|
||||
"bannerSize": "1920x560",
|
||||
"params": [
|
||||
{ "key": "primary", "cssVar": "--sp-primary", "label": "主色", "type": "color", "default": "#0a5aa8" },
|
||||
{ "key": "primaryDark", "cssVar": "--sp-primary-dark", "label": "主色加深", "type": "color", "default": "#033d70" },
|
||||
{ "key": "primaryLight", "cssVar": "--sp-primary-light","label": "主色提亮", "type": "color", "default": "#1167bb" },
|
||||
{ "key": "navBg", "cssVar": "--sp-nav-bg", "label": "导航条底色", "type": "color", "default": "#ffffff" },
|
||||
{ "key": "footerBg", "cssVar": "--sp-footer-bg", "label": "页脚底色", "type": "color", "default": "#0b4781" },
|
||||
{ "key": "text", "cssVar": "--sp-text", "label": "正文文字色", "type": "color", "default": "#333333" },
|
||||
{ "key": "textLight", "cssVar": "--sp-text-light", "label": "次要文字色", "type": "color", "default": "#777777" },
|
||||
{ "key": "bg", "cssVar": "--sp-bg", "label": "页面底色", "type": "color", "default": "#eff2f6" },
|
||||
{ "key": "cardBg", "cssVar": "--sp-card-bg", "label": "卡片底色", "type": "color", "default": "#ffffff" },
|
||||
{ "key": "border", "cssVar": "--sp-border", "label": "边框色", "type": "color", "default": "#e3e7ee" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# warm-kinder 皮肤包
|
||||
|
||||
由 default 派生的演示皮肤(方案 §7)。**升级随版本发布,不在站点间复制目录**。
|
||||
|
||||
## 数据契约(模板可取用的 model 属性全集,§4.3)
|
||||
|
||||
| 页面 | 属性 |
|
||||
| --- | --- |
|
||||
| 全部 | `site`(快照:config/分类树/轮播/友链组/院系子站)、`url`(PortalUrlHelper:home/category/article/asset/search/siteHome)、`themeBase`(=`themes/warm-kinder`)、`navCategories`、`pageTitle`、`seoDescription`、`canonical`、`themeParams`(微调参数,仅 theme.json 声明过的 key)、`themeVarsCss`(服务端预构建 `:root{}` 覆盖串,无参数为空) |
|
||||
| home | `banners`(时间窗内 home 位)、`topArticles`(置顶+最新 6)、`categoryBlocks`(LIST 型根栏目块,各 top 8) |
|
||||
| list / search | `listData`(分页)、`category`(list)、`q` + `searchMode`(search) |
|
||||
| detail | `article`、`prevArticle`、`nextArticle`、`currentCategoryId` |
|
||||
| single | `category`(含 `content`)、`currentCategoryId` |
|
||||
|
||||
原则:皮肤不得假设"首页一定有轮播",对空集合优雅降级。
|
||||
|
||||
## 轮播图尺寸约定(bannerSize)
|
||||
|
||||
1920x560(管理端上传端按此引导裁剪,D2 决策点)。
|
||||
|
||||
## 可调参数
|
||||
|
||||
见 `theme.json` 的 `params`(color 进 CSS 变量;select 供模板 `th:if` 分支布局)。
|
||||
@@ -0,0 +1,332 @@
|
||||
/* ============================================================
|
||||
* warm-kinder 皮肤包样式(default 派生)(方案 §8.2)
|
||||
* 换肤 = 拷贝 default 目录改 CSS 变量与布局,零后端代码。
|
||||
* 轮播图设计尺寸约定:1920×560(管理端上传端按此引导裁剪,D2 决策点确认)。
|
||||
* ============================================================ */
|
||||
:root {
|
||||
--primary: #e8722a;
|
||||
--primary-dark: #c25a1a;
|
||||
--text: #333;
|
||||
--text-light: #777;
|
||||
--bg: #fff8f0;
|
||||
--card-bg: #fffdf9;
|
||||
--border: #f3e3d3;
|
||||
--max-width: 1200px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
a:hover { color: var(--primary); }
|
||||
img { max-width: 100%; }
|
||||
time, .item-meta { color: var(--text-light); font-size: 13px; }
|
||||
.empty { color: var(--text-light); text-align: center; padding: 32px 0; }
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
.site-header { background: var(--card-bg); border-bottom: 1px solid var(--border); }
|
||||
.header-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
.site-brand { display: flex; align-items: center; gap: 12px; }
|
||||
.site-logo { height: 44px; }
|
||||
.site-name { font-size: 26px; font-weight: 700; color: var(--primary); }
|
||||
.site-search { display: flex; }
|
||||
.site-search input {
|
||||
border: 1px solid var(--border);
|
||||
border-right: none;
|
||||
padding: 8px 12px;
|
||||
width: 220px;
|
||||
outline: none;
|
||||
}
|
||||
.site-search button {
|
||||
border: none;
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
padding: 8px 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ===== 专业院系下拉(院系子站切换,《院系子站方案》) ===== */
|
||||
/* 悬停展开白底纵向列表,右对齐 + 超高滚动(院系数十个子站场景) */
|
||||
.site-colleges { position: relative; }
|
||||
.site-colleges .colleges-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
border: 1px solid var(--border);
|
||||
padding: 8px 14px;
|
||||
cursor: pointer;
|
||||
color: var(--primary);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-arrow { font-style: normal; font-size: 12px; color: var(--text-light); }
|
||||
.site-colleges .colleges-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
min-width: 200px;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--primary);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
|
||||
z-index: 110;
|
||||
}
|
||||
.site-colleges:hover .colleges-menu { display: block; }
|
||||
.site-colleges .colleges-menu li a {
|
||||
display: block;
|
||||
padding: 9px 16px;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.site-colleges .colleges-menu li a:hover { background: #f2f6fc; color: var(--primary); }
|
||||
.site-colleges .colleges-menu li.active a { color: var(--primary); font-weight: 600; }
|
||||
.site-nav { background: var(--primary); }
|
||||
.site-nav ul {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 16px;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-nav li a {
|
||||
display: block;
|
||||
padding: 12px 22px;
|
||||
color: #fff;
|
||||
}
|
||||
.site-nav li:hover a, .site-nav li.active a { background: var(--primary-dark); }
|
||||
|
||||
/* ===== 二级下拉导航 ===== */
|
||||
/* 面板为白底纵向列表:需整体覆盖 .site-nav ul 的横向 flex 与内边距 */
|
||||
.site-nav > ul > li { position: relative; }
|
||||
.site-nav li.has-sub > a::after { content: " ▾"; font-size: 12px; opacity: .85; }
|
||||
.site-nav ul.sub-nav {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
min-width: 168px;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
list-style: none;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
border-top: 2px solid var(--primary);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
|
||||
z-index: 100;
|
||||
}
|
||||
.site-nav li:hover > .sub-nav { display: block; }
|
||||
.site-nav .sub-nav li a {
|
||||
padding: 9px 16px;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
}
|
||||
.site-nav .sub-nav li a:hover { background: #f2f6fc; color: var(--primary); }
|
||||
.site-nav .sub-nav li.active a { color: var(--primary); font-weight: 600; }
|
||||
|
||||
/* ===== 首页轮播 ===== */
|
||||
.banner { position: relative; max-width: var(--max-width); margin: 16px auto; overflow: hidden; }
|
||||
.banner-slides { position: relative; height: 420px; }
|
||||
.banner-slide { display: none; position: absolute; inset: 0; }
|
||||
.banner-slide.active { display: block; }
|
||||
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.banner-title {
|
||||
position: absolute;
|
||||
left: 0; right: 0; bottom: 0;
|
||||
padding: 12px 20px;
|
||||
color: #fff;
|
||||
background: linear-gradient(transparent, rgba(0, 0, 0, .6));
|
||||
}
|
||||
.banner-dots {
|
||||
position: absolute;
|
||||
bottom: 12px; right: 20px;
|
||||
display: flex; gap: 8px;
|
||||
}
|
||||
.banner-dots button {
|
||||
width: 10px; height: 10px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: rgba(255, 255, 255, .6);
|
||||
cursor: pointer;
|
||||
}
|
||||
.banner-dots button.active { background: #fff; }
|
||||
|
||||
/* ===== 通用区块 ===== */
|
||||
.top-strip, .category-block {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 20px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.section-title, .block-head h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 20px;
|
||||
border-left: 4px solid var(--primary);
|
||||
padding-left: 10px;
|
||||
}
|
||||
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
|
||||
.more { font-size: 13px; color: var(--text-light); }
|
||||
.top-strip ul, .block-list { list-style: none; margin: 0; padding: 0; }
|
||||
.top-strip li, .block-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 9px 0;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
.top-strip li:last-child, .block-list li:last-child { border-bottom: none; }
|
||||
.top-strip li a, .block-list li a {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.top-badge {
|
||||
flex: none;
|
||||
color: #fff;
|
||||
background: var(--primary);
|
||||
font-size: 12px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* ===== 列表页 ===== */
|
||||
.list-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 24px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.breadcrumb { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }
|
||||
.breadcrumb a { margin-right: 8px; }
|
||||
.breadcrumb span { margin-left: 8px; }
|
||||
.page-title {
|
||||
font-size: 22px;
|
||||
border-left: 4px solid var(--primary);
|
||||
padding-left: 10px;
|
||||
margin: 0 0 18px;
|
||||
}
|
||||
.article-list { list-style: none; margin: 0; padding: 0; }
|
||||
.article-list li { padding: 14px 0; border-bottom: 1px dashed var(--border); }
|
||||
.item-title { font-size: 17px; }
|
||||
.item-summary {
|
||||
color: var(--text-light);
|
||||
font-size: 14px;
|
||||
margin: 6px 0;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.item-meta { display: flex; gap: 10px; align-items: center; }
|
||||
|
||||
/* ===== 分页 ===== */
|
||||
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0 4px; }
|
||||
.pagination a {
|
||||
min-width: 34px;
|
||||
text-align: center;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--card-bg);
|
||||
}
|
||||
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
|
||||
|
||||
/* ===== 详情/单页 ===== */
|
||||
.detail-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 16px auto;
|
||||
padding: 32px;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.article-title { margin: 8px 0 12px; font-size: 26px; text-align: center; }
|
||||
.article-meta {
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
color: var(--text-light);
|
||||
font-size: 13px;
|
||||
padding-bottom: 18px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.article-content { line-height: 1.9; font-size: 16px; padding-top: 20px; word-break: break-word; }
|
||||
.article-content img { height: auto; }
|
||||
.article-content table { border-collapse: collapse; width: 100%; }
|
||||
.article-content table td, .article-content table th { border: 1px solid var(--border); padding: 6px 10px; }
|
||||
.article-sibling { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; font-size: 14px; }
|
||||
|
||||
/* ===== 页脚 ===== */
|
||||
.site-footer { margin-top: 32px; background: var(--primary-dark); color: rgba(255, 255, 255, .85); }
|
||||
.footer-links {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px 16px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.links-group { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; }
|
||||
.group-name { font-weight: 600; margin-right: 4px; }
|
||||
.footer-info {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 12px 16px 20px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
}
|
||||
.footer-info p { margin: 4px 0; }
|
||||
|
||||
/* ===== 移动端适配 ===== */
|
||||
@media (max-width: 768px) {
|
||||
.header-inner { flex-direction: column; align-items: stretch; }
|
||||
.site-search input { flex: 1; width: auto; }
|
||||
.site-colleges { align-self: flex-start; }
|
||||
.site-colleges .colleges-menu { left: 0; right: auto; min-width: 100%; }
|
||||
.banner-slides { height: 200px; }
|
||||
.detail-main, .list-main { padding: 18px 14px; }
|
||||
.article-title { font-size: 22px; }
|
||||
/* 触屏无 hover:子菜单静态平铺(缩进列表),不做浮层 */
|
||||
.site-nav ul.sub-nav {
|
||||
display: block;
|
||||
position: static;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
min-width: 0;
|
||||
padding: 0 0 6px;
|
||||
}
|
||||
.site-nav .sub-nav li a { color: rgba(255, 255, 255, .9); padding: 8px 16px 8px 34px; }
|
||||
.site-nav .sub-nav li a:hover { background: var(--primary-dark); color: #fff; }
|
||||
}
|
||||
|
||||
/* ===== warm-kinder 主题差异层(方案 §7:差异仅限 CSS + fragments)===== */
|
||||
/* 圆角卡片 + 暖色系 */
|
||||
.site-header { border-radius: 0 0 24px 24px; }
|
||||
.site-footer { border-radius: 24px 24px 0 0; }
|
||||
.banner, .banner-title { border-radius: 20px; overflow: hidden; }
|
||||
.site-search input, .site-search button { border-radius: 999px; }
|
||||
.footer-info p { color: var(--primary-dark); }
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||
<defs><linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#ec8b50"/><stop offset="1" stop-color="#a2501d"/>
|
||||
</linearGradient></defs>
|
||||
<rect width="64" height="64" fill="url(#bg)"/>
|
||||
<circle cx="32" cy="25" r="10" fill="#ffffff"/>
|
||||
<path d="M 16 49.3 Q 32 30.7 48 49.3 Z" fill="#ffffff" opacity="0.92"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 434 B |
@@ -0,0 +1,40 @@
|
||||
/* default 皮肤包脚本:仅首页轮播自动播放与圆点切换,无任何外部依赖 */
|
||||
(function () {
|
||||
var slides = document.querySelectorAll('.banner-slide');
|
||||
var dots = document.querySelectorAll('.banner-dots button');
|
||||
if (!slides.length) {
|
||||
return;
|
||||
}
|
||||
var current = 0;
|
||||
var timer = null;
|
||||
|
||||
function show(index) {
|
||||
slides[current].classList.remove('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.remove('active');
|
||||
}
|
||||
current = (index + slides.length) % slides.length;
|
||||
slides[current].classList.add('active');
|
||||
if (dots[current]) {
|
||||
dots[current].classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
if (slides.length > 1) {
|
||||
timer = window.setInterval(function () {
|
||||
show(current + 1);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
dots.forEach(function (dot, index) {
|
||||
dot.addEventListener('click', function () {
|
||||
window.clearInterval(timer);
|
||||
show(index);
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
start();
|
||||
})();
|
||||
|
After Width: | Height: | Size: 91 KiB |
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main">
|
||||
<nav class="breadcrumb">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<a th:if="${currentCategoryId != null}" th:href="${url.category(currentCategoryId)}">栏目</a>
|
||||
<span>正文</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${article.title}">文章标题</h1>
|
||||
<div class="article-meta">
|
||||
<time th:if="${article.publishTime != null}"
|
||||
th:text="${'发布时间:' + #temporals.format(article.publishTime, 'yyyy-MM-dd HH:mm')}">2026-01-01 10:00</time>
|
||||
<span th:if="${!#strings.isEmpty(article.authorName)}"
|
||||
th:text="'作者:' + ${article.authorName}">作者</span>
|
||||
<span th:if="${!#strings.isEmpty(article.source)}"
|
||||
th:text="'来源:' + ${article.source}">来源</span>
|
||||
<span th:text="'浏览量:' + ${article.viewCount}">浏览量</span>
|
||||
</div>
|
||||
<!-- 正文:入库前已经 jsoup 白名单清洗(方案 §8.5),此处允许 utext;
|
||||
其余字段一律 th:text 转义输出 -->
|
||||
<div class="article-content" th:utext="${article.content}">正文</div>
|
||||
</article>
|
||||
|
||||
<nav class="article-sibling">
|
||||
<a th:if="${prevArticle != null}" class="prev"
|
||||
th:href="${url.article(prevArticle.id)}"
|
||||
th:text="'上一篇:' + ${prevArticle.title}">上一篇</a>
|
||||
<a th:if="${nextArticle != null}" class="next"
|
||||
th:href="${url.article(nextArticle.id)}"
|
||||
th:text="'下一篇:' + ${nextArticle.title}">下一篇</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共页脚:联系信息 + 友情链接(分组渲染,方案 §8.1:友链不设独立路由) -->
|
||||
<footer class="site-footer" th:fragment="footer">
|
||||
<div class="footer-links" th:if="${!#lists.isEmpty(site.linkGroups)}">
|
||||
<div class="links-group" th:each="group : ${site.linkGroups}">
|
||||
<span class="group-name" th:text="${group.groupName}">分组</span>
|
||||
<a th:each="link : ${group.links}" th:href="${link.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${link.name}">链接</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<p th:if="${site.config['slogan'] != null}" class="footer-slogan" th:text="${site.config['slogan']}">园所寄语</p>
|
||||
<p th:if="${site.config['contact'] != null}" th:text="${site.config['contact']}">联系方式</p>
|
||||
<p th:if="${site.config['copyright'] != null}" th:text="${site.config['copyright']}">版权信息</p>
|
||||
<p th:if="${site.config['beian'] != null}" th:text="${site.config['beian']}">备案号</p>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<!-- 公共 head 片段:SEO(title/description/canonical)+ 主题资产(方案 §8.3/§8.6) -->
|
||||
<head th:fragment="head">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title th:text="${pageTitle}">页面标题</title>
|
||||
<meta name="description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}"
|
||||
th:content="${seoDescription}">
|
||||
<link rel="canonical" th:if="${canonical != null}" th:href="${canonical}">
|
||||
<!-- og 标签基本三件(C-7,方案 §8.6 canonical/og 同基准) -->
|
||||
<meta property="og:title" th:if="${pageTitle != null}" th:content="${pageTitle}">
|
||||
<meta property="og:description" th:if="${seoDescription != null and !#strings.isEmpty(seoDescription)}" th:content="${seoDescription}">
|
||||
<meta property="og:image" th:if="${ogImage != null}" th:content="${ogImage}">
|
||||
<link rel="stylesheet" th:href="${url.asset('css/main.css')}">
|
||||
<!-- 微调参数 CSS 变量覆盖(方案 §5.3):位于皮肤 CSS 之后层叠覆盖;值由服务端预构建并校验 -->
|
||||
<style th:if="${not #strings.isEmpty(themeVarsCss)}" th:utext="${themeVarsCss}"></style>
|
||||
<!-- favicon:管理端配置了 favicon 键用上传图,未配置输出主题内置兜底 icon(assets/favicon.png) -->
|
||||
<link rel="icon" type="image/png"
|
||||
th:href="${site.config['favicon'] != null ? url.upload(site.config['favicon']) : url.asset('favicon.png')}">
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 公共头部:站点名 + 栏目导航 + 站内搜索 + 专业院系下拉(院系子站切换,《院系子站方案》) -->
|
||||
<header class="site-header" th:fragment="header">
|
||||
<div class="header-inner">
|
||||
<div class="site-brand">
|
||||
<img th:if="${site.config['logo'] != null}" class="site-logo"
|
||||
th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
|
||||
<a class="site-name" th:href="${url.home()}" th:text="${site.name}">站点名称</a>
|
||||
</div>
|
||||
<form class="site-search" th:action="${url.search('', null)}" method="get">
|
||||
<input type="text" name="q" placeholder="站内搜索" aria-label="站内搜索">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
<!-- 专业院系下拉:顶层站取其子站、院系子站取兄弟站(含自身);无子站不渲染;文案经 config_json.colleges_label 覆盖 -->
|
||||
<div class="site-colleges" th:if="${!site.colleges.isEmpty()}"
|
||||
th:with="collegesLabel=${site.config['colleges_label'] ?: '专业院系'}">
|
||||
<span class="colleges-toggle">
|
||||
<a href="javascript:void(0)" th:text="${collegesLabel}">专业院系</a>
|
||||
<i class="colleges-arrow">▾</i>
|
||||
</span>
|
||||
<ul class="colleges-menu">
|
||||
<li th:each="col : ${site.colleges}" th:classappend="${col.code == site.code} ? 'active'">
|
||||
<a th:href="${url.siteHome(col.code, col.publicBaseUrl)}"
|
||||
th:title="${col.name}" th:text="${col.name}">学院名称</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="site-nav">
|
||||
<ul>
|
||||
<li th:classappend="${currentCategoryId == null} ? 'active'">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
</li>
|
||||
<li th:each="cat : ${navCategories}"
|
||||
th:classappend="${(currentCategoryId == cat.id ? 'active' : '') + (!cat.children.isEmpty() ? ' has-sub' : '')}">
|
||||
<!-- 外链栏目直接外跳;其余进栏目页(方案 §8.1) -->
|
||||
<a th:if="${cat.type == 3}" th:href="${cat.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${cat.name}">栏目</a>
|
||||
<a th:unless="${cat.type == 3}" th:href="${url.category(cat.id)}" th:text="${cat.name}">栏目</a>
|
||||
<!-- 二级下拉:悬停展开(样式见 assets/css/main.css .sub-nav) -->
|
||||
<ul class="sub-nav" th:if="${!cat.children.isEmpty()}">
|
||||
<li th:each="sub : ${cat.children}">
|
||||
<a th:if="${sub.type == 3}" th:href="${sub.linkUrl}" target="_blank" rel="noopener"
|
||||
th:text="${sub.name}">子栏目</a>
|
||||
<a th:unless="${sub.type == 3}" th:href="${url.category(sub.id)}" th:text="${sub.name}">子栏目</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</html>
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="home-main">
|
||||
<!-- 首页轮播位(cms_banner position=home;设计尺寸约定 1920×560,见 assets/css 注释) -->
|
||||
<section class="banner" th:if="${!#lists.isEmpty(banners)}">
|
||||
<div class="banner-slides">
|
||||
<a class="banner-slide" th:each="b, stat : ${banners}"
|
||||
th:classappend="${stat.first} ? 'active'"
|
||||
th:href="${b.linkUrl}" th:title="${b.title}">
|
||||
<img th:src="${b.imageUrl}" th:alt="${b.title}">
|
||||
<span class="banner-title" th:text="${b.title}">标题</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="banner-dots" th:if="${#lists.size(banners) > 1}">
|
||||
<button th:each="b, stat : ${banners}" th:classappend="${stat.first} ? 'active'"
|
||||
th:aria-label="${'第' + (stat.count) + '张'}"></button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 置顶/头条区(cms_article topmost 优先) -->
|
||||
<section class="top-strip" th:if="${!#lists.isEmpty(topArticles)}">
|
||||
<h2 class="section-title">头条推荐</h2>
|
||||
<ul>
|
||||
<li th:each="item : ${topArticles}">
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<!-- 一级栏目区块(每栏目 top 8) -->
|
||||
<section class="category-block" th:each="block : ${categoryBlocks}">
|
||||
<div class="block-head">
|
||||
<h2 th:text="${block.category.name}">栏目名</h2>
|
||||
<a class="more" th:href="${block.moreUrl}">更多 ></a>
|
||||
</div>
|
||||
<ul class="block-list" th:if="${!#lists.isEmpty(block.items)}">
|
||||
<li th:each="item : ${block.items}">
|
||||
<a th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="empty" th:if="${#lists.isEmpty(block.items)}">暂无内容</p>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="list-main">
|
||||
<nav class="breadcrumb" th:if="${searchMode != true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
<nav class="breadcrumb" th:if="${searchMode == true}">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span>搜索结果</span>
|
||||
</nav>
|
||||
|
||||
<h1 class="page-title" th:if="${searchMode != true}" th:text="${category.name}">栏目名</h1>
|
||||
<h1 class="page-title" th:if="${searchMode == true}" th:text="'搜索:' + ${q}">搜索词</h1>
|
||||
|
||||
<ul class="article-list">
|
||||
<li th:each="item : ${listData.items}">
|
||||
<a class="item-title" th:href="${url.article(item.id)}" th:text="${item.title}">文章标题</a>
|
||||
<p class="item-summary" th:if="${!#strings.isEmpty(item.summary)}" th:text="${item.summary}">摘要</p>
|
||||
<div class="item-meta">
|
||||
<time th:if="${item.publishTime != null}"
|
||||
th:text="${#temporals.format(item.publishTime, 'yyyy-MM-dd')}">2026-01-01</time>
|
||||
<span class="top-badge" th:if="${item.topmost == 1}">置顶</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="empty" th:if="${#lists.isEmpty(listData.items)}">暂无内容</p>
|
||||
|
||||
<!-- 分页(列表页/搜索页共用) -->
|
||||
<nav class="pagination" th:if="${listData.totalPages > 1}"
|
||||
th:with="cur=${listData.page}, total=${listData.totalPages}">
|
||||
<a th:if="${cur > 1}"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur - 1)} : ${url.category(listData.categoryId) + '?page=' + (cur - 1)}">上一页</a>
|
||||
<a th:each="p : ${#numbers.sequence(1, total)}"
|
||||
th:classappend="${p == cur} ? 'active'"
|
||||
th:href="${searchMode == true} ? ${url.search(q, p)} : ${url.category(listData.categoryId) + '?page=' + p}"
|
||||
th:text="${p}">1</a>
|
||||
<a th:if="${cur < total}"
|
||||
th:href="${searchMode == true} ? ${url.search(q, cur + 1)} : ${url.category(listData.categoryId) + '?page=' + (cur + 1)}">下一页</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
<script th:src="${url.asset('js/main.js')}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
|
||||
<head th:replace="~{${themeBase} + '/fragments/head' :: head}"></head>
|
||||
<body>
|
||||
<header th:replace="~{${themeBase} + '/fragments/header' :: header}"></header>
|
||||
|
||||
<main class="detail-main">
|
||||
<nav class="breadcrumb">
|
||||
<a th:href="${url.home()}">首页</a>
|
||||
<span th:text="${category.name}">栏目</span>
|
||||
</nav>
|
||||
|
||||
<article class="article">
|
||||
<h1 class="article-title" th:text="${category.name}">栏目名</h1>
|
||||
<!-- 单页栏目内容(type=2,入库前已 jsoup 清洗) -->
|
||||
<div class="article-content" th:utext="${category.content}">单页内容</div>
|
||||
<p class="empty" th:if="${#strings.isEmpty(category.content)}">暂无内容</p>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<footer th:replace="~{${themeBase} + '/fragments/footer' :: footer}"></footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"specVersion": 1,
|
||||
"name": "warm-kinder",
|
||||
"title": "幼儿园暖色",
|
||||
"version": "1.0.0",
|
||||
"author": "yunhai",
|
||||
"description": "圆角卡片 + 暖色系 + 插画头图位,适合幼儿园与托育机构(方案 §7)。",
|
||||
"screenshot": "assets/screenshot.png",
|
||||
"bannerSize": "1920x560",
|
||||
"params": [
|
||||
{ "key": "primary", "cssVar": "--primary", "label": "主色", "type": "color", "default": "#e8722a" },
|
||||
{ "key": "primaryDark", "cssVar": "--primary-dark", "label": "主色加深", "type": "color", "default": "#c25a1a" },
|
||||
{ "key": "bg", "cssVar": "--bg", "label": "页面底色", "type": "color", "default": "#fff8f0" },
|
||||
{ "key": "cardBg", "cssVar": "--card-bg", "label": "卡片底色", "type": "color", "default": "#fffdf9" },
|
||||
{ "key": "border", "cssVar": "--border", "label": "边框色", "type": "color", "default": "#f3e3d3" }
|
||||
]
|
||||
}
|
||||