Files
YschcmsService/src/main/resources/templates/themes/classic-red/README.md
T
2026-09-07 09:09:39 +08:00

1.3 KiB
Raw Blame History

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 分支布局)。