<?php
/*

Template Name: Atractions

*/
?>

<?php get_header(); ?>

<?php wp_reset_postdata(); ?>

<?php $featuredImageType = get_field('background_image_type'); ?>
<?php setBgImg();  ?>


<main class="content1 atractionsPage <?php echo $featuredImageType; ?>"> <!-- for image and paralax use headerImg otherwise bgImg -->
<div class="breadcrumb_box"> <div class="container"><?php
echo do_shortcode( '[breadcrumb]' ); 
?></div></div>
		<section class="pageImage">
        
			<?php putRevSlider("dining_banner","134") ?>
	
		</section>
	
        
    </main>
<div class="container">
            <div>
                <section class="pageTitle text-center">
                    <div class="um_helper">
                    	<div class="um_middle">
                    		<h3 class="title pageTitle titleUp"><?php the_title(); ?></h3>
                    	</div>
                    </div>
                </section>
                
				
				<?php if(get_the_content()): ?>
					<section class="theContent1">
						<?php the_content(); ?>
					</section>
				<?php endif; ?>
			
				
				
				<?php $atractions = get_field('atractions'); ?>
				<?php if($atractions): ?>
	              

	                <section class="articles">
	                	<div class="masontyContainer row">
	                		
	                		 	 <?php foreach($atractions as $attraction): ?>
			               	
			               	
			               	<?php $col = 'col-md-3 col-md-4 col-md-8 col-sm-6 col-xs-12'; ?>
			               	<?php if($attraction['format'] == "a_landscape"){
			               			$col = 'col-md-6 col-sm-12 col-xs-12';
			               		}
			               		elseif($attraction['format'] == "a_landscapeB"){
			               			$col = 'col-md-9 col-sm-12 col-xs-12';	
			               		}
								elseif($attraction['format'] == "a_box1"){
			               			$col = 'col-md-8 col-sm-12 col-xs-12';	
			               		}
								elseif($attraction['format'] == "a_landscapeb1"){
			               			$col = 'col-md-12 col-sm-12 col-xs-12';	
			               		}
								elseif($attraction['format'] == "a_landscape1"){
			               			$col = 'col-md-4 col-sm-12 col-xs-12';	
			               		}
								elseif($attraction['format'] == "a_landscapeB1"){
			               			$col = 'col-md-4 col-sm-12 col-xs-12';	
			               		} ?>
			               	
			               	
			                	<div class="um_masonryItem <?php echo $col; ?>">
			                		<a href="<?php echo $attraction['link']; ?>">
				                		<article class="theBox attrBox">
					                		<div class="boxContent">
					                			<?php $img = wp_get_attachment_image_src($attraction['image'], $attraction['format']); ?>
					                        	<img class="" src="<?php echo $img[0]; ?>"/>
					                        </div>
					                        <footer class="mainBgColor um_transition">
				                        		<h5 class="um_transition"><?php echo $attraction['title']; ?> <strong><?php echo $attraction['short_description']; ?></strong></h5>
					                        </footer>
					                	</article>
					                </a>	
			                	</div>
		                	<?php endforeach; ?>	              	
		                	
		                	
	                	</div>
	                </section>
                <?php endif; ?>
                
                	
            </div>
            <!--row-->
        </div>
    <?php get_footer(); ?>