<?php get_header(); ?>
	<div class="wrapper white-dark-bg">
		<div class="page-header">
			<div class="wrapper-inside cf">
				<span class="page-name left"><?php _e('Gallery', 'aletheme'); ?></span>

				<?php echo get_breadcrumbs(); ?>
			</div>
		</div>

		<div class="gallery-archive-page">
			<div class="text-block">
				<h2><?php echo esc_attr(ale_get_option('gallery_title')); ?></h2>
				<p><?php echo esc_attr(ale_get_option('gallery_text')); ?></p>
			</div>

			<div class="isotope">
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
					<div <?php post_class('item left'); ?>>
						<?php if(get_the_post_thumbnail($post->ID,'gallery-thumbmini')) {
							echo get_the_post_thumbnail($post->ID,'gallery-thumbmini');
						} else {
							echo "<img src='http://placehold.it/565x315&amp;text=No+image' alt>";
						} ?>

						<a class="overlay" href="<?php the_permalink(); ?>">
							<span class="link"><i class="fa fa-angle-right"></i></span>
						</a>
					</div>
				<?php endwhile; endif; wp_reset_postdata();?>
			</div>

			<?php echo ale_page_links(); ?>
		</div>
	</div>
<?php get_footer(); ?>