feat: Enhance pricing section layout with responsive design and improved header structure
This commit is contained in:
@@ -1402,22 +1402,37 @@ function oribi_render_pricing_section($a, $content, $block)
|
||||
{
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
$count = count($block->inner_blocks);
|
||||
ob_start(); ?>
|
||||
$has_label = !empty($a['label']);
|
||||
ob_start();
|
||||
if ($has_label): ?>
|
||||
<section class="<?php echo esc_attr($cls); ?>">
|
||||
<div class="container">
|
||||
<div class="pricing-track-layout">
|
||||
<div class="pricing-track-header">
|
||||
<span class="section-label"><?php echo esc_html($a['label']); ?></span>
|
||||
<h2><?php echo wp_kses_post($a['heading']); ?></h2>
|
||||
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php endif; ?>
|
||||
</div>
|
||||
<div class="pricing-grid pricing-grid-<?php echo intval($count); ?>">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php else: ?>
|
||||
<section class="<?php echo esc_attr($cls); ?>">
|
||||
<div class="container">
|
||||
<div class="section-header">
|
||||
<?php if ($a['label']): ?><span class="section-label"><?php echo esc_html($a['label']); ?></span><?php
|
||||
endif; ?>
|
||||
<h2><?php echo wp_kses_post($a['heading']); ?></h2>
|
||||
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php
|
||||
endif; ?>
|
||||
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php endif; ?>
|
||||
</div>
|
||||
<div class="pricing-grid pricing-grid-<?php echo intval($count); ?>">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php return ob_get_clean();
|
||||
<?php endif;
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Pricing Card (child - renders one pricing tier) ───────────────────────── */
|
||||
|
||||
Reference in New Issue
Block a user