feat(widgets): replicate 12 reference widgets for full Zibll parity
- rewrite schemas for posts, tab_posts, oneline_posts, hot_posts, term_cards, term_aggregation, media_cards, combo_info, partners, recent_comments, posts_toc and slider_media_combo to mirror the modern reference modules field by field (options, defaults, dependencies, min/max/step, subheadings) - port reference renderers: hot ranking with TOP badges, category aggregation card, graphic cover cards, partners CSS marquee, combo info cards with auto band palette, recent comment list - rename 分类与标签聚合卡片 to 分类聚合卡片 and restrict it to categories (no tags/topics branch in this project) - drop topics filter fields and the topics query branch; align orderby value domain with supported post meta - add searchable sortable terms admin field type and spinner unit suffix rendering - unify widget pagination and lazy loading on the REST client with the runtime-owned ias reveal trigger; remove the legacy post_ajax_trigger dual path - align section-navs TOC with the reference contract (wznav ids, 3-heading minimum, zib-widget box)
This commit is contained in:
@@ -30,13 +30,13 @@ final class WidgetCatalog {
|
||||
['notice', '上下滚动公告', '自动滚动的公告信息列表', 'wide'],
|
||||
],
|
||||
'content' => [
|
||||
['term_cards', '分类图文卡片', '将分类或标签显示为图文卡片', 'wide'],
|
||||
['term_aggregation', '分类与标签聚合卡片', '聚合分类、标签与文章内容', 'wide'],
|
||||
['hot_posts', '热榜文章', '按浏览、评论、收藏等维度排行', 'sidebar'],
|
||||
['term_cards', '分类图文卡片', '将分类显示为图文卡片', 'wide'],
|
||||
['term_aggregation', '分类聚合卡片', '将分类显示为图文聚合卡片,并附带最新文章列表', 'wide'],
|
||||
['hot_posts', '热榜文章', '按浏览、点赞、评论、收藏等维度生成榜单', 'sidebar'],
|
||||
['post_pay', '付费购买', '显示当前文章的知识付费购买模块', 'sidebar'],
|
||||
['posts', '文章列表', '多条件筛选和多样式文章列表', 'wide'],
|
||||
['posts', '文章列表', '通过各种筛选、排序显示文章列表,支持多种显示模式', 'wide'],
|
||||
['tab_posts', '多栏目文章(新)', '通过多个栏目切换文章列表', 'wide'],
|
||||
['oneline_posts', '横向滚动文章', '单行横向滚动文章列表', 'wide'],
|
||||
['oneline_posts', '横向滚动文章', '显示文章列表,只显示一行,左右滚动', 'wide'],
|
||||
],
|
||||
'knowledge_product' => [
|
||||
['pricing_plans', '知识产品方案卡片', '课程与会员方案价格、权益和购买入口', 'wide'],
|
||||
@@ -49,7 +49,7 @@ final class WidgetCatalog {
|
||||
],
|
||||
'slider' => [
|
||||
['slider', '幻灯片(新)', '支持图片、视频、文字和视差图层', 'wide'],
|
||||
['slider_media_combo', '幻灯片加图文视频卡片', '幻灯片与图文视频卡片组合布局', 'wide'],
|
||||
['slider_media_combo', '幻灯片加图文视频卡片', '左侧幻灯片与右侧图文视频封面卡片横向组合展示', 'wide'],
|
||||
],
|
||||
'user' => [
|
||||
['user_card', '用户个人信息', '未登录时候显示登录注册按钮,登录后显示登录用户的个人信息', 'sidebar'],
|
||||
@@ -70,9 +70,9 @@ final class WidgetCatalog {
|
||||
'renderer' => $slug,
|
||||
'size' => $size,
|
||||
'common' => [
|
||||
'title' => !in_array($slug, ['post_pay', 'layout_gap', 'slider', 'slider_media_combo', 'buttons'], true),
|
||||
'affix' => $size === 'sidebar' || in_array($slug, ['buttons', 'notice'], true),
|
||||
'animation' => $slug !== 'buttons',
|
||||
'title' => !in_array($slug, ['post_pay', 'layout_gap', 'slider', 'slider_media_combo', 'buttons', 'posts_toc'], true),
|
||||
'affix' => ($size === 'sidebar' && $slug !== 'posts_toc') || in_array($slug, ['buttons', 'notice'], true),
|
||||
'animation' => !in_array($slug, ['buttons', 'term_cards', 'term_aggregation', 'media_cards', 'combo_info', 'slider_media_combo'], true),
|
||||
],
|
||||
'fields' => WidgetSchemas::for($slug),
|
||||
'assets' => self::assets($slug),
|
||||
|
||||
Reference in New Issue
Block a user