-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
70 lines (66 loc) · 2.29 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- <link rel="preconnect" href="https://fonts.gstatic.com"> -->
<link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/dist/styles/style.min.css" media="all"/>
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="node_modules/html5shiv/dist/html5shiv.js"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class('no-scroll_js'); ?>>
<section id="main-container">
<header>
<div class="top-nav flex items-center" <?= get_field('background_color_tn', 'option') ? 'style="background:' . get_field('background_color_tn', 'option') . '"' : '' ?>>
<div class="container-max">
<ul class="flex justify-end">
<?php
if( have_rows('add_navigation', 'option') ):
while( have_rows('add_navigation', 'option') ) : the_row();
$link = get_sub_field('link');
$icon = get_sub_field('icon');
if( $link ):
$link_url = $link['url'];
$link_title = $link['title'];
$link_target = $link['target'] ? $link['target'] : '_self';
endif; ?>
<li class="flex items-center">
<img src="<?= $icon['url'] ?>" alt="">
<a class="button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
</div>
<div class="main-nav flex items-center">
<div class="container-max">
<div class="flex items-center justify-space-bet">
<?php $logo = get_field('logo', 'option'); ?>
<div class="site-logo">
<a class="flex items-center" href="<?= get_site_url(); ?>">
<img src="<?= $logo['url'] ?>" alt="Helperbees Logo">
</a>
</div>
<?php
wp_nav_menu( array(
'menu' => 'Main Menu',
'menu_class' => 'show-tbl text-center items-center'
) );
?>
<div class="mobile-nav">
<div id="menu-hamburger">
<span></span>
</div>
</div>
</div>
</div>
</div>
</header>