<?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="100%" height="100%" viewBox="0 0 50 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><path d="M22.585,57.853c-4,0 -7.64,-0.687 -10.92,-2.06c-3.273,-1.38 -5.95,-3.37 -8.03,-5.97l7.479,-8.805c3.444,2.012 5.515,4.155 8.895,4.155c2.24,0 5.069,-0.557 6.236,-1.91c1.173,-1.353 2.12,-3.09 2.12,-5.69l0,-1.966l15.28,0l0,1.036c0,7.067 -1.78,12.37 -5.34,15.91c-3.56,3.533 -8.8,5.3 -15.72,5.3Zm21.06,-26.103l-15.28,0l0,-3.158l15.28,0l0,3.158Zm0,-7.015l-15.28,0l0,-3.117l15.28,0l0,3.117Zm0,-6.974l-15.28,0l0,-3.089l-19.263,0l-0.004,-12.509l34.547,0l0,15.598Z"/></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">'; ?>
