fix(single): match reference article action bar 1:1
The action bar used a locally invented pill-chip style that overrode the reference theme's 80px icon-over-text columns, and the JS toggled a class no stylesheet targeted — so likes/favorites showed no selected state at all. - restore reference markup: <svg class="icon"> + <text>/<count> and the actived class, with data-stat-count/data-base-count preserved - toggle actived plus a transient action-animation so the lovestar keyframes finally reach the DOM - drop the CSS overrides and now-dead action-btn/.action-btn--reward and .post-actions-card rules; main.css already carried the reference rules the overrides were shadowing
This commit is contained in:
1 parent
1ce8e263c3
commit
8d16ce6e02
13 files changed
+43
-255
No files matched your search
@@ -24,11 +24,13 @@ if (!function_exists('aksrt_get_rewards_button')) {
|
||||
}
|
||||
$settings = \AKSRT\Settings\Settings::get_post_page_settings();
|
||||
$label = (string) ($settings['rewards_btn_text'] ?? __('赞赏', 'aksrt'));
|
||||
$icon = function_exists('aksrt_icon_markup') ? aksrt_icon_markup('zibsvg-money') : '';
|
||||
return sprintf(
|
||||
'<button type="button" class="%1$s aksrt-reward-open" data-aksrt-reward-open data-user-id="%2$d" data-post-id="%3$d"><i class="fa fas fa-gift em09" aria-hidden="true"></i> <span class="action-btn__label">%4$s</span></button>',
|
||||
'<button type="button" class="%1$s aksrt-reward-open" data-aksrt-reward-open data-user-id="%2$d" data-post-id="%3$d">%4$s<text>%5$s</text></button>',
|
||||
esc_attr($class),
|
||||
$user_id,
|
||||
$post_id,
|
||||
$icon, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fixed sprite markup.
|
||||
esc_html($label)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user