@php // banner-countdown-v01 — single-row banner with countdown timer. // Variations from HTML demos (passed via shortcode attributes): // - background_class : 'bg-primary' (HomePod) | 'bg-dark' (Jewelry) | '' (default) // - style_modifier : 'style-2' (Jewelry) | 'style-3' (Furniture) | 'style-4' (Construct) | '' // - container_class : 'container-2' (HomePod) | 'container-full' (Jewelry) | 'container' (default) // - show_image : 'yes' if HTML uses banner-img inside (Construct style-4) // - outer_spacing_class : optional outer wrapper class. HomeJewelry §2 demo // (html/home-jewelry.html L1712) wraps the banner in // `
`. Allowlist: 'flat-spacing', // 'flat-spacing-2', '' (default — no wrapper, back-compat). $bgClass = trim((string) ($shortcode->background_class ?? '')); $styleModifier = trim((string) ($shortcode->style_modifier ?? '')); $containerClass = trim((string) ($shortcode->container_class ?? 'container')); $showImage = ($shortcode->show_image ?? '') === 'yes'; $isInlineImageStyle = $showImage && $styleModifier === 'style-4'; $isDark = $bgClass !== '' || $styleModifier !== '' || $showImage; $textColorClass = $isDark ? 'text-white' : ''; $btnClass = $isDark ? 'tf-btn btn-white' : 'tf-btn btn-fill animate-hover-btn radius-3'; $outerClass = trim('banner-countdown-v01 ' . $styleModifier . ' ' . $bgClass . ($isInlineImageStyle ? '' : ' wow fadeInUp')); $backgroundImage = $inlineBackgroundImage ?? ($shortcode->background_image ?? null); $outerSpacingAllowed = ['flat-spacing', 'flat-spacing-2', '']; $outerSpacingClass = trim((string) ($shortcode->outer_spacing_class ?? '')); $outerSpacingClass = in_array($outerSpacingClass, $outerSpacingAllowed, true) ? $outerSpacingClass : ''; // Skip the extra wrapper for style-4 (inline-image), which already emits its // own `flat-spacing` wrap via $isInlineImageStyle below. $emitOuterSpacing = $outerSpacingClass !== '' && ! $isInlineImageStyle; @endphp @if ($emitOuterSpacing)
@endif @if ($isInlineImageStyle)
@endif
@if ($showImage && ! empty($backgroundImage)) @endif @if (! $isInlineImageStyle)
@endif
@if (! empty($shortcode->heading ?? ''))

{!! BaseHelper::clean($shortcode->heading) !!}

@endif @if (! empty($shortcode->subheading ?? ''))

{!! BaseHelper::clean($shortcode->subheading) !!}

@endif
@if (! empty($shortcode->button_text ?? '')) {!! BaseHelper::clean($shortcode->button_text) !!} @endif
@if (! $isInlineImageStyle)
@endif
@if ($isInlineImageStyle)
@endif @if ($emitOuterSpacing)
@endif