Last active
September 18, 2023 10:03
-
-
Save johnmccole/8b2d1a93a2867db5d8046d6745226e97 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
.slick { | |
width: 100%; | |
max-width: 960px; | |
.slick-list { | |
overflow: visible; | |
.slick-slide { | |
opacity: 0.2; | |
transition: opacity 400ms ease-out; | |
&.slick-active { | |
opacity: 1; | |
} | |
} | |
} | |
} |
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
// Slicker Slider assets | |
add_action('wp_enqueue_scripts', function () { | |
wp_enqueue_style('slick.min.css', '//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css', false, null); | |
wp_enqueue_script('slick.min.js', '//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js', ['jquery'], null, true); | |
}, 100); |
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
$(document).ready(function(){ | |
$('.slick').slick({ | |
infinite: true, | |
slidesToShow: 3, | |
slidesToScroll: 1, | |
arrows: false, | |
}); | |
}); |
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
// External functions | |
require_once( get_stylesheet_directory() . '/inc/custom-functions.php' ); |
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="slick mx-auto"> | |
// Repeating content | |
<div class="card" style="width: 18rem;"> | |
<img src="..." class="card-img-top" alt="..."> | |
<div class="card-body"> | |
<h5 class="card-title">Card title</h5> | |
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> | |
<a href="#" class="btn btn-primary">Go somewhere</a> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment