<?php
/*----------------------------------------------------------------------------------|  www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.76
	@build			5th December, 2021
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____  _____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \(  _  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/ )(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__)  (_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');


?>

<!--[JCBGUI.joomla_module.default.1.$$$$]-->
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">
<div class="module-container module-container-<?php echo $module->id; ?> module-swiper-container module-swiper-container-<?php echo $module->id; ?>" style="position: relative">
  <div class="swiper-container swiper-container-<?php echo $module->id; ?>" >
    <div class="swiper-wrapper swiper-wrapper-<?php echo $module->id; ?>">
      <?php foreach($courses as $course): ?>
        <div class="swiper-slide swiper-slide-<?php echo $module->id; ?>">
          <a href="<?php echo JRoute::_('index.php?option=com_moojla&view=coursedetail&id='.$course->id);?>">

            <div class="center-crop-<?php echo $module->id; ?>">
              <img data-src="<?php echo $course->summary_files ?>" class="swiper-lazy">
            </div>

            <div class="swiper-lazy-preloader swiper-lazy-preloader-<?php echo $module->id; ?> swiper-lazy-preloader-white swiper-lazy-preloader-white-<?php echo $module->id; ?>"></div>
            <div class="course-content-<?php echo $module->id; ?>">
              <p><?php echo $course->fullname?></p>
              <?php echo JLayoutHelper::render('favorite', ['course'=>$course, 'favorite'=>$favorite, 'params'=>$params],JPATH_SITE.'/components/com_moojla/layouts'); ?>

            </div>
          </a>
        </div>
        
      <?php endforeach; ?>
    </div>

    <div class="swiper-pagination swiper-pagination-<?php echo $module->id; ?> swiper-pagination-white swiper-pagination-white-<?php echo $module->id; ?>"></div>

    
  </div>

  <div class="swiper-button-next swiper-button-next-<?php echo $module->id; ?> swiper-button-white swiper-button-white-<?php echo $module->id; ?>"></div>
  <div class="swiper-button-prev swiper-button-prev-<?php echo $module->id; ?> swiper-button-white swiper-button-white-<?php echo $module->id; ?>"></div>
  
</div>


<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>


<script>
  var swiper = new Swiper('.swiper-container-<?php echo $module->id; ?>', {
    // Enable lazy loading
    lazy: true,
    pagination: {
      el: '.swiper-pagination-<?php echo $module->id; ?>',
      clickable: true,
    },
    loop: true,
    navigation: {
      prevEl: '.swiper-button-next-<?php echo $module->id; ?>',
      nextEl: '.swiper-button-prev-<?php echo $module->id; ?>',
    },
    breakpoints: {

      640: {
        slidesPerView: 1,
        spaceBetween: 20,
      },
      768: {
        slidesPerView: 2,
        spaceBetween: 40,
      },
      1024: {
        slidesPerView: 3,
        spaceBetween: 50,
      },
      1280: {
        slidesPerView: 4,
        spaceBetween: 50,
      },

    }

  });
</script>
<style>
  div.swiper-button-next-<?php echo $module->id; ?>::after {
    font-family:FontAwesome;
    content: '\f105' !important;
    color: lightblue;
  }
  div.swiper-button-prev-<?php echo $module->id; ?>::after {
    font-family:FontAwesome;
    content: '\f104' !important;
    color: lightblue;
  }
  .center-crop-<?php echo $module->id; ?> img {
    /*width: auto;
    padding: 0;*/
    position: absolute;
    left: -1000%;
    right: -1000%;
    top: -1000%;
    bottom: -1000%;
    margin: auto;
    min-height: 100%;
    min-width: 100%;
  }
  
  .center-crop-<?php echo $module->id; ?> {
    width: 13vw !important;
    height: 8vw;
    overflow: hidden;
    margin: 10px;
    position: relative;
  }
  .course-content-<?php echo $module->id; ?> {
    padding-right: 20px;
    margin-bottom: 50px;
  }
  
  .swiper-lazy-preloader-<?php echo $module->id; ?> {
    margin-bottom: 50%;
  }
</style>

<!--[/JCBGUI$$$$]-->


<script type="text/javascript">
/***[JCBGUI.field.javascript_views_footer.1026.$$$$]***/
/*saaaaaaaaalaaaaaaaaaaam2*/
function fillList(x){
  alert('salam views');
}/***[/JCBGUI$$$$]***/

</script>
