fix(frontend): unbreak single post layout cascade
Disable the global 2-col .content-layout grid on single pages (it was tiling breadcrumb/article/author/related/comments left-right), add the missing Zibll utility bridge used by the author/meta bar, and replace nonstandard <name>/<item>/<badge> tags in the single surface.
This commit is contained in:
1 parent
ffd3d0f6c5
commit
db361fcc3f
7 files changed
+169
-16
No files matched your search
@@ -73,13 +73,13 @@ if (!function_exists('aksrt_get_posts_meta_items_html')) :
|
||||
? 'javascript:(typeof scrollTopTo===\'function\'?scrollTopTo(\'#comments\'):void(0));'
|
||||
: get_comments_link($post_id);
|
||||
$count = (int) get_comments_number($post_id);
|
||||
$html .= '<item class="meta-comm"><a rel="nofollow" href="' . esc_attr($href) . '" title="' . esc_attr__('去评论', 'aksrt') . '">'
|
||||
. '<i class="fa fa-comment-o" aria-hidden="true"></i> ' . esc_html((string) $count) . '</a></item>';
|
||||
$html .= '<span class="item meta-comm"><a rel="nofollow" href="' . esc_attr($href) . '" title="' . esc_attr__('去评论', 'aksrt') . '">'
|
||||
. '<i class="fa fa-comment-o" aria-hidden="true"></i> ' . esc_html((string) $count) . '</a></span>';
|
||||
}
|
||||
|
||||
$views = function_exists('aksrt_get_post_views') ? (int) aksrt_get_post_views($post_id) : 0;
|
||||
$views_label = function_exists('aksrt_format_number') ? aksrt_format_number($views) : number_format_i18n($views);
|
||||
$html .= '<item class="meta-view"><i class="fa fa-eye" aria-hidden="true"></i> ' . esc_html((string) $views_label) . '</item>';
|
||||
$html .= '<span class="item meta-view"><i class="fa fa-eye" aria-hidden="true"></i> ' . esc_html((string) $views_label) . '</span>';
|
||||
|
||||
$like_on = true;
|
||||
if (class_exists('AKSRT_Settings')) {
|
||||
@@ -88,7 +88,7 @@ if (!function_exists('aksrt_get_posts_meta_items_html')) :
|
||||
}
|
||||
if ($like_on && $post->post_type === 'post') {
|
||||
$likes = function_exists('aksrt_get_post_likes') ? (int) aksrt_get_post_likes($post_id) : 0;
|
||||
$html .= '<item class="meta-like"><i class="fa fa-heart-o" aria-hidden="true"></i> ' . esc_html((string) $likes) . '</item>';
|
||||
$html .= '<span class="item meta-like"><i class="fa fa-heart-o" aria-hidden="true"></i> ' . esc_html((string) $likes) . '</span>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
@@ -154,8 +154,8 @@ if (!function_exists('aksrt_get_post_status_badge')) :
|
||||
if (!isset($map[$status])) {
|
||||
return '';
|
||||
}
|
||||
return '<badge class="img-badge right ' . esc_attr($map[$status]['class']) . '">'
|
||||
. esc_html($map[$status]['label']) . '</badge>';
|
||||
return '<span class="badge img-badge right ' . esc_attr($map[$status]['class']) . '">'
|
||||
. esc_html($map[$status]['label']) . '</span>';
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -504,8 +504,8 @@ if (!function_exists('aksrt_render_related_graphic_card')) :
|
||||
$html .= '<img ' . $img_attrs . ' alt="' . esc_attr($title) . '">';
|
||||
$html .= '<div class="abs-center left-bottom graphic-text">';
|
||||
$html .= '<div class="text1 text-ellipsis">' . esc_html($title) . '</div>';
|
||||
$html .= '<div class="text3 muted-2-color em09"><item>' . esc_html($time) . '</item>';
|
||||
$html .= '<item class="pull-right"><i class="fa fa-eye" aria-hidden="true"></i> ' . esc_html((string) $views_label) . '</item></div>';
|
||||
$html .= '<div class="text3 muted-2-color em09"><span class="item">' . esc_html($time) . '</span>';
|
||||
$html .= '<span class="item pull-right"><i class="fa fa-eye" aria-hidden="true"></i> ' . esc_html((string) $views_label) . '</span></div>';
|
||||
$html .= '</div></div></a></div></div>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user