diff --git a/assets/css/frontend/forum.css b/assets/css/frontend/forum.css index 7f126d62..39cdf2f1 100644 --- a/assets/css/frontend/forum.css +++ b/assets/css/frontend/forum.css @@ -2,3 +2,31 @@ @import url("forum/topic.css"); @import url("forum/compose.css"); @import url("forum/extras.css"); + + +/* Forum home shell: sidebar compose CTA */ +.aksrt-forum-sidebar-card--compose { + padding: 12px; +} +.aksrt-forum-sidebar-card--compose .aksrt-forum-quick-post__input { + display: flex; + align-items: center; + gap: 10px; + width: 100%; + padding: 10px 12px; + border-radius: 10px; + background: var(--body-bg-color, #f5f6f7); + color: var(--muted-color, #777); + text-decoration: none; +} +.aksrt-forum-sidebar-card--compose .aksrt-forum-quick-post__input:hover { + color: var(--focus-color, #f04494); +} +.aksrt-forum-sidebar-card--compose .aksrt-forum-header__action { + display: inline-flex; + width: 100%; + justify-content: center; +} +.aksrt-forum-header__stats { + display: none; /* stats demoted on home shell; counts remain in eyebrow meta */ +} diff --git a/templates/pages/page-forums.php b/templates/pages/page-forums.php index e5014eae..0ea6fecc 100644 --- a/templates/pages/page-forums.php +++ b/templates/pages/page-forums.php @@ -3,7 +3,7 @@ * Template Name: AKSRT - Forums * Template Post Type: page * - * §7.10 — Tab engine + quick post + plate grid + follow/synthesis/pending streams. + * §7.10 / stream-h §3 — 主站社区首页:公开 tabs + 侧栏发帖/热门,pending 不进公开主内容。 * * @package AKSRT */ @@ -57,6 +57,32 @@ if ($active_tab_type === '' && isset($home_tabs[$active_index])) { if ($active_tab_type === '') { $active_tab_type = 'synthesis'; } + +// 前台公开主 tabs 不允许 pending;未登录时 follow 回落到综合 +$can_manage = !empty($permissions['can_manage']); +if ($active_tab_type === 'pending') { + $active_tab_type = 'synthesis'; +} +if ($active_tab_type === 'follow' && $current_user_id <= 0) { + $active_tab_type = 'synthesis'; +} + +// 配置里的 pending 类型从公开 tab 列表剔除(治理入口单独渲染) +$public_home_tabs = []; +foreach ((array) $home_tabs as $tab_row) { + $tt = sanitize_key((string) ($tab_row['type'] ?? '')); + if ($tt === '' || $tt === 'pending') { + continue; + } + $public_home_tabs[] = $tab_row; +} +if (empty($public_home_tabs)) { + $public_home_tabs = [ + ['type' => 'synthesis', 'label' => __('综合', 'aksrt')], + ['type' => 'follow', 'label' => __('关注', 'aksrt')], + ['type' => 'plate', 'label' => $name_plate], + ]; +} ?>
@@ -77,42 +103,16 @@ if ($active_tab_type === '') {
- + - - - - - - - - + + +
- -
-
- - -
-
- - -
-
- - -
- 0 && !empty($permissions['can_manage'])) : ?> -
- - -
- -
@@ -128,26 +128,25 @@ if ($active_tab_type === '') {
- -
- - - - -
- - - +
- - get_pending_stream($current_user_id) : ['items' => []]; - if (!empty($pending_data['items'])) : ?> -
- render_topic_row($topic); } ?> -
- -
- -

-
- - - +