Dara: Improve featured slider overlap fix, to make sure it works on sliders with just one slide. See #169.

This commit is contained in:
Laurel Fulford 2019-01-01 12:23:04 -08:00
parent b9c621ed8d
commit d7e89dbf29
3 changed files with 2 additions and 9 deletions

View file

@ -1,9 +1,5 @@
( function( $ ) {
function removePlaceholderPadding() {
$('.flexslider .hero-content').removeClass( 'propped-up');
}
function loadFlexslider() {
$( '.flex-viewport-wrapper' ).flexslider( {
animation: "fade",
@ -17,7 +13,6 @@
itemHeight: 600,
smoothHeight: true,
selector: '.slides > .hero-content-wrapper',
init: removePlaceholderPadding,
} );
}

View file

@ -10,7 +10,7 @@ if ( empty( $featured ) )
?>
<div id="featured-content" class="flexslider hero">
<div class="flex-viewport-wrapper hero-content propped-up">
<div class="flex-viewport-wrapper hero-content">
<div class="featured-posts slides" id="featured-slides">
<?php
foreach ( $featured as $post ) :

View file

@ -1468,12 +1468,10 @@ blockquote p:last-child {
position: relative;
}
.hero-content {
padding-bottom: 50.8474576271186%; /* Makes sure slideshow maintains aspect ratio while loading to avoid overlap */
position: relative;
overflow: hidden;
}
.propped-up {
padding-bottom: 50.8474576271186%; /* Makes sure slideshow maintains aspect ratio while loading to avoid overlap */
}
.hero-content img,
.thumbnail-placeholder {
display: block;