80226a44 by Jeff Balicki

Featured Carousel

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent c1ee948c
......@@ -154,6 +154,40 @@ $carousel_style = get_field('carousel_style');
<?php endif; ?>
<?php break;
case 'featured': ?>
<?php if( have_rows('promo_items') ): ?>
<div class=" carousel-items promo-carousel featured-carousel">
<div class='swiper-wrapper'>
<?php while( the_repeater_field('promo_items') ): ?>
<?php $page = get_sub_field('featured_post'); ?>
<div class="swiper-slide">
<div class="carousel-content">
<div class="promo-image" >
<?php $image = get_the_post_thumbnail_url( $page->ID, 'medium' );
$thumbnail_id = get_post_meta( $page->ID, '_thumbnail_id', true );
$img_alt = get_post_meta ( $thumbnail_id, '_wp_attachment_image_alt', true );
if(!$img_alt){
$img_alt = get_the_title($thumbnail_id);
}
?>
<img src="<?php echo $image; ?>" alt="<?php echo $img_alt ?>" loading="eager">
</div>
<div class="promo-text"><h2><?php echo get_the_title($page->ID); ?></h2><p><?php echo get_the_excerpt($page->ID); ?></p><a class="understrap-read-more-link" href="<?php echo get_permalink($page->ID);?>"><?= __('READ MORE', 'msf') ?></a></div>
</div>
</div>
<?php endwhile; ?>
</div>
<div class="swiper-button-prev" data-id="<?= $id ?>"></div>
<div class="swiper-button-next" data-id="<?= $id ?>"></div>
</div>
<?php else: ?>
<p>Please add some slides.</p>
<?php endif; ?>
<?php break;
default: ?>
<p>Please select style.</p>
<?php }; ?>
......
......@@ -20642,6 +20642,29 @@ ul.sf_date_field .sf-datepicker {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="65.928" height="65.928" viewBox="0 0 65.928 65.928"><defs><clipPath id="clip-path"><rect id="Rectangle_250" data-name="Rectangle 250" width="65.928" height="65.928" fill="%23fff"/></clipPath></defs><g id="Group_1994" data-name="Group 1994" opacity="0.6"><g id="Group_1914" data-name="Group 1914"><path id="Path_1401" data-name="Path 1401" d="M112.886,81.243,91.2,94.52V67.966Z" transform="translate(-66.167 -48.109)" fill="%23fff"/><g id="Group_1516" data-name="Group 1516"><g id="Group_1515" data-name="Group 1515" clip-path="url(%23clip-path)"><path id="Path_1402" data-name="Path 1402" d="M32.964,65.928A32.964,32.964,0,1,1,65.929,32.964,33,33,0,0,1,32.964,65.928m0-57.886A24.922,24.922,0,1,0,57.887,32.964,24.95,24.95,0,0,0,32.964,8.042" fill="%23fff"/></g></g></g></g></svg>');
}
.featured-carousel {
height: 400px;
}
.carousel:has(.featured-carousel) {
height: 400px;
}
.carousel:has(.featured-carousel) .promo-text h2, .carousel:has(.featured-carousel) .promo-text .h2 {
font-size: 18px;
line-height: 23px;
text-align: left;
}
.carousel:has(.featured-carousel) .promo-text p {
font-size: 1rem;
line-height: 1.5rem;
text-align: left;
}
.carousel:has(.featured-carousel) .understrap-read-more-link {
font-size: 14px;
line-height: 21px;
text-align: left;
}
.pojo-a11y-grayscale {
overflow-y: scroll !important;
}
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -66,6 +66,7 @@ if( function_exists('acf_add_options_page') ) {
'customClassName' => true
]
));
acf_register_block_type( array(
'title' => __( 'Relevant Resources', 'client_textdomain' ),
'name' => 'relevant-resources',
......
......@@ -256,3 +256,5 @@ if ( ! function_exists( 'understrap_all_excerpts_get_more_link' ) ) {
}
}
add_filter( 'excerpt_length', function( $length ) { return 30; } );
\ No newline at end of file
......
......@@ -320,4 +320,31 @@
top: 50%;
transform: translate(-50%, -50%);
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="65.928" height="65.928" viewBox="0 0 65.928 65.928"><defs><clipPath id="clip-path"><rect id="Rectangle_250" data-name="Rectangle 250" width="65.928" height="65.928" fill="%23fff"/></clipPath></defs><g id="Group_1994" data-name="Group 1994" opacity="0.6"><g id="Group_1914" data-name="Group 1914"><path id="Path_1401" data-name="Path 1401" d="M112.886,81.243,91.2,94.52V67.966Z" transform="translate(-66.167 -48.109)" fill="%23fff"/><g id="Group_1516" data-name="Group 1516"><g id="Group_1515" data-name="Group 1515" clip-path="url(%23clip-path)"><path id="Path_1402" data-name="Path 1402" d="M32.964,65.928A32.964,32.964,0,1,1,65.929,32.964,33,33,0,0,1,32.964,65.928m0-57.886A24.922,24.922,0,1,0,57.887,32.964,24.95,24.95,0,0,0,32.964,8.042" fill="%23fff"/></g></g></g></g></svg>');
}
\ No newline at end of file
}
.featured-carousel{
height: 400px;
}
.carousel:has(.featured-carousel){
height: 400px;
.promo-text{
h2 {
font-size:18px;
line-height:23px;
text-align: left;
}
p {
font-size: 1rem;
line-height: 1.5rem;
text-align: left;
}
}
.understrap-read-more-link{
font-size: 14px;
line-height: 21px;
text-align: left;
}
}
......
......@@ -2,5 +2,5 @@
Theme Name: MSF CA Child
Author: Tenzing Communications
Template: msf-ca
Version: 1.0.523
Version: 1.0.524
*/
\ No newline at end of file
......