[CMS-VISUAL] D1-D10 后端: 新组件数据槽(banner 扩 topic/event 位 5 列 + cms_person 新表+CRUD+防跨站)+ 6 区块类型校验与装配(空数据整块不渲染 R-44)+ 骨架新组件 fragment/内置 22 图标集/共享动效 JS(reveal+count-up R-42)+ searchStyle 搜索浮层(D-10,含坑④条件包裹修复)+ 三保留主题 4 新参数

This commit is contained in:
chenxing
2026-09-28 14:04:19 +08:00
parent 089cb54011
commit 4cb435b715
23 changed files with 1673 additions and 52 deletions
@@ -31,10 +31,19 @@
th:src="${url.upload(site.config['logo'])}" th:alt="${site.name}">
<a class="cg-site-name" th:href="${url.home()}" th:text="${site.name}">站点名称</a>
</div>
<form class="cg-site-search" th:action="${url.search('', null)}" method="get" role="search">
<!-- D-10(docs/20):searchStyle=overlay 换全屏搜索浮层;none 隐藏;inline/缺省保留原表单。
坑④:th:replace 优先级(100)先于 th:if(300)——条件必须放外层 th:block,replace 放子元素 -->
<th:block th:if="${themeParams != null and themeParams['searchStyle'] == 'overlay'}">
<th:block th:replace="~{'themes/common/fragments/search' :: overlay(${url})}" />
</th:block>
<th:block th:if="${themeParams == null or themeParams['searchStyle'] == null or themeParams['searchStyle'] == 'inline'}">
<form class="cg-site-search"
th:action="${url.search('', null)}" method="get" role="search">
<input type="text" name="q" placeholder="站内搜索" aria-label="站内搜索">
<button type="submit">搜索</button>
</form>
</th:block>
</div>
<nav class="cg-nav" aria-label="栏目导航">
@@ -8,19 +8,152 @@
"screenshot": "assets/screenshot.png",
"bannerSize": "1920x560",
"params": [
{ "key": "primary", "cssVar": "--cg-primary", "label": "主色", "type": "color", "default": "#0e8a5f" },
{ "key": "primaryDark", "cssVar": "--cg-primary-dark", "label": "主色加深", "type": "color", "default": "#0a6244" },
{ "key": "accent", "cssVar": "--cg-accent", "label": "强调色", "type": "color", "default": "#ff7a1a" },
{ "key": "text", "cssVar": "--cg-text", "label": "正文文字色", "type": "color", "default": "#2b2f33" },
{ "key": "textLight", "cssVar": "--cg-text-light", "label": "次要文字色", "type": "color", "default": "#7a8288" },
{ "key": "bg", "cssVar": "--cg-bg", "label": "页面底色", "type": "color", "default": "#f4f7f5" },
{ "key": "cardBg", "cssVar": "--cg-card-bg", "label": "卡片底色", "type": "color", "default": "#ffffff" },
{ "key": "border", "cssVar": "--cg-border", "label": "边框色", "type": "color", "default": "#e3e8e4" },
{ "key": "galleryCols", "label": "展厅每行列数", "type": "select", "default": "4",
{
"key": "primary",
"cssVar": "--cg-primary",
"label": "主色",
"type": "color",
"default": "#0e8a5f"
},
{
"key": "primaryDark",
"cssVar": "--cg-primary-dark",
"label": "主色加深",
"type": "color",
"default": "#0a6244"
},
{
"key": "accent",
"cssVar": "--cg-accent",
"label": "强调色",
"type": "color",
"default": "#ff7a1a"
},
{
"key": "text",
"cssVar": "--cg-text",
"label": "正文文字色",
"type": "color",
"default": "#2b2f33"
},
{
"key": "textLight",
"cssVar": "--cg-text-light",
"label": "次要文字色",
"type": "color",
"default": "#7a8288"
},
{
"key": "bg",
"cssVar": "--cg-bg",
"label": "页面底色",
"type": "color",
"default": "#f4f7f5"
},
{
"key": "cardBg",
"cssVar": "--cg-card-bg",
"label": "卡片底色",
"type": "color",
"default": "#ffffff"
},
{
"key": "border",
"cssVar": "--cg-border",
"label": "边框色",
"type": "color",
"default": "#e3e8e4"
},
{
"key": "galleryCols",
"label": "展厅每行列数",
"type": "select",
"default": "4",
"options": [
{ "value": "3", "label": "3 列" },
{ "value": "4", "label": "4 列" },
{ "value": "5", "label": "5 列" }
{
"value": "3",
"label": "3 列"
},
{
"value": "4",
"label": "4 列"
},
{
"value": "5",
"label": "5 列"
}
]
},
{
"key": "animation",
"label": "首页动效",
"type": "select",
"default": "on",
"options": [
{
"value": "on",
"label": "开启(滚动入场 + 数字计数)"
},
{
"value": "off",
"label": "关闭(静态呈现)"
}
]
},
{
"key": "titleStyle",
"label": "栏目标题语言",
"type": "select",
"default": "cn",
"options": [
{
"value": "cn",
"label": "仅中文"
},
{
"value": "bilingual",
"label": "中英双语(大中文 + 斜体英文副题)"
}
]
},
{
"key": "iconShape",
"label": "图标形状语言",
"type": "select",
"default": "circle",
"options": [
{
"value": "circle",
"label": "圆形徽章"
},
{
"value": "hexagon",
"label": "六边形"
},
{
"value": "square",
"label": "圆角方形"
}
]
},
{
"key": "searchStyle",
"label": "门户搜索样式",
"type": "select",
"default": "inline",
"options": [
{
"value": "none",
"label": "不显示搜索"
},
{
"value": "inline",
"label": "通栏搜索条(banner 下方白色大搜索条)"
},
{
"value": "overlay",
"label": "全屏搜索浮层(右上放大镜唤起)"
}
]
}
]