<?php $u_setting = get_user_settings($id); ?>
<div class="gallery_area themestyle_7">
	<div class="gallery_top_menu">
		<ul class="gallery_sort filters">
			<li><button  data-filter='*' class="active btn btn_style_<?= get_user_info_by_slug($slug)['btn_style'];?>"><?= !empty(lang('all'))?lang('all'):"All"?></button></li>
			<?php foreach ($portfolio_type as $key => $type): ?>
				<li><button class="btn btn_style_<?= get_user_info_by_slug($slug)['btn_style'];?>"  data-filter='.<?= html_escape($type['id']);?>' class="default-button"><?= html_escape($type['name']);?></button></li>
			<?php endforeach ?>
		</ul>
	</div>
	<div class="grid">
		<?php foreach ($portfolio as $key => $row): ?>
			<div class ="grid-item <?= $row['type_id']?> <?= $row['is_video']==1?"":"portfolio_single_img";?> style_2_1" >
				<?php if($row['is_video']==1): ?>
					<div class="videoWrapper portfolioVideo">
						<iframe src="<?= $row['link']; ;?>" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
						<?php if(!empty(html_escape($row['title']))): ?>
							<p class="video_title"><?= html_escape($row['title']);?> </p> 
						<?php endif ?>
					</div>
				<?php else: ?>
					<div class="portfolio_img">
						<img src="<?php echo base_url($row['thumb']); ?>" alt="" />
						<div class="portfolio_hover_area">
							<a href="<?=!empty($row['link'])?html_escape($row['link']):'javascript:;'?>" class=""><i class="fa fa-link"></i></a>
							<a data-fancybox="gallery" href="<?php echo base_url($row['image']); ?>"><i class="fa fa-eye"></i></a>
						</div>
						<div class="port_title">
							<?php if(!empty(html_escape($row['title']))): ?>
								<h5><?= html_escape($row['title']);?></h5> 
							<?php endif ?>
						</div>
					</div>
				<?php endif;?>

			</div>
		<?php endforeach; ?>
	</div>
</div>