<?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 Mindful Blog
 */

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

<footer id="colophon" class="site-footer">
	<?php if ( is_active_sidebar( 'footer-widget' ) || is_active_sidebar( 'footer-widget-2' ) || is_active_sidebar( 'footer-widget-3' ) ) : ?>
	<div class="site-footer-top">
		<div class="ascendoor-wrapper">
			<div class="footer-widgets-wrapper"> 
				<?php for ( $mindful_blog_i = 1; $mindful_blog_i <= 4; $mindful_blog_i++ ) { ?>
					<div class="footer-widget-single">
						<?php dynamic_sidebar( 'footer-widget-' . $mindful_blog_i ); ?>
					</div>
				<?php } ?>
			</div>
		</div>
	</div><!-- .footer-top -->
<?php endif; ?>
	<div class="site-footer-bottom">
		<div class="ascendoor-wrapper">
			<div class="site-footer-bottom-wrapper copyright-and-scroll-top">
					<div class="site-info">
						<?php
						/**
						 * Hook: mindful_blog_footer_copyright.
						 *
						 * @hooked - mindful_blog_output_footer_copyright_content - 10
						 */
						do_action( 'mindful_blog_footer_copyright' );
						?>
					</div><!-- .site-info -->
				<div class="asn-back2top">
					<?php $mindful_blog_scroll_top_text_label = get_theme_mod( 'mindful_blog_scroll_top_text_label', __( 'Back to Top', 'mindful-blog' ) ); ?>
						<a href="#" id="scroll-to-top" class="mindful-blog-scroll-to-top"><?php echo esc_html( $mindful_blog_scroll_top_text_label ); ?><i class="fas fa-chevron-up"></i></a>
				</div>
			</div>
		</div>
	</div>
</footer><!-- #colophon -->

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

<?php wp_footer(); ?>

</body>
</html>
