<?php

/**
 * The main template file
 */
defined('ABSPATH') || die("Can't access directly");
get_header(); ?>

<div class="w">
	<?php if (is_home()) :
		if (!empty(get_theme_mod('home_page_title', "-"))) : ?>
			<header>
				<h1 class="page-title home"><?php echo get_theme_mod('home_page_title', __('Free Online Games', 'arcade')); ?></h1>
			</header>
		<?php endif;
	else : ?>
		<header>
			<h1 class="page-title archive">
				<?php echo get_theme_mod('term_title_prefix', __('Free Online', 'arcade')); ?>
				<?php single_term_title(); ?>
				<?php echo get_theme_mod('term_title_suffix', __('Games', 'arcade')); ?>
			</h1>
		</header>
	<?php endif; ?>

	<main id="main" class="site-main w" role="main">
		<?php
		if (have_posts()) :
		?><div class="gtc w"><?php
									// Start the Loop.
									while (have_posts()) :
										the_post();
										get_template_part('template-parts/game', 'thumb');
									endwhile;
									?></div><?php
					arcade_pager();
				else :
					get_template_part('template-parts/content', 'none');
				endif;
					?>

	</main><!-- #main -->
	<?php
	if (is_home() && !$paged) arcade_footer_content('footer_content_home');
	?>
</div><!-- .w -->

<?php
get_footer();
