fix(single): close remaining live gaps vs Zibll demo
Align runtime --sidebar-width (300→311), --main-radius, and body.nav-fixed 88px reserve; enqueue single-post CSS parts directly; match Zibll action buttons and author avatar DOM; tighten dual-column tokens after comparing blog.rutua.cn with demo.zibll.com.
This commit is contained in:
@@ -192,6 +192,32 @@ trait AKSRT_Scripts_Part_1b {
|
||||
|
||||
// 单篇文章:所有 single 相关样式
|
||||
if ($is_single_post) {
|
||||
// Prefer discrete enqueues over CSS @import (cache-bust + parallel load).
|
||||
$single_parts = [
|
||||
'zibll-utilities',
|
||||
'single-post/shell',
|
||||
'single-post/content',
|
||||
'single-post/code-blocks',
|
||||
'single-post/navigation',
|
||||
'single-post/cover',
|
||||
'single-post/author-actions',
|
||||
'single-post/related-toc',
|
||||
'single-post/hidden-content',
|
||||
];
|
||||
$single_dep = $deps[0] ?? $core_dep;
|
||||
foreach ($single_parts as $part) {
|
||||
$path = get_template_directory() . '/assets/css/frontend/' . $part . '.css';
|
||||
if (!file_exists($path)) {
|
||||
continue;
|
||||
}
|
||||
wp_enqueue_style(
|
||||
'aksrt-' . str_replace('/', '-', $part),
|
||||
$base_uri . '/assets/css/frontend/' . $part . '.css',
|
||||
is_string($single_dep) ? [$single_dep] : (array) $deps,
|
||||
filemtime($path) ?: $version
|
||||
);
|
||||
}
|
||||
// Keep aggregator handle for any third-party deps that target it.
|
||||
$enqueue_module('single-post');
|
||||
$enqueue_module('post-card'); // 相关推荐使用 post-card 局部样式
|
||||
$enqueue_module('comments');
|
||||
|
||||
Reference in New Issue
Block a user