<?php foreach ($posts as $key=>$post) { ?>
	<div class="col-lg-6 col-md-6 " data-aos="fade-up" data-aos-delay="<?= $key+1;?>00">
		<div class="single-blog style_2">
		  		<div class="blog_wrapper">
		  			<div class="blog_left_img">
			  			<a class="" href="<?= base_url('post/'.$slug.'/'.$post['slug']);?>">
			  				<?php if($post['is_video']==0): ?>
								<img src="<?= base_url(html_escape($post['thumb']));?>" alt="">
								<?php else: ?>
									<div class="videoWrapper">
										<iframe src="<?= html_escape($post['thumb']);?>" frameborder="0"></iframe>
									</div>
								<?php endif;?>
			  			</a>
		  			</div>
		  			<ul class="blog_ul">
	  					<li><i class="fa fa-calendar"></i> <?= cl_format(html_escape($post['created_at']));?></li>
	  					<li><i class="fa fa-eye"></i> <?= html_escape($post['hit']);?></li>
	  				</ul>
		  			<div class="blog_right_details">
		  				<a class="" href="<?= base_url('post/'.$slug.'/'.$post['slug']);?>">
			  				<h2><?= character_limiter(html_escape($post['title']),30);?></h2>
			  			</a>
		  				<p><?= character_limiter(html_escape($post['overview']),100);?></p>
		  				<div class="blog_post_tag">
		  					<?php foreach ($post['tags'] as $post_tag): ?>
		  					<a href="<?= base_url('tag-post/'.$slug.'/'.html_escape($post_tag['tag_slug'])); ?>" class="posted_tag"><?= html_escape($post_tag['tag_name'])?></a>
		  				<?php endforeach ?>
		  				</div>
		  			</div>
		  		</div>
			
		</div>
	</div>
<?php } ?>