
<?php
$image = get_field('gallery_cover_image');

	$size = 'article';
			if($image){
			$thumb = $image['sizes'][$size];
			}
	
	
	$date_string = get_field('gallery_date');
	$date = DateTime::createFromFormat('d/m/Y', $date_string);
	$date_display = $date->format('d.m.Y'); 
	 ?>

    		<div class="article news gallery-loop">
            <div class="row align-items-center">
            <div class="col-lg-3">

        <?php if($image)  { ?>
         <div class="art-img">
        
           <a href="<?php the_permalink(); ?>">         
           <img src="<?php echo $thumb; ?>" alt="<?php the_title() ?>" />
           </a>
           
          
         </div>                   
                              
        <?php } else { ?>
        
           <div class="art-img no-img" data-mh="image">
          
          <a href="<?php the_permalink(); ?>">    
              <img src="<?php bloginfo ('template_url'); ?>/images/noimage.png"  alt="<?php the_title() ?>" />          
           </a>
               
            </div>                   
                                          
         <?php } ?>
      	</div><!--col-->
        <div class="col-lg-9">
                  
            <div class="info">
             <div class="gal-date"><?php echo $date_display; ?></div>
             <div class="art-title" data-mh="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
             <div class="excerpt" data-mh="ex"><?php the_field('summary_text')?></div>
              <div class="readmore">
              <a href="<?php the_permalink(); ?>"  class="hvr-shrink">
                <?php _e( 'Read More', 'themelang' )?>
              </a>
              </div>
           	</div><!--info-->
       </div><!--col-->
       </div><!--row-->
		 </div><!--article--> 
