Align forum shop and user page shells
This commit is contained in:
1 parent
4043de2473
commit
1284ebc63e
14 files changed
+348
-44
No files matched your search
@@ -47,9 +47,12 @@ $name_sticky = __('置顶', 'aksrt');
|
||||
$name_featured = __('精华', 'aksrt');
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main container" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
|
||||
<div class="aksrt-forum-board container">
|
||||
<div class="aksrt-forum-board__hero">
|
||||
<div class="aksrt-forum-board__header">
|
||||
<div class="aksrt-forum-board__info">
|
||||
<h1 class="aksrt-forum-board__title"><?php echo esc_html((string) ($board_data['name'] ?? '')); ?></h1>
|
||||
@@ -84,8 +87,26 @@ $name_featured = __('精华', 'aksrt');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="aksrt-forum-board__governance">
|
||||
<div class="aksrt-forum-board__governance-card">
|
||||
<div class="aksrt-forum-board__summary">
|
||||
<div class="aksrt-forum-board__summary-item">
|
||||
<span class="aksrt-forum-board__summary-label"><?php echo esc_html($name_topic); ?></span>
|
||||
<strong><?php echo esc_html(number_format_i18n((int) ($board_data['topic_count'] ?? 0))); ?></strong>
|
||||
</div>
|
||||
<div class="aksrt-forum-board__summary-item">
|
||||
<span class="aksrt-forum-board__summary-label"><?php echo esc_html($name_reply); ?></span>
|
||||
<strong><?php echo esc_html(number_format_i18n((int) ($board_data['reply_count'] ?? 0))); ?></strong>
|
||||
</div>
|
||||
<div class="aksrt-forum-board__summary-item">
|
||||
<span class="aksrt-forum-board__summary-label"><?php esc_html_e('版主', 'aksrt'); ?></span>
|
||||
<strong><?php echo esc_html(number_format_i18n(count($moderators))); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-layout<?php echo empty($moderators) && empty($application) && empty($permissions['can_moderate']) ? ' content-layout--no-sidebar' : ''; ?> aksrt-forum-board__layout">
|
||||
<div class="content-layout__primary">
|
||||
<section class="aksrt-forum-board__governance aksrt-forum-board__governance--inline">
|
||||
<div class="aksrt-forum-board__governance-card">
|
||||
<h2 class="aksrt-forum-board__section-title"><?php esc_html_e('权限反馈', 'aksrt'); ?></h2>
|
||||
<?php if (!is_user_logged_in()) : ?>
|
||||
<p><?php esc_html_e('登录后可以发帖、申请版主,并在有权限时执行治理动作。', 'aksrt'); ?></p>
|
||||
@@ -138,8 +159,8 @@ $name_featured = __('精华', 'aksrt');
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<?php if (!empty($sticky_topics)) : ?>
|
||||
<div class="aksrt-forum-board__sticky">
|
||||
@@ -290,6 +311,30 @@ $name_featured = __('精华', 'aksrt');
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<aside class="content-layout__sidebar aksrt-forum-board__sidebar">
|
||||
<div class="aksrt-forum-board__governance-card aksrt-forum-board__governance-card--sidebar">
|
||||
<h2 class="aksrt-forum-board__section-title"><?php esc_html_e('版块说明', 'aksrt'); ?></h2>
|
||||
<p><?php echo esc_html((string) ($board_data['description'] ?? __('这里展示版块简介、讨论方向与基础规则。', 'aksrt'))); ?></p>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($moderators)) : ?>
|
||||
<div class="aksrt-forum-board__governance-card aksrt-forum-board__governance-card--sidebar">
|
||||
<h2 class="aksrt-forum-board__section-title"><?php esc_html_e('版主团队', 'aksrt'); ?></h2>
|
||||
<div class="aksrt-forum-board__moderators aksrt-forum-board__moderators--stacked">
|
||||
<?php foreach ($moderators as $moderator) : ?>
|
||||
<div class="aksrt-forum-board__moderator">
|
||||
<?php if (!empty($moderator['avatar_url'])) : ?>
|
||||
<img src="<?php echo esc_url((string) $moderator['avatar_url']); ?>" alt="" width="36" height="36">
|
||||
<?php endif; ?>
|
||||
<span><?php echo esc_html((string) ($moderator['display_name'] ?? '')); ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -109,7 +109,9 @@ $is_locked = !empty($topic['locked']);
|
||||
$comments_enabled = !empty($permissions['can_reply']);
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main container" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
|
||||
<div class="aksrt-forum-topic container">
|
||||
<?php if ($show_breadcrumbs) : ?>
|
||||
@@ -126,6 +128,7 @@ $comments_enabled = !empty($permissions['can_reply']);
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="aksrt-forum-topic__shell">
|
||||
<header class="aksrt-forum-topic__header">
|
||||
<div class="aksrt-forum-topic__header-top">
|
||||
<h1 class="aksrt-forum-topic__title">
|
||||
@@ -152,6 +155,10 @@ $comments_enabled = !empty($permissions['can_reply']);
|
||||
</h1>
|
||||
|
||||
<div class="aksrt-forum-topic__meta">
|
||||
<span class="aksrt-forum-topic__board-link-wrap">
|
||||
<i class="fas fa-layer-group"></i>
|
||||
<a class="aksrt-forum-topic__board-link" href="<?php echo esc_url((string) ($board['url'] ?? home_url('/forums/'))); ?>"><?php echo esc_html((string) ($board['name'] ?? $bc_forum_name)); ?></a>
|
||||
</span>
|
||||
<span class="aksrt-forum-topic__author">
|
||||
<?php if (!empty($topic['author']['avatar_url'])) : ?>
|
||||
<img src="<?php echo esc_url((string) $topic['author']['avatar_url']); ?>" alt="" width="24" height="24">
|
||||
@@ -173,6 +180,10 @@ $comments_enabled = !empty($permissions['can_reply']);
|
||||
</div>
|
||||
|
||||
<div class="aksrt-forum-topic__quick-actions">
|
||||
<a class="aksrt-forum-topic__quick-action aksrt-forum-topic__quick-action--primary" href="#aksrt-forum-replies">
|
||||
<i class="fas fa-reply"></i>
|
||||
<?php esc_html_e('参与讨论', 'aksrt'); ?>
|
||||
</a>
|
||||
<?php if (is_user_logged_in()) : ?>
|
||||
<button type="button" class="aksrt-forum-topic__quick-action js-aksrt-report-trigger"
|
||||
data-target-type="post"
|
||||
@@ -208,6 +219,33 @@ $comments_enabled = !empty($permissions['can_reply']);
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<aside class="aksrt-forum-topic__sidebar">
|
||||
<?php if ($board) : ?>
|
||||
<section class="aksrt-forum-topic__sidebar-card aksrt-forum-topic__sidebar-card--board">
|
||||
<h2><?php esc_html_e('所属版块', 'aksrt'); ?></h2>
|
||||
<a class="aksrt-forum-topic__sidebar-link" href="<?php echo esc_url((string) ($board['url'] ?? '#')); ?>">
|
||||
<strong><?php echo esc_html((string) ($board['name'] ?? '')); ?></strong>
|
||||
<?php if (!empty($board['description'])) : ?>
|
||||
<span><?php echo esc_html((string) $board['description']); ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="aksrt-forum-topic__sidebar-card aksrt-forum-topic__sidebar-card--author">
|
||||
<h2><?php esc_html_e('作者信息', 'aksrt'); ?></h2>
|
||||
<div class="aksrt-forum-topic__sidebar-author">
|
||||
<?php if (!empty($topic['author']['avatar_url'])) : ?>
|
||||
<img src="<?php echo esc_url((string) $topic['author']['avatar_url']); ?>" alt="" width="48" height="48">
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<strong><?php echo esc_html((string) ($topic['author']['display_name'] ?? '')); ?></strong>
|
||||
<span><?php echo esc_html((string) ($topic['date'] ?? '')); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</aside>
|
||||
|
||||
<div class="aksrt-forum-report-modal" id="aksrt-report-modal" hidden>
|
||||
<div class="aksrt-forum-report-modal__backdrop js-aksrt-report-close"></div>
|
||||
<div class="aksrt-forum-report-modal__dialog" role="dialog" aria-modal="true" aria-labelledby="aksrt-report-title">
|
||||
|
||||
Reference in new issue
Block a user