<?php
/**
 * The template for displaying 404 pages (not found)
 *
 * @link https://codex.wordpress.org/Creating_an_Error_404_Page
 *
 * @package Sparta
 */
get_header(); 
$sparta_pages_404_img_content = get_theme_mod( 'sparta_pages_404_img_content', '' );

if($sparta_pages_404_img_content && $sparta_pages_404_img_content !=='') :
    $urlimg404 = $sparta_pages_404_img_content;
else :
    $urlimg404 = get_parent_theme_file_uri() . '/assets/images/404-icon.png';
endif;
?>
    <section class="vk-content">
        <div class="vk-banner vk-background-image-4 page-title-bg">
            <div class="vk-background-overlay"></div>
            <div class="container ">
                <div class="vk-banner-wrapper">
                    <div class="page-heading">
                        <?php echo esc_html__('404 page','sparta'); ?>
                    </div>
                    <div class="vk-breadcrumb">
                        <?php
                        Sparta_Core::get_sparta_template('breadcrumbs');
                        ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="vk-page page-error">
            <div class="vk-404page-content">
                <div class="container">
                    <h2 class="error-title">
                    <?php if(get_theme_mod( 'sparta_pages_404_main_title', '' ) !=='') :
                        echo get_theme_mod( 'sparta_pages_404_main_title', '' );
                    else:
                        echo esc_html__('Page Not Found!','sparta');
                    endif; ?>
                    </h2>
                    <p class="sub-txt">
                        <?php if(get_theme_mod( 'sparta_pages_404_main_txt', '' ) !=='') :
                            echo get_theme_mod( 'sparta_pages_404_main_txt', '' );
                        else:
                            echo esc_html__('We are sorry! The page you were looking for is not here!','sparta');
                        endif; ?>
                        <br>
                    <?php
                    printf( esc_html__( 'Return the %s', 'sparta' ),'<a href="'. esc_url( home_url( '/' ) ) .'" rel="nofollow">Homepage</a>' );
                    ?>
                    </p>
                    <img src="<?php echo esc_url($urlimg404); ?>" alt="<?php  esc_html_e( 'Sparta Page 404', 'sparta' ); ?>">
                </div>
            </div>
        </div>
    </section>
<?php
get_footer();
