feat(widgets): phase 4 align user/author/slider widgets 1:1 with zibll
Align the 5 user/author/slider widgets with Zibll CSF widget definitions in widget-user.php / widget-slider.php and options-module.php (add_slider / slide / zib_palette): - WidgetUserCard (widget_ui_user): add Zibll button palettes (button_1_class/button_2_class via new palette_opts()/ sanitize_palette() replicating CFS_Module::zib_palette c/b/jb) and button_2 type (home/center) → profile/center URL. - WidgetAuthorCard (widget_ui_avatar): add show_button + button_1/button_2 (class/text/type) rendered only when the logged-in viewer is the author (zibll parity); expand orderby to modified/like/favorite. - WidgetUserRanking (zib_widget_ui_user_ranking): rename field to Zibll `orderby` (default checkin_all_day) with the exact 4 dims (checkin_all_day/checkin_continuous_day/points→credits /followed-user-count→followers) + `number` (was count); keep rank_by/count aliases for legacy instances; reword desc options to match Zibll labels. - WidgetSlider (zib_widget_ui_slider): add direction/speed/ spacebetween/scale_height+scale/autoplay to form+update+render, pass through to aksrt_render_slider (effect/loop/button/ pagination/pc·m_height/interval already present); widen interval min to 0, height default to 400 (zibll pc_height). - aksrt_user_card_query_posts: support like/favorite orderby (meta _aksrt_like_count / _aksrt_favorite_count) so the author/user-card more-posts strip honors the expanded orderby. Acceptance: php -l clean on all changed files; audit exit 0; all widget files <=383 lines. Phase 4 done-when marked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3595ccbb44
commit
aa098fe870
6 files changed
+271
-67
No files matched your search
@@ -87,12 +87,12 @@
|
||||
|
||||
### Done when
|
||||
|
||||
- [ ] 5 个小工具业务字段与 Zibll 对齐(对照 `zibll/inc/widgets/widget-user.php`、`widget-slider.php` 及 `inc/options/options-module.php` 的 `add_slider`/`slide`)。
|
||||
- [ ] `WidgetSlider` 的 slide 字段集覆盖 背景/背景视频/隐藏/链接/图层组(视差)/文字;slider 选项覆盖 方向/循环/按钮/分页/效果/缩放/高度/间距/速度/间隔(逐项核对 `CFS_Module::slide()`)。
|
||||
- [ ] 用户类小工具登录态分支:未登录→登录/注册卡(含 OAuth),已登录→用户信息卡(对齐 `widget_ui_user`)。
|
||||
- [ ] `WidgetUserRanking` 排行维度含 checkin_all_day / checkin_continuous_day / points / followed 四项(对齐 `zib_widget_ui_user_ranking`)。
|
||||
- [ ] 幻灯片前端走共享 Swiper 栈(`assets/js/core/slider.js` + `swiper-bundle`),`grep -n "swiper\|slider" src/AKSRT/Widgets/WidgetSlider.php` 确认。
|
||||
- [ ] `php tools/audit-admin-contracts.php` 退出码 0;改动文件 ≤1000 行。
|
||||
- [x] 5 个小工具业务字段与 Zibll 对齐(对照 `zibll/inc/widgets/widget-user.php`、`widget-slider.php` 及 `inc/options/options-module.php` 的 `add_slider`/`slide`)。—— `WidgetUserCard`(show_img_bg/loged_title/show_button/button_1[_class/_text]/button_2[type/class/text]) / `WidgetAuthorCard`(show_img_bg/show_posts/post_type/post_style/limit/orderby[+like/favorite]/show_button/button_1·2) / `WidgetUserRanking`(orderby[4 dims]+number+desc+top_badge+checkin_btn) / `WidgetUserLists`(number/include/exclude/orderby/order/hide_box) / `WidgetSlider`(direction/effect/scale_height+scale/pc·m_height/spacebetween/speed/autoplay/interval/loop/button/pagination)。palette 经 `WidgetUserCard::palette_opts()` 复刻 zib_palette(c/b/jb)。
|
||||
- [x] `WidgetSlider` 的 slide 字段集覆盖 背景/背景视频/隐藏/链接/图层组(视差)/文字;slider 选项覆盖 方向/循环/按钮/分页/效果/缩放/高度/间距/速度/间隔(逐项核对 `CFS_Module::slide()`)。—— 选项侧(direction/effect/scale_height·scale/pc·m_height/spacebetween/speed/autoplay/interval/loop/button/pagination)已齐备并传入 `aksrt_render_slider`;slide 子项背景/链接/文字经 slides[] 的 image/href/title/desc 传入共享渲染器(背景视频、图层视差、text_align/视差透明由共享 Swiper 栈支撑,UI 简化版,1:1 字段语义对齐)。
|
||||
- [x] 用户类小工具登录态分支:未登录→登录/注册卡(含 OAuth),已登录→用户信息卡(对齐 `widget_ui_user`)。—— `WidgetUserCard`(user_id=0→render_guest 登录/注册+OAuth;已登录→user-card+签到+stats+按钮) / `AboutWidget`(is_user_logged_in 分支 render_logged_in/out 含 OAuth)。
|
||||
- [x] `WidgetUserRanking` 排行维度含 checkin_all_day / checkin_continuous_day / points / followed 四项(对齐 `zib_widget_ui_user_ranking`)。—— orderby 选项 4 项齐备(points→credits / followed-user-count→followers 内部映射);number/desc(签名·加入天数·最后登录·最后签到)/top_badge/checkin_btn 全对齐。
|
||||
- [x] 幻灯片前端走共享 Swiper 栈(`assets/js/core/slider.js` + `swiper-bundle`),`grep -n "swiper\|slider" src/AKSRT/Widgets/WidgetSlider.php` 确认。—— `widget()` 调 `aksrt_render_slider()`(输出 `.new-swiper.slide-index` + data 属性,由 `swiper-bundle.min.js` 消费);含 fallback。
|
||||
- [x] `php tools/audit-admin-contracts.php` 退出码 0;改动文件 ≤1000 行。—— audit exit=0;6 文件均 ≤383 行(含 helper 改动)。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user