<?php
/**
 * Header file for the Vintuna WordPress theme.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Vintuna
 * @since 1.0.0
 */
?><!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
if (function_exists('wp_body_open')) {
    wp_body_open();
} ?>

<div class="preloader hide-no-js">
    <div class="preloader-style preloader-style-1"></div>
</div>

<div id="page" class="hfeed site">
    <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e('Skip to the content', 'vintuna'); ?></a>
    <?php
    $vintuna_default = vintuna_get_default_theme_options();
    $ed_header_subscription_news = get_theme_mod('ed_header_subscription_news', $vintuna_default['ed_header_subscription_news']);
    $ed_header_subscription_posts_title = get_theme_mod('ed_header_subscription_posts_title', $vintuna_default['ed_header_subscription_posts_title']);
    $header_subscription_image = get_theme_mod('header_subscription_image');
    $ed_header_subscription_shortcode = get_theme_mod('ed_header_subscription_shortcode');
    ?>
    <?php if ($ed_header_subscription_news) { ?>
        <div class="theme-modal">
            <div class="theme-modal-content">
                <a href="" class='theme-modal-close'>
                    <?php vintuna_theme_svg('cross'); ?>
                </a>
                <div class="theme-modal-image data-bg data-bg-big" data-background='<?php echo esc_url($header_subscription_image); ?>'></div>
                <div class="theme-modal-detail">
                    <h2 class="entry-title- entry-title-medium">
                        <?php echo esc_html($ed_header_subscription_posts_title); ?>
                    </h2>
                    <?php echo do_shortcode($ed_header_subscription_shortcode); ?>
                </div>
            </div>
        </div>
    <?php } ?>
    <?php vintuna_header_ad(); ?>
    <?php get_template_part('template-parts/header', 'content'); ?>
    <?php vintuna_header_banner(); ?>
    <div id="content" class="site-content">
        <div class="wrapper">
            <div class="column-row">
                <div class="column column-12">
                    <?php
                    $vintuna_post_layout = get_post_meta( get_the_ID(), 'vintuna_post_layout', true );
                    if ( is_front_page() && !is_paged() ) {
                        vintuna_header_ticker_posts();
                    }
                    elseif ( is_archive() ) {
                        vintuna_header_ticker_posts();
                    }
                    elseif ( is_singular() && $vintuna_post_layout != 'layout-2' ) {
                        vintuna_header_ticker_posts();
                    }
                    ?>