<?php
/**
 * The template for displaying the footer
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Minimalistic Blog
 */

if ( ! is_front_page() || is_home() ) {
	?>
</div>
</div>
</div>
	<?php
}

?>

<footer class="site-footer">
	<div class="section-wrapper">
		<?php if ( is_active_sidebar( 'footer-widget' ) || is_active_sidebar( 'footer-widget-2' ) || is_active_sidebar( 'footer-widget-3' ) ) : ?>
		<div class="minimalistic-blog-middle-footer">
			<div class="middle-footer-wrapper three-column-2">
				<?php for ( $i = 1; $i <= 3; $i++ ) { ?>
					<div class="footer-container-wrapper">
						<div class="footer-content-inside">
							<?php dynamic_sidebar( 'footer-widget-' . $i ); ?>
						</div>
					</div>
				<?php } ?>
			</div>	
		</div>
		<?php endif; ?>
		<div class="minimalistic-blog-bottom-footer">
			<?php $social_menu_class = has_nav_menu( 'social' ) ? '' : 'no-social-menu'; ?>
			<div class="bottom-footer-content <?php echo esc_attr( $social_menu_class ); ?>">
				<?php
					/**
					 * Hook: minimalistic_blog_footer_copyright.
					 *
					 * @hooked - minimalistic_blog_output_footer_copyright_content - 10
					 */
					do_action( 'minimalistic_blog_footer_copyright' );
				?>
			</div>
		</div>
	</div>
</footer>

<?php
$scroll_top_text_label = get_theme_mod( 'minimalistic_blog_scroll_top_text_label', __( 'Scroll to top', 'minimalistic-blog' ) );
?>

	<a href="#" class="scroll-to-top">
		<span class="button-caption"><?php echo esc_html( $scroll_top_text_label ); ?></span>
		<span class="arrow-icon"></span>
	</a>

</div><!-- #page -->

<?php wp_footer(); ?>

</body>
</html>
