<?php   
/**
 *
 * @package Luzuk 
 */ 
?>
<?php $showContent = get_theme_mod('premium_slider_show_content', 'on'); ?>
<div id="ht-home-slider-section">

	<div class="slider-leftsvg"><svg viewBox="0 0 500 150" preserveAspectRatio="none" style="height: 100%; width: 100%;"><path d="M154.62,-3.45 C152.36,107.06 35.55,62.66 0.00,149.50 L-2.25,143.58 L0.00,0.00 Z" style="stroke: none; "></path></svg></div>


	<svg class="slider-circle"version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
		<defs>
			<clipPath id="cut-off-bottom">
				<rect x="0" y="0" width="200" height="80" />
			</clipPath>
		</defs>

		<circle cx="100" cy="100" r="100" clip-path="url(#cut-off-bottom)" />
	</svg>
	<svg class="slider-circle2" version="1.2" height="100px" width="100px" xmlns="https://www.w3.org/2000/svg" >
		<circle cx="50px" cy="50px" r="40px" />
	</svg>
	<div class="col-md-8 col-md-offset-3">
		<div class ="owl-carousel owl-theme">

			<?php
			$args = array( 'post_type' => 'slider', 'orderby'   => 'id', 'order' => 'DESC',);
			if(!empty($pageId)){
				$args['page_id'] = absint($pageId);

			}
			$text = '';
			$query = new WP_Query($args);
			if($query->have_posts()){
				while($query->have_posts()) : $query->the_post(); 
				//$pageLink = '';
				//$slider_btn_link = get_post_meta($post->ID,'slider_btn_link',false);
				//$sliderBtnTxt = get_post_meta($post->ID,'sliderBtnTxt',false);
					if(!empty($slider_btn_link) && is_array($slider_btn_link)){
						$pageLink = esc_url(get_permalink($slider_btn_link[0]));
					}
					if(!empty($sliderBtnTxt) && is_array($sliderBtnTxt)){
						$pageLinkTxt = $sliderBtnTxt[0];
					}else{
						$pageLinkTxt = 'Start Free Trial';
					}
					?>
					<div class="item wow zoomIn">

						<div class="sliderimg test-icon">

						</div> 
						<?php
						if($showContent == 'on'){
							?>
							<div class="ht-slide-alltext text-center">							

								<div class="ht-slide-cap-title">
									<?php echo (get_the_title()); ?>
								</div>		
								<div class="ht-slide-cap-descmore-title">
									<?php echo (get_the_content()); ?>
								</div>
								<div class="ht-slide-cap-desc"><?php 
								if(has_excerpt()){
									echo get_the_excerpt();
								}else{
									echo luzuk_excerpt( get_the_content() , 110 );
								}
								?></div>


							</div>
						<?php }?>

					</div>
					<?php
				endwhile;
			}else{ 
				for($i=0;$i<2;$i++){?>
					<div class="item wow zoomIn">					

						<div class="sliderimg  test-icon">						
						</div>
						<?php if($showContent == 'on'){?>
							<div class="ht-slide-alltext text-center">				
								<div class="ht-slide-cap-title">Heading Here</div>
								<div class="ht-slide-cap-descmore-title">Let Us Help You With<br> All Of Your Printing Needs</div>
								<div class="ht-slide-cap-desc">Donec ultrices, diam sed efficitur semper, diam lectus malesuada nisl, eget congue nisl ligula non purus. Phasellus at dapibus magna. </div>					

							</div> 
						<?php }?>

					</div>
				<?php }
			}?>
			<!-- <div class="clearfix"></div> -->
		</div>	
	</div>
	<div class="clearfix"></div>
	<script>
		$(document).ready(function() {
			$('#ht-home-slider-section .owl-carousel').owlCarousel({
					slideSpeed :500,
              	   autoplay: true,
              	   loop: true,
              	   margin: 30,
              	   responsiveClass: true,
              	   responsive: {
              	   	0: {
              	   		items: 1,
              	   		nav: true
              	   	},
              	   	600: {
              	   		items:1,
              	   		nav: true
              	   	},
              	   	1000: {
              	   		items:1,
              	   		nav: true,
              	   		loop: true,
              	   		margin:10
              	   	}
              	   }
              	})
		})
	</script>
</div>
