Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move h3 to inside the institution block #1248

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/css/editor-style.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -7089,6 +7089,9 @@ article.type-post {
.vendor_information_block_container_column_two {
grid-column-start: 5;
grid-column-end: 13; }
@media (max-width: 767px) {
.vendor_information_block_container_column_two_institution_name {
margin-top: 20px; } }
.vendor_information_block_container_column_two_title {
color: #000;
font-size: 16px;
Expand Down
46 changes: 26 additions & 20 deletions assets/scss/blocks/vendor-information-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
gap: 0 20px;
}
}

img{
width: 100%;
}
Expand All @@ -55,6 +55,12 @@
grid-column-start: 5;
grid-column-end: 13;

&_institution_name {
@include media("<tablet") {
margin-top: 20px;
}
}

&_title {
color: #000;
font-size: 16px;
Expand Down Expand Up @@ -210,7 +216,7 @@
text-align: center;
flex-wrap: wrap;
gap: 0 20px;

@include media("<tablet") {
flex-direction: row;
border-bottom: 1px solid #D9D9D9;
Expand All @@ -221,7 +227,7 @@
&-image{
margin-bottom: 25px;
}

&-read-review a {
color: #000;
text-align: center;
Expand Down Expand Up @@ -254,11 +260,11 @@
}
}
}

&-column-two {
grid-column-start: 5;
grid-column-end: 13;

&-title {
color: #000;
font-size: 16px;
Expand All @@ -267,7 +273,7 @@
line-height: 24px; // 150%
margin: 0 0 15px;
}

&-link {
@include media(">desktop") {
display: flex;
Expand All @@ -278,7 +284,7 @@
display: grid;
grid-template-columns: auto auto;
}

&.btn {
width: 100%;
display: flex;
Expand Down Expand Up @@ -316,20 +322,20 @@
color: var(--WCAG-Green, #547C2D);
cursor: pointer;
}

span {
display: inline-flex;
transform: rotate(0deg);
}

&.active-btn {
span {
transform: rotate(180deg);
}
}

}

.subtext {
color: #000;
text-align: center;
Expand All @@ -339,7 +345,7 @@
line-height: 20px;
}
}

&-text-repeater ul {
color: var(--Black, #000);
font-size: 14px;
Expand All @@ -348,13 +354,13 @@
line-height: 24px; // 171.429%
padding: 0 0 0 20px;
margin: 0 0 30px;

li {
padding: 0;
}
}
}

&-more-info {
grid-column-start: 1;
grid-column-end: 13;
Expand All @@ -366,11 +372,11 @@
border-top: 1px solid #D9D9D9;
padding: 32px 0 0;
margin: 40px 0 0;

div {
margin: 20px 0 0;
}

a {
color: var(--WCAG-Green, #547C2D);
font-size: 14px;
Expand All @@ -383,9 +389,9 @@
p{
margin-bottom: 0;
}

}

.cover {
background: white;
height: 100%;
Expand All @@ -397,7 +403,7 @@
bottom: 0;
display: flex;
}

.rating-stars {
position: relative;
gap: 10px;
Expand All @@ -410,4 +416,4 @@
}
}
}
}
}
22 changes: 12 additions & 10 deletions template-parts/blocks/featured-institution/template.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Vendor_information_block Block Template.
*
*
* @package Equalize Digital Base Theme
* @author Equalize Digital
* @since 1.0.0
Expand Down Expand Up @@ -38,6 +38,7 @@

// Load values and assing defaults.
$select_institutional_contact = get_field( 'select_institutional_contact' );
$institution_name = get_field( 'institution_name', $select_institutional_contact );
$logo = get_field( 'company_logo', $select_institutional_contact );
$rating = get_field( 'rating', $select_institutional_contact );
$review_url = get_field( 'review_url', $select_institutional_contact ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- Leaving for future use.
Expand All @@ -59,8 +60,6 @@

?>
<section id="<?php echo ! empty( $block_id ) ? esc_attr( $block_id ) : esc_attr( $classid ); ?>" class="<?php echo esc_attr( $class_name ); ?>">

<h3 class="screen-reader-text"><?php echo esc_html( get_the_title( $select_institutional_contact ) ); ?></h3>
<div class="vendor_information_block_container">

<div class="vendor_information_block_container_column_one">
Expand Down Expand Up @@ -97,6 +96,9 @@
</div>

<div class="vendor_information_block_container_column_two">
<h3 class="vendor_information_block_container_column_two_institution_name">
<?php echo esc_html( $institution_name ); ?>
</h3>

<?php if ( $show_about ) : ?>
<h4 class="vendor_information_block_container_column_two_title">About:</h4>
Expand Down Expand Up @@ -151,7 +153,7 @@
</div>
<?php endif; ?>

<?php
<?php
$vendor_title = get_field( 'title' );
$vendor_content = get_field( 'content' );
if ( $vendor_title ) :
Expand All @@ -170,7 +172,7 @@
<a href="<?php echo esc_url( get_the_permalink( $select_institutional_contact ) ); ?>"><?php echo esc_html( get_the_title( $select_institutional_contact ) ); ?></a>
</div>
<?php endif; ?>

<?php if ( $show_feature_list ) : ?>
<h4 class="vendor_information_block_container_column_two_title"><?php echo wp_kses_post( $heading ); ?></h4>
<div class="vendor_information_block_container_column_two_text_repeater">
Expand All @@ -190,12 +192,12 @@
</div>
<?php endif; ?>



<?php if ( have_rows( 'eligible_states', $select_institutional_contact ) ) : ?>
<?php
while ( have_rows( 'eligible_states', $select_institutional_contact ) ) :
the_row();
the_row();
?>
<h4 class="vendor_information_block_container_column_two_title">
<?php echo wp_kses_post( get_sub_field( 'heading' ) ); ?>
Expand All @@ -221,7 +223,7 @@

<?php if ( ! empty( $more_info_content ) ) : ?>

<button
<button
class="vendor_information_block_container_column_two_link_more_info"
type="button"
aria-label="More Information about <?php echo esc_attr( get_the_title( $select_institutional_contact ) ); ?>"
Expand All @@ -231,9 +233,9 @@ class="vendor_information_block_container_column_two_link_more_info"
<svg width="13" height="8" viewBox="0 0 13 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6.50008 6.50008L12.0002 1" stroke="#82BC46"/></svg>
</span>
</button>

<?php endif; ?>

</div>
</div>

Expand Down
Loading