feat(forum): add the reference forum widgets
Port the six forum widgets from the reference theme: posts list, multi-tab posts, plate list (default and card), plate info, moderator list and topic list. They join the schema widget catalog under a forum group that stays hidden while the forum module is off, reuse the shared forum cards, paginate through the widget REST client contract, and pull the forum stylesheet/runtime onto any sidebar that hosts them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
376827ea97
commit
eceddb5f7d
12 files changed
+724
-13
No files matched your search
@@ -256,3 +256,29 @@ body.dark-theme .jio-forum__dialog{background:var(--main-bg-color);color:var(--k
|
||||
body.dark-theme .jio-forum__dialog input,body.dark-theme .jio-forum__dialog select,body.dark-theme .jio-forum__dialog textarea{background:var(--main-bg-color);color:var(--key-color);border-color:var(--muted-4-color)}
|
||||
body.dark-theme #forum .jio-forum__action{color:var(--forum-muted)}
|
||||
body.dark-theme .panel.panel-plate,body.dark-theme .plate-lists .plate-item,body.dark-theme .forum-posts.alone,body.dark-theme .scroll-plate .plate-card{background:var(--main-bg-color)}
|
||||
|
||||
/* ── 论坛小工具(任意侧栏 / 全宽区域) ─────────────────────────── */
|
||||
.forum-header{box-shadow:0 0 10px var(--main-shadow);border-radius:var(--main-radius);position:relative;background:var(--main-bg-color)}
|
||||
.forum-header .header-content{padding:70px 50px 50px;background:var(--main-bg-color);border-radius:var(--main-radius)}
|
||||
.forum-header .plate-thumb{width:115px;height:115px;margin-left:auto;margin-right:auto}
|
||||
.forum-header .plate-thumb > img{border-radius:4px}
|
||||
.forum-header .count-mates{margin-top:10px}
|
||||
.forum-header .count-mates item{display:inline-block}
|
||||
.forum-header .count-mates > item + item{border-left:1px solid var(--main-border-color);padding-left:20px;margin-left:20px}
|
||||
.forum-header .img-badge.top{right:auto;left:1.2em}
|
||||
.plate-info-sidebar .header-content{padding:55px 20px 25px}
|
||||
.plate-info-sidebar .follow-info{background:var(--main-border-color);box-shadow:none;color:var(--focus-color);padding:6px 12px;margin-top:38px;opacity:.9}
|
||||
.jio-widget-box.moderator-box{padding:15px}
|
||||
.moderator-box .user-info + .user-info{border-top:1px solid var(--main-border-color)}
|
||||
.moderator-box .avatar-img img{width:100%;height:100%;border-radius:100px}
|
||||
.topic-item{transition:.2s;border-radius:var(--main-radius)}
|
||||
.topic-item:hover{background:var(--muted-border-color)}
|
||||
.topic-item .term-title{font-size:15px;font-weight:600}
|
||||
.topic-item .desc span{margin-right:10px}
|
||||
.jio-widget-box .widget-ajaxpager .forum-posts + .forum-posts{border-top:1px solid var(--main-border-color)}
|
||||
@media (max-width:640px){
|
||||
.forum-header .header-content{padding:60px 15px 30px}
|
||||
.forum-header .plate-thumb{width:105px;height:105px}
|
||||
.forum-header .count-mates > item + item{padding-left:15px;margin-left:15px}
|
||||
}
|
||||
body.dark-theme .forum-header,body.dark-theme .forum-header .header-content{background:var(--main-bg-color)}
|
||||
@@ -1,6 +1,8 @@
|
||||
(() => {
|
||||
const config = window.jioForum || {}
|
||||
const root = document.getElementById('forum')
|
||||
// 论坛路由根节点是 #forum;论坛小工具放在任意侧栏时没有该节点,
|
||||
// 此时把委托挂到 body,让 follow / apply 等小工具按钮共用同一套动作。
|
||||
const root = document.getElementById('forum') || document.body
|
||||
if (!root) return
|
||||
|
||||
const send = async (path, method = 'GET', data = {}, idempotencyKey = '') => {
|
||||
|
||||
Reference in new issue
Block a user