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 ────────────────────────────────────────────── */
|
/* ── 9. Pricing ────────────────────────────────────────────── */
|
||||||
.section-header--track {
|
.pricing-track-layout {
|
||||||
text-align: left;
|
display: grid;
|
||||||
margin-inline: 0;
|
grid-template-columns: 280px 1fr;
|
||||||
max-width: none;
|
gap: 3rem;
|
||||||
|
align-items: start;
|
||||||
}
|
}
|
||||||
.section-header--track .section-label {
|
.pricing-track-header {
|
||||||
font-size: 1rem;
|
position: sticky;
|
||||||
letter-spacing: .04em;
|
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 {
|
.pricing-grid {
|
||||||
|
|||||||
@@ -1402,22 +1402,37 @@ function oribi_render_pricing_section($a, $content, $block)
|
|||||||
{
|
{
|
||||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||||
$count = count($block->inner_blocks);
|
$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); ?>">
|
<section class="<?php echo esc_attr($cls); ?>">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="section-header">
|
<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>
|
<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
|
<?php if ($a['lead']): ?><p class="lead"><?php echo wp_kses_post($a['lead']); ?></p><?php endif; ?>
|
||||||
endif; ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="pricing-grid pricing-grid-<?php echo intval($count); ?>">
|
<div class="pricing-grid pricing-grid-<?php echo intval($count); ?>">
|
||||||
<?php echo $content; ?>
|
<?php echo $content; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<?php return ob_get_clean();
|
<?php endif;
|
||||||
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Pricing Card (child - renders one pricing tier) ───────────────────────── */
|
/* ── Pricing Card (child - renders one pricing tier) ───────────────────────── */
|
||||||
|
|||||||
Reference in New Issue
Block a user