feat(widgets): reviews swiper-tilt, feature countup, tilt/pricing motion

Reviews use swiper-scroll + 3D tilt cards; feature intro stats count-up
and tab video pause; tilt showcase hooks effects.js; pricing cards animate.
This commit is contained in:
kate522 committed 2026-07-21 09:46:17 +08:00
1 parent 8b18459dda
commit 93ab4650dd
4 files changed
+21 -10

No files matched your search

+5 -2
View File
@@ -41,14 +41,17 @@ class WidgetPricingPlans extends \WP_Widget {
echo '<div class="aksrt-pricing">';
echo '<div class="aksrt-pricing__cards">';
$pi = 0;
foreach ($plans as $plan) {
$accent = sanitize_key((string) ($plan['color'] ?? 'blue'));
if (!in_array($accent, ['pink', 'purple', 'blue', 'green', 'yellow', 'cyan'], true)) {
$accent = 'blue';
}
$featured = !empty($plan['is_featured']);
$class = 'aksrt-pricing__card accent-' . $accent . ($featured ? ' is-featured' : '');
echo '<div class="' . esc_attr($class) . '">';
$pack = function_exists('aksrt_obs_animate_attrs') ? aksrt_obs_animate_attrs('slideup', false, $pi * 0.12) : ['class' => '', 'attr' => ''];
$class = 'aksrt-pricing__card accent-' . $accent . ($featured ? ' is-featured' : '') . $pack['class'];
echo '<div class="' . esc_attr(trim($class)) . '"' . $pack['attr'] . '>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$pi++;
if ($featured || !empty($plan['tag'])) {
$badge = (string) ($plan['tag'] !== '' ? $plan['tag'] : __('推荐', 'aksrt'));
echo '<span class="aksrt-pricing__badge">' . esc_html($badge) . '</span>';