用户公开主页全局采用DOM无刷新加载

This commit is contained in:
kate522 committed 2026-08-23 14:55:24 +08:00
1 parent c3f66e9a14
commit bb9a410ad6
14 files changed
+569 -231

No files matched your search

+9 -3
View File
@@ -48,7 +48,7 @@ require_once AKSRT_DIR . '/templates/parts/user-shared-helpers.php';
]);
?>
<div class="dashboard dashboard--public" data-default-tab="<?php echo esc_attr($default_tab); ?>">
<div class="dashboard dashboard--public" data-default-tab="<?php echo esc_attr($default_tab); ?>" data-user-id="<?php echo (int) $user_id; ?>">
<div class="dashboard-tabs" role="tablist">
<?php foreach ($enabled_tabs as $tab_key) :
$tab_class = $tab_key === $active_tab ? 'is-active' : '';
@@ -68,9 +68,15 @@ require_once AKSRT_DIR . '/templates/parts/user-shared-helpers.php';
</div>
<?php
get_template_part('templates/parts/user-home/panels', 'core', $ctx);
get_template_part('templates/parts/user-home/panel', 'follow', $ctx);
foreach ($enabled_tabs as $panel_tab) :
if (!locate_template(['templates/parts/user-home/panel-' . $panel_tab . '.php'], false, false)) {
continue;
}
?>
<div id="panel-<?php echo esc_attr($panel_tab); ?>" class="dashboard-panel<?php echo $panel_tab === $active_tab ? ' is-active' : ''; ?>" role="tabpanel"<?php echo $panel_tab !== $active_tab ? ' hidden' : ''; ?>>
<?php get_template_part('templates/parts/user-home/panel', $panel_tab, $ctx); ?>
</div>
<?php endforeach; ?>
</div>
</div>
</div>