<?php if (empty($journal3)) { ?>
<style>body { display: none !important; }</style>
<script>window.location = 'index.php?route=journal3/startup/error_not_installed';</script>
<?php } ?>
<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="<?php echo implode(' ', $journal3_classes); ?>" data-ov="<?php echo $journal3_oc_version; ?>" data-jv="<?php echo $journal3_version; ?>">
<head>
<meta charset="UTF-8" />
<meta name="theme-color" content="<?php echo $journal3->get('theme_color'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if (!$journal3->is_popup) { ?>
<?php foreach ($journal3_metas as $meta) { ?>
<meta <?php echo $meta['attr']; ?>="<?php echo $meta['name']; ?>" content="<?php echo $meta['content']; ?>"/>
<?php } ?>
<?php foreach ($journal3_meta_tags as $key => $tag) { ?>
<meta <?php echo $tag['type']; ?>="<?php echo $key; ?>" content="<?php echo $tag['content']; ?>"/>
<?php } ?>
<?php } ?>
<?php foreach ($journal3_links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" <?php echo $link['attrs']; ?>/>
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<?php if ($journal3_sentry_dsn_loader) { ?>
<?php if ($journal3->js_defer) { ?>
<script src="<?php echo $journal3_sentry_dsn_loader; ?>" crossorigin="anonymous" defer></script>
<?php } else { ?>
<script src="<?php echo $journal3_sentry_dsn_loader; ?>" crossorigin="anonymous"></script>
<?php } ?>
<?php } ?>
<script>window['Journal'] = <?php echo $journal3_js; ?>;</script>
<?php foreach ($journal3_inline_scripts as $script) { ?>
<script><?php echo $script; ?></script>
<?php } ?>
<?php foreach ($styles as $style) { ?>
<?php if ($style['href']) { ?>
<link href="<?php echo $style['href']; ?>" type="text/css" rel="<?php echo $style['rel']; ?>" media="<?php echo $style['media']; ?>" />
<?php } else { ?>
<style><?php echo $style['content']; ?></style>
<?php } ?>
<?php } ?>
<script>performance.mark('css');</script>
<?php foreach ($journal3_css as $css) { ?>
<style <?php if ($css['id']) { ?>data-id="<?php echo $css['id']; ?>"<?php } ?>><?php echo $css['css']; ?></style>
<?php } ?>
<script>performance.measure('css', 'css');</script>
<?php if ($journal3->get('customCSS')) { ?>
<style><?php echo $journal3->get('customCSS'); ?></style>
<?php } ?>
<?php foreach ($scripts as $script) { ?>
<?php if ($journal3->js_defer) { ?>
<script src="<?php echo $script; ?>" defer></script>
<?php } else { ?>
<script src="<?php echo $script; ?>"></script>
<?php } ?>
<?php } ?>
<?php foreach ($scripts_defer as $script) { ?>
<script src="<?php echo $script; ?>" defer></script>
<?php } ?>
<?php if ($journal3->get('customCodeHeader')) { ?>
<?php echo $journal3->get('customCodeHeader'); ?>
<?php } ?>
<?php foreach ($analytics as $analytic) { ?>
<?php echo $analytic; ?>
<?php } ?>
</head>
<body class="<?php echo $class ?? null; ?>">

<?php echo $journal3_background_slider; ?>

<?php if ($journal3_home_h1): ?>
<h1 style="position: absolute; height: 1px; width: 1px; clip: rect(0,0,0,0);"><?php echo $journal3_home_h1; ?></h1>
<?php endif; ?>

<?php if ($journal_admin_bar_links) { ?>
<div class="admin-bar">
  <div class="j-logo">
    <svg width="512px" height="512px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
      <title>J3</title>
      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="J3" fill-rule="nonzero">
          <path d="M256.000557,512 C397.384748,512 512,397.384698 512,256.000446 C512,114.615079 397.384748,0 256.000557,0 C114.615252,0 0,114.615079 0,256.000446 C0,397.384698 114.615252,512 256.000557,512 Z" id="BG-Outer" fill="#6790DA"></path>
          <path d="M256.000457,466 C371.979676,466 466,371.979636 466,256.000366 C466,140.020182 371.979676,46 256.000457,46 C140.020324,46 46,140.020182 46,256.000366 C46,371.979636 140.020324,466 256.000457,466 Z" id="BG-Inner" fill="#0D52D6"></path>
          <path d="M216.194955,386.412646 C206.303796,386.617232 195.797885,386.734277 189.951036,386.084719 L189.951036,329.987416 C209.71318,330.020662 221.727013,330.037284 225.992535,330.037284 C245.252334,330.037284 261.013567,323.420558 261.013567,293.719683 L261.013567,164.986102 L322,164.986102 L322,289.480887 C322,365.707612 280.634337,385.683028 235.507407,386.078742 L232.645402,386.090602 C231.087699,386.102109 229.342494,386.129703 227.465826,386.166355 L216.194955,386.412646 Z" id="Path" fill="#FFFFFF"></path>
          <polygon id="Path" fill="#FFFFFF" points="322 144.006222 322 124.030762 261.041677 124.030762 261.041677 144.006222"></polygon>
          <polygon id="Path" fill="#FFFFFF" points="261.029977 104.007695 322 104.007695 322 84.0271859 261.029977 84.0271859"></polygon>
          <path d="M261.001362,0.0478691985 C282.06378,0.451418555 302.50341,3.39872913 322.025809,8.5953623 L322.023739,64.0029947 L261.008707,64.0029947 L261.001362,0.0478691985 Z" id="Path" fill="#FFFFFF"></path>
        </g>
      </g>
    </svg>
    <span>Editor</span>
  </div>
  <div class="admin-bar-buttons">
    <?php foreach ($journal_admin_bar_links as $link) { ?>
      <button data-edit="<?php echo $link['edit']; ?>"><?php echo $link['name']; ?></button>
    <?php } ?>
  </div>
  <button class="admin-close-bar" type="button" title="Toggle Editor"><span>&times;</span></button>
</div>
<?php } ?>

<?php if ($journal3->get('oldBrowserStatus')) { ?>
<div class="old-browser">
  <div class="ob-content">
    <h2 class="ob-title"><?php echo $journal3->get('oldBrowserTitle'); ?></h2>
    <span class="ob-text"><?php echo $journal3->get('oldBrowserText'); ?></span>
    <div class="ob-links">
      <a href="https://www.google.com/chrome/" target="_blank" rel="nofollow">
        <img src="<?php echo $journal3->get('oldBrowserChrome'); ?>" alt="Chrome" />
        <span class="ob-name">Chrome</span>
      </a>
      <a href="https://www.mozilla.org/firefox/new/" target="_blank" rel="nofollow">
        <img src="<?php echo $journal3->get('oldBrowserFirefox'); ?>" alt="Firefox" />
        <span class="ob-name">Firefox</span>
      </a>
      <a href="https://www.microsoft.com/en-us/windows/microsoft-edge" target="_blank" rel="nofollow">
        <img src="<?php echo $journal3->get('oldBrowserEdge'); ?>" alt="edge" />
        <span class="ob-name">Microsoft Edge</span>
      </a>
      <a href="https://www.opera.com/" target="_blank" rel="nofollow">
        <img src="<?php echo $journal3->get('oldBrowserOpera'); ?>" alt="opera" />
        <span class="ob-name">Opera</span>
      </a>
      <a href="https://www.apple.com/lae/safari/" target="_blank" rel="nofollow">
        <img src="<?php echo $journal3->get('oldBrowserSafari'); ?>" alt="safari" />
        <span class="ob-name">Safari on Mac</span>
      </a>
    </div>
  </div>
</div>
<?php } ?>

<?php if (!$journal3->is_popup) { ?>
<div class="mobile-container mobile-main-menu-container">
  <?php echo $journal3->get('mobile_bottom_menu'); ?>
  <div class="mobile-wrapper-header">
    <span><?php echo $journal3->get('headerMobileMenuTitle'); ?></span>
    <div class="mobile-wrapper-top-menu"><?php echo $journal3->get('mobile_top_menu_2'); ?></div>
    <?php if ($journal3->get('mobileLangPosition') === 'menu') { ?>
      <div class="language-currency top-menu">
        <div class="mobile-currency-wrapper">
          <?php echo $journal3->get('mobile_header_active') ? $currency : ''; ?>
        </div>
        <div class="mobile-language-wrapper">
          <?php echo $journal3->get('mobile_header_active') ? $language : ''; ?>
        </div>
      </div>
    <?php } ?>
    <a class="x" href="javascript:;" title="Close"></a>
  </div>
  <template class="mobile-main-menu-wrapper"><?php echo $journal3->get('mobile_main_menu'); ?></template>
  <?php echo $journal3->get('headerMobileMenuAccordion'); ?>
  <?php echo $journal3->get('headerMobileMenuBuilder'); ?>
</div>

<div class="mobile-container desktop-mobile-main-menu-container">
  <div class="mobile-wrapper-header">
    <span><?php echo $journal3->get('headerMobileMenuTitle'); ?></span>
    <a class="x" href="javascript:;" title="Close"></a>
  </div>
  <div class="desktop-mobile-main-menu-wrapper"><?php if ($journal3->get('mobileMenu1')) { ?><?php echo $journal3->get('desktop_main_menu'); ?><?php } ?><?php if ($journal3->get('mobileMenu2')) { ?><?php echo $journal3->get('desktop_main_menu_2'); ?><?php } ?></div>
  <?php echo $journal3->get('headerDesktopMobileMenuAccordion'); ?>
  <?php echo $journal3->get('headerDesktopMobileMenuBuilder'); ?>
</div>

<div class="mobile-container mobile-filter-container">
  <div class="mobile-wrapper-header">
    <span><?php echo $journal3->get('mobileFilterTitle'); ?></span>
    <button aria-label="Reset" class="reset-filter btn"><?php echo $journal3->get('mobileFilterReset'); ?></button>
    <a class="x" href="javascript:;" title="Close"></a>
  </div>
  <div class="mobile-filter-wrapper"></div>
</div>

<div class="mobile-container mobile-cart-content-container">
  <div class="mobile-wrapper-header">
    <span><?php echo $journal3->get('headerMobileCartTitle'); ?></span>
    <a class="x" href="javascript:;" title="Close"></a>
  </div>
  <div class="mobile-cart-content-wrapper cart-content"></div>
</div>
<?php } ?>

<?php echo $journal3_popup; ?>

<?php echo $journal3_bottom_menu; ?>

<?php echo $journal3_side_menu; ?>

<?php echo $journal3_notification; ?>

<?php echo $journal3_header_notice; ?>

<?php echo '<div class="global-wrapper">'; ?>

<?php if ($journal3_header_desktop || $journal3_header_mobile) { ?>
<header class="header-<?php echo $journal3->get('headerType'); ?>">
  <?php echo $journal3_header_desktop; ?>
  <?php echo $journal3_header_mobile; ?>
  <div class="site-overlay"></div>
</header>
<?php } ?>

<?php echo '<div class="site-wrapper">'; ?>
