فهرست منبع

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

Laurel Fulford 6 سال پیش
والد
کامیت
d7e89dbf29
3فایلهای تغییر یافته به همراه2 افزوده شده و 9 حذف شده
  1. 0 5
      dara/assets/js/slider.js
  2. 1 1
      dara/components/post/content-featured.php
  3. 1 3
      dara/style.css

+ 0 - 5
dara/assets/js/slider.js

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

+ 1 - 1
dara/components/post/content-featured.php

@@ -10,7 +10,7 @@ if ( empty( $featured ) )
 ?>
 ?>
 
 
 <div id="featured-content" class="flexslider hero">
 <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">
 		<div class="featured-posts slides" id="featured-slides">
 		<?php
 		<?php
 			foreach ( $featured as $post ) :
 			foreach ( $featured as $post ) :

+ 1 - 3
dara/style.css

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