Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/devcows/hugo-universal-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorGuillermo Guerrero Ibarra <wolf.fox1985@gmail.com>2021-08-01 02:06:32 +0300
committerGitHub <noreply@github.com>2021-08-01 02:06:32 +0300
commit5138c9ad5e0d207aa0235511e2070c95ef941931 (patch)
tree736dfe4242b8c2dbbc339ad8cd1b29615d83bf95 /static
parent65c133001b0da1b4f6e2d8265074403143fd9e98 (diff)
Carousel customizable. (#300)
Co-authored-by: Guillermo Guerrero Ibarra <guillermo.guerrero@deliveroo.co.uk>
Diffstat (limited to 'static')
-rw-r--r--static/js/front.js28
1 files changed, 11 insertions, 17 deletions
diff --git a/static/js/front.js b/static/js/front.js
index 7944bd0..c9f073a 100644
--- a/static/js/front.js
+++ b/static/js/front.js
@@ -95,37 +95,31 @@ function sliderHomepage () {
function sliders () {
if ($('.owl-carousel').length) {
$('.customers').owlCarousel({
- items: 6,
+ items: ($('.customers').attr('data-items') || 6),
+ slideSpeed: ($('.customers').attr('data-slide-speed') || 2000),
+ paginationSpeed: ($('.customers').attr('data-pagination-speed') || 1000),
+ autoPlay: $('.customers').attr('data-autoplay') === 'true',
itemsDesktopSmall: [990, 4],
itemsTablet: [768, 2],
itemsMobile: [480, 1]
})
$('.testimonials').owlCarousel({
- items: 4,
+ items: ($('.testimonials').attr('data-items') || 4),
+ slideSpeed: ($('.testimonials').attr('data-slide-speed') || 2000),
+ paginationSpeed: ($('.testimonials').attr('data-pagination-speed') || 1000),
+ autoPlay: $('.testimonials').attr('data-autoplay') === 'true',
itemsDesktopSmall: [990, 3],
itemsTablet: [768, 2],
itemsMobile: [480, 1]
})
- $('.project').owlCarousel({
- navigation: true, // Show next and prev buttons
- navigationText: ['<i class="fas fa-angle-left"></i>', '<i class="fas fa-angle-right"></i>'],
- slideSpeed: 300,
- paginationSpeed: 400,
- autoPlay: true,
- stopOnHover: true,
- singleItem: true,
- afterInit: '',
- lazyLoad: true
- })
-
$('.homepage').owlCarousel({
navigation: false, // Show next and prev buttons
navigationText: ['<i class="fas fa-angle-left"></i>', '<i class="fas fa-angle-right"></i>'],
- slideSpeed: 2000,
- paginationSpeed: 1000,
- autoPlay: true,
+ slideSpeed: ($('.homepage').attr('data-slide-speed') || 2000),
+ paginationSpeed: ($('.homepage').attr('data-pagination-speed') || 1000),
+ autoPlay: ($('.homepage').attr('data-autoplay') || 'true') === 'true',
stopOnHover: true,
singleItem: true,
lazyLoad: false,