File: /home/imensosw/webofai.imenso.co/wp-content/themes/webofai_theme/header.php
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta content="ie=edge" http-equiv="X-UA-Compatible">
<!-- fix container-->
<style>
html {
--design-width: 1440;
--tablet-width: 992;
--mobile-width: 600;
--sMobile-width: 375;
font-size: calc((100vw / var(--sMobile-width)) * 10) !important;
width: 100vw;
overflow-x: hidden;
scrollbar-color: rgb(90, 90, 90) rgba(0, 0, 0, 0.2);
scrollbar-width: thin;
}
html.modal-opened {
overflow: hidden;
}
@media screen and (min-width: 375px) {
html {
font-size: 10px !important;
}
}
@media screen and (min-width: 600px) {
html {
font-size: calc((100vw / var(--tablet-width)) * 10) !important;
}
}
@media screen and (min-width: 992px) {
html {
font-size: calc((100vw / var(--design-width)) * 10) !important;
}
}
@media screen and (min-width: 1440px) {
html {
font-size: 10px !important;
}
}
@supports (-moz-appearance:none) {
@media screen and (min-width: 992px) {
html {
width: calc(100vw - 8px);
}
}
}
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<!-- Third party code ACF-->
<?php
$code_in_head_tag = get_field('code_in_head_tag', 'options');
$code_before_body_tag_after_head_tag = get_field('code_before_body_tag_after_head_tag', 'options');
$code_after_body_tag = get_field('code_after_body_tag', 'options');
?>
<?php wp_head(); ?>
<?= $code_in_head_tag ?>
</head>
<?php flush(); ?>
<?= $code_before_body_tag_after_head_tag ?>
<!--preloader style-->
<style>
.loading-bar {
position: fixed;
left: 0;
top: 0;
z-index: 999;
display: flex;
height: 5px;
width: 100%;
overflow: hidden;
}
.loading-bar .progress-bar {
display: flex;
height: 100%;
width: 100%;
background: #2F74F9;
transition: width 10s;
animation: progress-animation 5s ease-in-out;
}
@keyframes progress-animation {
0% {
width: 0%;
}
20% {
width: 10%;
}
40% {
width: 30%;
}
50% {
width: 60%;
}
100% {
width: 100%;
}
}
body.loaded .progress-bar {
animation-duration: 0.5s;
transition: opacity 0.1s 0.5s;
opacity: 0;
}
body main.theme-wp-site-blocks {
opacity: 0;
transition: opacity 0.5s;
}
body:not(.loaded) * {
transition: none !important;
}
body.loaded main.theme-wp-site-blocks {
opacity: 1;
}
[modal-content] {
display: none !important;
}
</style>
<!--end preloader style-->
<!-- ACF Fields -->
<?php
// get page name
global $post, $bgClass;
$header_logo = get_field('header_logo', 'options');
$submit = get_field('submit', 'options');
$user_id = get_current_user_id();
$user_img = get_user_meta($user_id, "user_image", true);
$page_link_group = get_field('blog_page', 'options');
$blog_page_link_url = \Theme\Helpers::get_key_from_array('page_archive', $page_link_group);
?>
<!-- END ACF -->
<body <?php body_class(); ?>>
<div class="loading-bar" aria-hidden="true">
<div class="progress-bar"></div>
</div>
<a skip-to-main-content
href="#main-content"> <?= __('Skip to main content', 'webofai_theme'); ?></a>
<?= $code_after_body_tag ?>
<!-- remove header if page template if full with no header and footer-->
<?php if (!is_page_template('templates/full-width-no-header-footer.php')): ?>
<header class="webofai-header">
<div class="overlay"></div>
<div class="container">
<div class="header-wrapper">
<!-- logo-->
<?php if ($header_logo) { ?>
<a href="<?= site_url() . '/' ?>" class="main-logo">
<?= \Theme\Helpers::get_image($header_logo, 'img-145-30'); ?>
</a>
<?php } ?>
<div class="logo-mobile">
<svg width="30" height="30" viewBox="0 0 30 30" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M15.35 0.8C15.35 1.10376 15.1038 1.35 14.8 1.35C14.4962 1.35 14.25 1.10376 14.25 0.8C14.25 0.496243 14.4962 0.25 14.8 0.25C15.1038 0.25 15.35 0.496243 15.35 0.8ZM25.75 4.8C25.75 5.10376 25.5038 5.35 25.2 5.35C24.8962 5.35 24.65 5.10376 24.65 4.8C24.65 4.49624 24.8962 4.25 25.2 4.25C25.5038 4.25 25.75 4.49624 25.75 4.8ZM5.75 25.2C5.75 25.5038 5.50376 25.75 5.2 25.75C4.89624 25.75 4.65 25.5038 4.65 25.2C4.65 24.8962 4.89624 24.65 5.2 24.65C5.50376 24.65 5.75 24.8962 5.75 25.2ZM15.35 29.2C15.35 29.5038 15.1038 29.75 14.8 29.75C14.4962 29.75 14.25 29.5038 14.25 29.2C14.25 28.8962 14.4962 28.65 14.8 28.65C15.1038 28.65 15.35 28.8962 15.35 29.2ZM25.35 25.2C25.35 25.5038 25.1038 25.75 24.8 25.75C24.4962 25.75 24.25 25.5038 24.25 25.2C24.25 24.8962 24.4962 24.65 24.8 24.65C25.1038 24.65 25.35 24.8962 25.35 25.2ZM29.75 14.8C29.75 15.1038 29.5038 15.35 29.2 15.35C28.8962 15.35 28.65 15.1038 28.65 14.8C28.65 14.4962 28.8962 14.25 29.2 14.25C29.5038 14.25 29.75 14.4962 29.75 14.8ZM5.75 4.8C5.75 5.10376 5.50376 5.35 5.2 5.35C4.89624 5.35 4.65 5.10376 4.65 4.8C4.65 4.49624 4.89624 4.25 5.2 4.25C5.50376 4.25 5.75 4.49624 5.75 4.8ZM1.35 14.8C1.35 15.1038 1.10376 15.35 0.8 15.35C0.496243 15.35 0.25 15.1038 0.25 14.8C0.25 14.4962 0.496243 14.25 0.8 14.25C1.10376 14.25 1.35 14.4962 1.35 14.8Z"
fill="#1363DF" stroke="#1363DF" stroke-width="0.5"/>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M14.7984 0.638306L25.1144 4.68381L29.3623 15.0001L25.1144 25.3164L14.7984 29.3619L5.08638 25.3152L0.636719 15.0001L5.08638 4.68497L14.7984 0.638306ZM14.8043 1.19909L12.2695 7.64163L15.0592 8.82726L17.5536 7.77591L14.8043 1.19909ZM17.8301 7.65939L15.0751 1.06907L24.602 4.80511L17.8301 7.65939ZM17.6693 8.0527L15.4438 8.99071L18.627 10.3435L17.6693 8.0527ZM19.0224 10.5116L17.9458 7.93618L24.379 5.22467L19.1818 10.5793L19.0224 10.5116ZM18.7927 10.7399L15.0588 9.15302L11.2089 10.7757L15.1001 14.7847L18.8629 10.9079L18.7927 10.7399ZM18.9888 11.209L15.3091 15.0001L18.9888 18.7912L20.5736 15.0001L18.9888 11.209ZM20.7361 15.389L19.216 19.0254L19.2538 19.0643L21.8171 17.9749L20.7361 15.389ZM22.0932 17.8575L20.8987 15.0001L22.0932 12.1427L28.8166 15.0001L22.0932 17.8575ZM21.9328 18.2517L19.4778 19.2951L24.5564 24.5276L21.9328 18.2517ZM24.379 24.7755L19.1818 19.4209L19.0224 19.4886L17.9458 22.064L24.379 24.7755ZM17.6693 21.9475L18.627 19.6567L15.4438 21.0095L17.6693 21.9475ZM15.0592 21.1729L17.5536 22.2243L14.8043 28.8011L12.2695 22.3586L15.0592 21.1729ZM15.0588 20.8472L18.7927 19.2603L18.8629 19.0923L15.1001 15.2155L11.2089 19.2245L15.0588 20.8472ZM10.9656 19.0445L14.891 15.0001L10.9656 10.9557L9.37439 15.0001L10.9656 19.0445ZM9.2132 14.5904L10.6157 11.0257L8.20969 12.0398L9.2132 14.5904ZM7.93316 12.1564L9.052 15.0001L7.93316 17.8438L1.18628 15.0001L7.93316 12.1564ZM8.09982 11.7606L10.688 10.6697L5.61366 5.44158L8.09982 11.7606ZM5.82515 5.22873L10.8568 10.4129L11.8834 7.80351L5.82515 5.22873ZM11.9933 7.52424L14.5308 1.07479L5.58679 4.80147L11.9933 7.52424ZM5.1937 5.19358L7.82329 11.8771L1.08557 14.717L5.1937 5.19358ZM1.08557 15.2832L5.1937 24.8066L7.82329 18.1231L1.08557 15.2832ZM8.09982 18.2396L5.61366 24.5586L10.688 19.3305L8.09982 18.2396ZM10.8568 19.5873L5.82515 24.7715L11.8834 22.1967L10.8568 19.5873ZM12.1596 22.0793L14.6742 21.0106L11.1557 19.5277L12.1596 22.0793ZM11.9933 22.476L5.5868 25.1987L14.5308 28.9254L11.9933 22.476ZM15.0751 28.9311L17.8301 22.3408L24.602 25.1951L15.0751 28.9311ZM24.999 24.8087L22.2089 18.1343L28.9221 15.2812L24.999 24.8087ZM28.9221 14.719L24.999 5.19151L22.2089 11.8659L28.9221 14.719ZM21.9328 11.7485L24.5564 5.47263L19.4778 10.7051L21.9328 11.7485ZM19.216 10.9748L19.2538 10.9359L21.8171 12.0253L20.7361 14.6112L19.216 10.9748ZM10.6157 18.9745L9.2132 15.4098L8.20969 17.9604L10.6157 18.9745ZM12.1596 7.9209L11.1557 10.4725L14.6742 8.98957L12.1596 7.9209Z"
fill="#1363DF" stroke="#1363DF" stroke-width="0.5"/>
</svg>
</div>
<!-- search -->
<?php get_search_form(array('header_search_icon' => true, 'placeholder' => "Search All Tools")); ?>
<?php if (!is_user_logged_in()) { ?>
<!-- burger menu and cross-->
<button aria-label="Open Menu Links" class="burger-menu hide-only-lg">
<span></span>
<span></span>
<span></span>
</button>
<?php } ?>
<!-- links -->
<nav class="navbar">
<div class="navbar-wrapper">
<?php if (have_rows('menu_links', 'options')) { ?>
<ul class="primary-menu">
<?php while (have_rows('menu_links', 'options')) {
the_row();
$menu_link = get_sub_field('menu_link');
$has_sub_menu = get_sub_field('has_menu');
?>
<?php if ($menu_link) { ?>
<li
class="menu-item <?= ($has_sub_menu) ? 'menu-item-has-children' : '' ?>">
<div class="arrow-link-wrapper">
<a class="header-link" href="<?= $menu_link['url'] ?>"
target="<?= $menu_link['target'] ?>">
<?= $menu_link['title'] ?></a>
<?php if ($has_sub_menu) { ?>
<div class="arrow">
<svg width="20" height="20" viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M5 7.5L10 12.5L15 7.5" stroke="#1A1A1A"
stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round"/>
</svg>
</div>
<?php } ?>
</div>
<?php if ($has_sub_menu && have_rows('submenu', 'options')) { ?>
<ul class="sub-menu">
<?php while (have_rows('submenu', 'options')) {
the_row();
$submenu_link = get_sub_field('submenu_link');
$icon = get_sub_field('icon');
?>
<?php if ($submenu_link) { ?>
<li class="menu-item-in-sub-menu">
<a class="header-sublink"
href="<?= $submenu_link['url'] ?>"
target="<?= $submenu_link['target'] ?>">
<div class="icon-wrapper">
<?= \Theme\Helpers::get_image($icon, 'small'); ?>
</div>
<?= $submenu_link['title'] ?>
</a>
</li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
</li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<a href="<?= site_url() . '/submit-a-tool' ?>"
class="header-link animated-btn sub-a-tool secondary-btn submit-btn"><?= __('Submit a Tool', 'futurepedia_theme') ?></a>
<?php if (is_user_logged_in()) { ?>
<a href="<?= site_url() . '/favorite-tools/' ?>"
class='header-link logout animated-btn'><?= __('Favourites', 'futurepedia_theme') ?></a>
<a href="<?= site_url() . '/about-us/' ?>"
class='header-link logout animated-btn'><?= __('About us', 'futurepedia_theme') ?></a>
<a href="<?= $blog_page_link_url ?>"
class="header-link logout animated-btn"><?= __('Blog', 'futurepedia_theme') ?></a>
<a href='<?= wp_logout_url(home_url()); ?>' class='header-link logout animated-btn '> <?= __('logout', 'futurepedia_theme') ?></a>
<?php } else { ?>
<?php /*<a href="<?= site_url() . '/login'?>" class="btns-wrapper">
<button
class="cta-button login animated-btn "><?= __('login', 'futurepedia_theme') ?></button>
<!-- <button-->
<!-- class="cta-button sign-up animated-btn ">--><?php //= __('Sign up', 'futurepedia_theme') ?><!--</button>-->
</a>*/ ?>
<?php
global $wp;
$redirect_to = home_url( $wp->request );
echo do_shortcode('[google_login button_text="Sign In" force_display="yes" redirect_to="'.$redirect_to.'"]'); ?>
<?php } ?>
</div>
</nav>
<!-- --><?php //if (is_user_logged_in()) { ?>
<picture class='user-image '>
<?php if ($user_img) { ?>
<?= \Theme\Helpers::get_image($user_img) ?>
<?php } else { ?>
<img
src="<?= DH_IMAGE_DIR . 'backgrounds/default-user-image.png' ?>"
alt=''>
<?php } ?>
<!-- logged in menu -->
<ul class="logged_in_menu ">
<li class="logged_in_menu_item"><a
href="<?= site_url() . '/submit-a-tool' ?>"
<li class='logged_in_menu_item'>
<a href='' class='header-sublink mobile'><?= __('Explore', 'futurepedia_theme') ?></a>
</li>
<li class="logged_in_menu_item"><a
href="<?= site_url() . '/favorite-tools/' ?>"
class="header-sublink"><?= __('Favourites', 'futurepedia_theme') ?></a>
</li>
<li class="logged_in_menu_item"><a
href="<?= site_url() . '/about-us/' ?>"
class="header-sublink"><?= __('About us', 'futurepedia_theme') ?></a>
</li>
<li class="logged_in_menu_item"><a
href="<?= $blog_page_link_url ?>"
class="header-sublink"><?= __('Blog', 'futurepedia_theme') ?></a>
</li>
<?php if (is_user_logged_in()) { ?>
<li class="logged_in_menu_item"><a
href=' <?= wp_logout_url(home_url()); ?>'
class='header-sublink logout animated-btn '><?= __('logout', 'futurepedia_theme') ?></a>
</li>
<?php } ?>
</ul>
</picture>
<!-- --><?php //} ?>
</div>
</header>
<?php endif; ?>
<main id="main-content" class="theme-wp-site-blocks">