Skip to content

Commit

Permalink
Merge pull request #1193 from equalizedigital/dev/pricing-block
Browse files Browse the repository at this point in the history
pricing
  • Loading branch information
tronsymphony authored Apr 15, 2024
2 parents 5215984 + 85c556b commit 2719c6c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion assets/css/editor-style.css

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8562,7 +8562,6 @@ select.tab-block-container-tab-block_header-buttons_mobile_select {
font-style: normal;
font-weight: 700;
line-height: 25px;
/* 125% */
margin: 86px 0 26px; }

.pricing_calculator_template_container_main {
Expand Down Expand Up @@ -8707,8 +8706,6 @@ select.tab-block-container-tab-block_header-buttons_mobile_select {
gap: 12px; }
.pricing_calculator_accordion:focus-within {
border-color: blue; }
.pricing_calculator_accordion:focus-within h3 {
background-color: #eee; }
.pricing_calculator_accordion .pricing_calculator_accordion_item_title {
display: flex;
gap: 20px;
Expand Down Expand Up @@ -8741,6 +8738,12 @@ select.tab-block-container-tab-block_header-buttons_mobile_select {
height: 30px;
top: 20px;
cursor: pointer; }
.pricing_calculator_accordion-trigger_heading {
display: block;
margin: 0;
position: relative;
text-align: left;
width: 100%; }
.pricing_calculator_accordion-trigger {
background: none;
color: black;
Expand Down
10 changes: 8 additions & 2 deletions assets/scss/blocks/pricing_calculator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
font-style: normal;
font-weight: 700;
line-height: 25px;
/* 125% */
margin: 86px 0 26px;
}
}
Expand Down Expand Up @@ -190,7 +189,6 @@
}

&:focus-within h3 {
background-color: #eee;
}


Expand Down Expand Up @@ -243,6 +241,14 @@
cursor: pointer;
}

&-trigger_heading{
display: block;
margin: 0;
position: relative;
text-align: left;
width: 100%;
}

&-trigger {
background: none;
color: black;
Expand Down
30 changes: 21 additions & 9 deletions template-parts/blocks/pricing-calculator/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
endif;

$class_name = apply_filters( 'loader_block_class', $class_name, $block, $post_id );
$cta_link = get_field('cta_link');
?>


Expand All @@ -54,7 +55,7 @@
$benefits = get_sub_field( 'benefits',false, false );
if($row_index === 1): ?>
<h3 class="screen-reader-text">Financial Planning</h3>
<div class="pricing_calculator_template_container_main" >
<div class="pricing_calculator_template_container_main" id="pricing_calculator_template_container_main_init">
<div class="pricing_calculator_template_container_main_pricing" >
<div class="pricing_calculator_template_container_main_pricing_price" >
<div class="large_set">$<span class="price"><?php echo wp_kses_post($price); ?></span></div>
Expand Down Expand Up @@ -87,15 +88,20 @@
?>
</div>
<div class="pricing_calculator_template_container_main_info_started">
<a class="btn btn-dark-bg" href="www.slpwealth.com/book" target="_blank">Get Started</a>
<?php
$cta_link = get_field('cta_link');
if ($cta_link): ?>
<a href="<?php echo esc_url($cta_link['url']); ?>" class="btn btn-dark-bg"><?php echo esc_html($cta_link['title']); ?></a>
<?php endif; ?>

</div>
</div>
</div>
<!-- Screen Reader Announcements Div -->
<div id="aria-read" aria-live="polite" aria-atomic="true" style="position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;">
<!-- Dynamic content changes will be announced by screen readers when updated here -->
</div>
<div class="heading">Add Additional Services:</div>
<h3 class="heading">Add Additional Services:</h3>

<?php else :
if ($benefits) {
Expand Down Expand Up @@ -128,13 +134,15 @@ class="pricing_calculator_accordion_add"
aria-label="Add Service <?php echo wp_kses_post($title); ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/'; ?>add.svg" alt="add">
</button>
<button type="button" aria-expanded="<?php echo$row_index>2? 'false':'true'; ?>" class="pricing_calculator_accordion-trigger" aria-controls="sect<?php echo get_row_index(); ?>" id="pricing_calculator_accordion<?php echo get_row_index(); ?>">
<span class="pricing_calculator_accordion-title">
<?php echo wp_kses_post($title); ?>
<span class="pricing_calculator_accordion-icon">
<h4 class="pricing_calculator_accordion-trigger_heading">
<button type="button" aria-expanded="<?php echo$row_index>2? 'false':'true'; ?>" class="pricing_calculator_accordion-trigger" aria-controls="sect<?php echo get_row_index(); ?>" id="pricing_calculator_accordion<?php echo get_row_index(); ?>">
<span class="pricing_calculator_accordion-title">
<?php echo wp_kses_post($title); ?>
<span class="pricing_calculator_accordion-icon">
</span>
</span>
</span>
</button>
</button>
</h4>
</div>
<div id="sect<?php echo get_row_index(); ?>" role="region" aria-labelledby="pricing_calculator_accordion<?php echo get_row_index(); ?>" class="pricing_calculator_accordion-panel" <?php echo$row_index>2? 'hidden':''; ?>>
<div class="pricing_calculator_accordion-panel_content <?php echo empty($video)? "no-video":''; ?>">
Expand All @@ -159,6 +167,10 @@ class="action btn"
>
Add Service
</button>

<a href="#pricing_calculator_template_container_main_init" class="btn">
Go to pricing
</a>
</div>
<div class="pricing_calculator_accordion-panel_content_right">
<?php
Expand Down

0 comments on commit 2719c6c

Please sign in to comment.