Created
August 14, 2023 15:30
-
-
Save karamansky/1d8d2518b66dd29e340b8c130f2b2a0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="block-reviews2__items"> | |
<?php $i=1; foreach ($reviews as $review) { | |
if ( $i === 1 || ( $i - 1 ) % 2 === 0 ) { | |
echo '<div class="block-reviews2__slide flex flex-wrap">'; | |
} | |
?> | |
<div class="block-reviews__item w-[calc(100%/2-40px)] md:w-full"> | |
<div class="block-reviews__heading flex mb-[16px] md:mb-[12px]"> | |
<?php if( !empty($review['image']) ) { ?> | |
<div class="block-reviews__heading-img w-[40px] h-[40px] mr-[8px] shrink-0"> | |
<img src="<?php echo $review['image']['url'] ?>" alt="<?php echo $review['name'] ?>" class="rounded-full w-full h-full object-contain"> | |
</div> | |
<?php } ?> | |
<div class="block-reviews__heading-text"> | |
<?php if(!empty($review['name'])) { ?> | |
<h5 class="block-reviews__name font-gilroy font-bold text-primary-dark text-[14px] leading-[22px]"><?php echo strip_tags($review['name']) ?></h5> | |
<?php } ?> | |
<?php if(!empty($review['position'])) { ?> | |
<div class="block-reviews__position font-gilroy text-primary-dark opacity-60 text-[12px] leading-[16px] training-[0.4px]"> | |
<?php echo $review['position']; ?> | |
</div> | |
<?php } ?> | |
</div> | |
</div> | |
<?php if(!empty($review['quote'])) { ?> | |
<div class="block-reviews__review py-[8px] px-[16px] font-gilroy font-semibold text-[12px] leading-[18px] text-dark-blue md:leading-[16px] md:py-[16px]"> | |
<?php echo $review['quote'] ?> | |
</div> | |
<?php } ?> | |
<?php if(!empty($review['text'])) { ?> | |
<div class="block-reviews__review py-[8px] px-[16px] font-gilroy font-semibold text-[12px] leading-[18px] text-dark-blue md:leading-[16px] md:py-[16px]"> | |
<?php echo $review['text'] ?> | |
</div> | |
<?php } ?> | |
</div> | |
<?php | |
if ( $i % 2 === 0 || $i === count($reviews) ) { | |
echo '</div>'; | |
} | |
?> | |
<?php $i++; } ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment