Advertisement
jsilva88

Untitled

Nov 21st, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. <?php $slider = $this->getSlider() ?>
  2. <?php if($slider && (count($this->getLookbooks())>0)): ?>
  3. <div class="lookbook-slider owl-carousel owl-theme <?php echo $slider->getCustomClass() ?>" id="lookbook_slider_<?php echo $slider->getId() ?>">
  4. <?php $lookbooks = $this->getLookbooks() ?>
  5. <?php foreach($lookbooks as $lookbook): ?>
  6. <div class="lookbook-container">
  7. <div class="mgs-lookbook-container">
  8. <div class="pin__image">
  9. <img src="<?php echo $this->getImageUrl($lookbook) ?>" alt="<?php $lookbook->getName() ?>" class="lookbook-image img-responsive"/>
  10. </div>
  11. <?php echo $this->getPinHtml($lookbook) ?>
  12. </div>
  13. </div>
  14. <?php endforeach ?>
  15. </div>
  16. <script type="text/javascript">
  17. require([
  18. 'jquery',
  19. 'mgs/owlcarousel',
  20. ], function(jQuery){
  21. (function($) {
  22. $(document).ready(function () {
  23. $('#lookbook_slider_<?php echo $slider->getId() ?>').owlCarousel({
  24. items: 2,
  25. center: 'true',
  26. animateOut: 'fadeOut',
  27. loop: <?php echo $this->getLoop(); ?>,
  28. nav: <?php echo $this->getNavigation(); ?>,
  29. animateIn: 'true',
  30. dots: <?php echo $this->getPagination(); ?>,
  31. autoplay: <?php echo $this->getAutoPlay(); ?>,
  32. autoplayHoverPause: <?php echo $this->getStopAuto(); ?>,
  33. autoplayTimeout: <?php echo $this->getAutoplayTimeout(); ?>,
  34. animateOut: 'fadeOut',
  35. animateIn: 'fadeIn',
  36. responsive:{
  37. 0:{
  38. items:1,
  39. nav:true
  40. },
  41. 300:{
  42. items:1,
  43. nav:true
  44. },
  45. 600:{
  46. items:2,
  47. nav:true
  48. },
  49. 1000:{
  50. items:2,
  51. nav:true
  52. }
  53. },
  54. navText: ['<?php echo $this->getPrevIcon() ? $this->getPrevIcon() : '<i class="fa fa-long-arrow-left"></i>' ?>','<?php echo $this->getNextIcon() ? $this->getNextIcon() : '<i class="fa fa-long-arrow-right"></i>' ?>']
  55. });
  56. });
  57. })(jQuery);
  58. });
  59. </script>
  60. <?php endif ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement