<?php
/**
 * Template part for displaying posts
 *
 */

?>

<?php 
$event = [ 'start_date','end_date', 'location'];
foreach ($event as $v) {
    $$v = get_field( $v);
}
$block = has_post_thumbnail()?'small-8':'small-12';?>
<div class="post-list">
	<div class="row">
		<?php if(has_post_thumbnail()):?>
			<div class="column small-4">
				<a href="<?php the_permalink(); ?>" class="post-list__img"><?php the_post_thumbnail( 'lumbini-featured-image' ); ?></a>
			</div>
		<?php endif;?>

		<div class="column <?php echo $block;?>">
			
				<p class="post-list__title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></p>
				<span class="dim small bold capitalize"><?php echo $start_date;?> <?php if ($end_date) { echo " - ".$end_date; }?></span>
				

			
		</div>
	</div>
</div>