<?php
/*
Template Name:CMS-without-sidebar-template
*/
?>
<?php get_header(); ?>
<div id="core" class="container_home_page article-template <?php if(empty(get_the_post_thumbnail()) ) { echo "no_feature";} ?>">
	<div class="main_img">
				<?php the_post_thumbnail( 'full' ); ?>
			</div>

<div class="inner-page-section2">
        <div class="container">
			
				
                <div class="thn_post_wrap">
		
		   <h1 class="inner-heading-txt"><?php //the_title();?></h1>
            <div class="Content_area default-section"><?php echo the_content();?></div>
		   		<?php
            if( have_rows('content_area_section') ):

    while ( have_rows('content_area_section') ) : the_row();
  if( get_row_layout() == 'content' ):?>
          <div class="Content_area default-section"><?php echo get_sub_field('content');?></div>
          <?php elseif( get_row_layout() == 'committee_formation' ): ?>

            <div class="information-bx default-section">
              <div class="committe_text"><h2 class="cm-heading"><?php echo get_sub_field('text');?></h2></div>
              <div class="content_section"><?php echo get_sub_field('content_section');?></div>
            </div>
       <?php elseif( get_row_layout() == 'general_message' ): ?>
         <div class="general_message default-section"><?php echo get_sub_field('content');?></div>
            <?php elseif( get_row_layout() == 'gallary_section' ): ?>
           <div class="slider-section default-section">   
               <div class="slider-part">
    				<?php while ( have_rows('gallary_image') ) : the_row();
    					$slider_image = get_sub_field('image');?>    
    					<div class="banner-part">
                     <?php echo wp_get_attachment_image($slider_image['id'], array('700', '600'),false, array( "class" => "" ) );?> 
    						</div>
    				<?php endwhile;?>
    				</div>
        </div>
    <?php elseif( get_row_layout() == 'programme_section' ): ?>
            <div class="program-section default-section">
              <div class="programme_title"><h2 class="cm-heading"><strong><?php echo get_sub_field('title');?></strong></h2></div>
              <div class="content_area"><?php echo get_sub_field('content_area');?></div>
            </div>
            <?php elseif( get_row_layout() == 'download_section' ): ?>
         <?php $pdf = get_sub_field('download_file');?>

         <div class="download-section default-section">
             <div class="left-part">
               <div class="download_pdf"><a href="<?php echo $pdf?>"><img src="<?php echo  bloginfo('template_url');?>/images/download-icon.svg" alt="download-icon"></a> </div>
             </div>

             <div class="right-part">
                <div class="heading"><h2 class="gen-heading"><?php echo get_sub_field('heading');?></h2> </div>
                <div class="sub_heading"><?php echo get_sub_field('subheading');?></div>
             </div>

         </div>
            <?php elseif( get_row_layout() == 'accordian_section' ): ?>
              <div class="accodion-section default-section">

              
            <div class="accordian_title"><h2 class="accordion-heading"><?php echo get_sub_field('section_title');?></h2></div>
         <ul>  
            <?php if ( have_rows( 'accordion' ) ) : ?>
    <?php while ( have_rows( 'accordion' ) ) : the_row() ?>
    <li>  
      <div class="accord-title">
          <h3 class="acc-heading"><?php the_sub_field( 'panel_title' ); ?></h3>
      <span class="caret-icon"><img src="<?php echo  bloginfo('template_url');?>/assets/images/news-arrow.svg"> </span>
        </div>
        <div class="accor-bx">
            <p> <?php the_sub_field( 'panel_content' ); ?> </p>
        </div>
    </li>
        <?php endwhile; ?>

            </ul> 
          </div>
 

<?php endif;?>
            
            
            
<?php
        endif;

   
    endwhile; 

else :
   endif;	?>	
		
    </div>
  
      </div>

 </div>


  <script>
$('.slider-part').slick({
	dots: true,
   infinite: true,
  slidesToShow: 1,
  slidesToScroll: 1,
 responsive: [
    {
      breakpoint: 768,
      settings: {
        arrows: false,
        dots: true,
   		infinite: true,
  		slidesToShow: 1,
  		slidesToScroll: 1,
      }
    },
    {
      breakpoint: 480,
      settings: {
        dots: true,
  	    infinite: true,
  		slidesToShow: 1,
  		slidesToScroll: 1,
      }
    }
  ]
});
</script>
<script>
if($(".nivoSlider").children().length === 1)
    $("nivo-prevNav, nivo-nextNav").hide(0);
		
</script>
<script>
     $(document).ready(function(){
        $('.accord-title').click(function(){
            $('.accord-title.active').not(this).removeClass('active').next().slideToggle('slow');
            $(this).next('.accor-bx').slideToggle('slow');
            $(this).toggleClass('active');

 

        });

 

     });
 </script>
 <?php get_footer(); ?>
