feat(admin): replicate reference post-page settings page 1:1

- rewrite post_list.page schema (JS+PHP 2.0.0) with the reference field set:
  three cover types with option fieldsets (image 20-200% / slide CFS_Module::slide
  full config with nested dependsOn / video 0-200%), hide-time, p_indent,
  breadcrumbs (home-text as switcher), prevnext, authordesc, maxheight slider,
  yiyan block, copyright, button toptext, front/after content, related posts
- migrate share_s to share page basic group and post_rewards_* to users
  features rewards group (runtime keys unchanged)
- remap get_post_page_settings() to reference keys, normalize slide cover
  option, hardcode non-reference runtime flags (reading progress, favorites,
  author card), drop dual-path legacy aliases
- wire slide option into aksrt_render_slider (effect/direction/spaceBetween/
  speed/interval/loop/autoplay/nav/pagination, scale vs fixed-height modes),
  clamp image scale 20-200 and video scale 0-200 with 16:9 fallback,
  wire p_indent container class + CSS, resync frontend-tags fallback and
  FacadeBulk fallback, remap PostMetaBox cover keys
- add post-page reference contract test; update stale cover-height and
  user-features contract tests

Validation: node --test 464/464 pass, audit-admin-contracts errors=0,
vite build ok, build-public-assets ok, php -l clean.
This commit is contained in:
kate522 committed 2026-09-24 16:13:00 +08:00
1 parent a8060fa71d
commit 66f8bb933d
17 files changed
+797 -267

No files matched your search

@@ -25,10 +25,16 @@ test('single cover: image mode keeps the calc(scale% + 50px) height', () => {
});
test('single cover: video mode uses the bare ratio height like the reference dplayer box', () => {
// 参考主题 article_video_cover_option.scale:0-200,0 = 不固定长宽比 → 16:9 回退。
assert.match(
singleRender,
/single-cover--video imgbox-container" style="padding-bottom:<\?php echo esc_attr\(\(string\) \$video_scale\); \?>%;"/,
'视频封面必须输出裸 video_scale% 高度(标题在下方 footer,无叠加补偿)'
/\$video_padding = \$video_scale > 0 \? \(string\) \$video_scale : '56\.25';/,
'视频封面 scale=0 必须回退 16:9(56.25%),非 0 输出裸比例'
);
assert.match(
singleRender,
/single-cover--video imgbox-container" style="padding-bottom:<\?php echo esc_attr\(\$video_padding\); \?>%;"/,
'视频封面必须输出裸比例高度(标题在下方 footer,无叠加补偿)'
);
// +50px 是标题叠加封面的补偿量,仅单图/多图封面适用;视频封面
// 对齐参考主题 .dplayer-scale-height,不得继承该公式。
@@ -40,10 +46,17 @@ test('single cover: video mode uses the bare ratio height like the reference dpl
});
test('single cover: slide mode reserves the same +50px via the slider helper', () => {
// 比例高度模式(scale_height 关闭分支)向 slider helper 传 scale_extra=50px;
// 固定高度模式(scale_height 开启分支)改用参考主题 pc/m_height 定高。
assert.match(
singleRender,
/'scale_extra'\s*=>\s*'50px'/,
'多图封面必须向 aksrt_render_slider 传入 scale_extra=50px'
/\$slider_args\['scale_extra'\] = '50px';/,
'比例高度分支必须向 aksrt_render_slider 传 scale_extra=50px'
);
assert.match(
singleRender,
/\$slider_args\['pc_height'\] = \(\(int\) \(\$slide_option\['pc_height'\] \?\? 380\)\) \. 'px';/,
'固定高度分支必须使用参考主题 pc_height 定高'
);
assert.match(
sliderHelper,