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:
1 parent
8b18459dda
commit
93ab4650dd
4 files changed
+21
-10
No files matched your search
@@ -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>';
|
||||
|
||||
Reference in new issue
Block a user