scrollable.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Portfolio scrollable template
  4. *
  5. * @package vamtam/consulting
  6. */
  7. $slider_options = array(
  8. 'layoutMode' => 'slider',
  9. 'drag' => true,
  10. 'auto' => false,
  11. 'autoTimeout' => 5000,
  12. 'autoPauseOnHover' => true,
  13. 'showNavigation' => true,
  14. 'showPagination' => true,
  15. 'scrollByPage' => false,
  16. 'gridAdjustment' => 'responsive',
  17. 'mediaQueries' => VamtamTemplates::scrollable_columns( $max_columns ),
  18. 'gapHorizontal' => $settings->gap ? 30 : 0,
  19. 'gapVertical' => $settings->gap ? 30 : 0,
  20. 'displayTypeSpeed' => 100,
  21. );
  22. wp_enqueue_style( 'cubeportfolio' );
  23. if ( VamtamTemplates::early_cube_load() ) {
  24. wp_enqueue_script( 'cubeportfolio' );
  25. }
  26. $wrapper_class = array(
  27. 'portfolios',
  28. 'title-' . $settings->show_title,
  29. $settings->description ? 'has-description' : 'no-description',
  30. $settings->gap ? 'has-gap' : 'no-gap',
  31. $settings->class,
  32. );
  33. $GLOBALS['vamtam_inside_cube'] = true;
  34. ?>
  35. <section class="<?php echo esc_attr( implode( ' ', $wrapper_class ) ) ?>">
  36. <div class="portfolio-items vamtam-cubeportfolio cbp cbp-slider-edge" data-options="<?php echo esc_attr( json_encode( $slider_options ) ) ?>">
  37. <?php
  38. while ( $portfolio_query->have_posts() ) : $portfolio_query->the_post();
  39. include locate_template( 'templates/portfolio/loop/item.php' );
  40. endwhile;
  41. ?>
  42. </div>
  43. </section>
  44. <?php
  45. $GLOBALS['vamtam_inside_cube'] = false;