Dara: Improve featured slider overlap fix, to make sure it works on sliders with just one slide. See #169.
This commit is contained in:
parent
b9c621ed8d
commit
d7e89dbf29
3 changed files with 2 additions and 9 deletions
|
@ -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,
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ) :
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue