
<div class="container p-t-2">

	<div class="row">
		<div class="col-lg-3 col-md-4">		
							<?php echo get_ads("ads1","ads card card-block no-padding p-b-1 p-t-1"); ?>

			<?php if($top){ ?>
			<div class="card card-block">
				<h2 class="small p-b-1"><?php echo __("Top Sites"); ?></h2>
				<?php foreach ($top as $key => $value){ 
					
					?>
				<div class="site-list">
					<div class="score"><?php echo $value->score; ?></div>
					<div class="data">
						<div class="title truncate"><?php echo badWords($value->metaTitle); ?></div>
						<a href="<?php echo base_url(); ?><?php echo $value->url; ?>" class="subtitle truncate"><?php echo badWords($value->url); ?></a>
					</div>
				</div>
				<?php }  ?>				
			</div>
			<?php } ?>

			<?php if($recents){ ?>
			<div class="card card-block">
				<h2 class="small p-b-1"><?php echo __("Latest Sites"); ?></h2>
				<?php foreach ($recents as $key => $value){ 
					
					?>
				<div class="site-list">
					<div class="score"><?php echo $value->score; ?></div>
					<div class="data">
						<div class="title truncate"><?php echo badWords($value->metaTitle); ?></div>
						<a href="<?php echo base_url(); ?><?php echo $value->url; ?>" class="subtitle truncate"><?php echo badWords($value->url); ?></a>
					</div>
				</div>
				<?php }  ?>				
			</div>
			<?php } ?>


		</div>
		<div class="col-lg-9 col-md-8">		

			<h2 class="light"><?php echo badWords($title); ?></h2>
			
			<div class="card card-block">
				<?php
					foreach ($list as $key => $value) {		
						if($key>=12)	
							continue;
						if(trim(badWords($value->metaTitle)) == '')				
							$value->metaTitle = '-';
						?>
						<div class="col-md-4 search-item">
							<a class="card link-black" href="<?php echo base_url(); ?><?php echo $value->url; ?>">
						  		<span class="score"><?php echo $value->score; ?></span> 
						  		<img class="card-img-top img-fluid lazy"  src="http://free.pagepeeker.com/v2/thumbs.php?size=x&url=<?php echo $value->url; ?>" alt="Card image cap">
						  		
						  		<div class="card-block truncate">
						  			<progress class="progress progress-sm <?php echo getColorProgress($value->score,80); ?>" value="<?php echo $value->score; ?>" max="100"></progress>								    		
									<div class="truncate"><?php echo badWords($value->metaTitle); ?></div>
									<div class="truncate text-success"><?php echo badWords($value->url); ?></div>
								
									<div>
										<small class="text-muted"><?php echo __("Last Updated:"); ?> <?php echo ago($value->updated); ?></small>
									</div>
						  		</div>
							</a>
						</div>
						<?php
					}
					?>
			</div>


			<?php  if(count($list)>12 && $filter)
			{
				?>
				
					<div class="text-xs-center">
						<nav aria-label="Page navigation">
						  <ul class="pagination">
						  	<?php if($offset>0){ ?>
						    <li class="page-item">
						      <a class="page-link" href="<?php echo base_url(); ?><?php echo config_item("slug_filter"); ?>/<?php echo $filter; ?>/<?php echo urlencode($search); ?>/<?php echo $currentPage-1; ?>" aria-label="Previous">
						        <span aria-hidden="true"><i class="zmdi zmdi-arrow-left"></i> <?php echo __("Previous"); ?></span>
						       
						      </a>
						    </li>
						      <li class="page-item active">
							      <a class="page-link" href="#"><?php echo $currentPage; ?></a>
							    </li>
						    <?php } ?>
					
						    <li class="page-item">
						      <a class="page-link" href="<?php echo base_url(); ?><?php echo config_item("slug_filter"); ?>/<?php echo $filter; ?>/<?php echo urlencode($search); ?>/<?php echo $currentPage+1; ?>" aria-label="Next">
						        <span aria-hidden="true"><?php echo __("Next"); ?> <i class="zmdi zmdi-arrow-right"></i></span>
						        
						      </a>
						    </li>
						  </ul>
						</nav>
					</div>
				
				<?php
			}
			else
			{
				if($offset>0)
				{
					?>
					<div class="text-xs-center">
						<nav aria-label="Page navigation">
						  <ul class="pagination">
						  
						    <li class="page-item">
						      <a class="page-link" href="#" aria-label="Previous">
						        <span aria-hidden="true"><i class="zmdi zmdi-arrow-left"></i> <?php echo __("Previous"); ?></span>
						       
						      </a>
						    </li>
						 
					
						 
						  </ul>
						</nav>
					</div>
				<?php

				}
			}
			?>



		</div>


		

	</div>


</div>


