feat: Enhance pricing section layout with responsive design and improved header structure
This commit is contained in:
@@ -1948,14 +1948,36 @@ p:last-child { margin-bottom: 0; }
|
||||
}
|
||||
|
||||
/* ── 9. Pricing ────────────────────────────────────────────── */
|
||||
.section-header--track {
|
||||
text-align: left;
|
||||
margin-inline: 0;
|
||||
max-width: none;
|
||||
.pricing-track-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 280px 1fr;
|
||||
gap: 3rem;
|
||||
align-items: start;
|
||||
}
|
||||
.section-header--track .section-label {
|
||||
font-size: 1rem;
|
||||
letter-spacing: .04em;
|
||||
.pricing-track-header {
|
||||
position: sticky;
|
||||
top: 2rem;
|
||||
}
|
||||
.pricing-track-header .section-label {
|
||||
font-size: 1.35rem;
|
||||
letter-spacing: .02em;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.pricing-track-header h2 {
|
||||
font-size: clamp(1.75rem, 3vw, 2.5rem);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.pricing-track-header .lead {
|
||||
font-size: .95rem;
|
||||
color: var(--color-muted);
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.pricing-track-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.pricing-track-header {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
|
||||
.pricing-grid {
|
||||
|
||||
@@ -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