-
Notifications
You must be signed in to change notification settings - Fork 7
/
header.php
130 lines (123 loc) · 5.07 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!doctype html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<title><?php wp_title(''); ?></title>
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P4XQJZG');</script>
<!-- End Google Tag Manager -->
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo get_template_directory_uri(); ?>/img/icons/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="<?php echo get_template_directory_uri(); ?>/img/icons/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo get_template_directory_uri(); ?>/img/icons/favicon/favicon-16x16.png">
<link rel="manifest" href="<?php echo get_template_directory_uri(); ?>/img/icons/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#0A2B69">
<meta name="msapplication-TileImage" content="<?php echo get_template_directory_uri(); ?>/img/icons/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#0A2B69">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-itunes-app" content="app-id=1206647026">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" rel="stylesheet">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P4XQJZG"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- wrapper -->
<header class="header clear" role="banner">
<div class="row top">
<div class="col-lg-2 col-6">
<div class="logo">
<a href="<?php echo home_url(); ?>">
<?php get_template_part('inc/new-dash-logo.svg'); ?>
</a>
</div>
</div>
<div class="d-lg-none col-6">
<a href="#" class="menu-toggle menu-icon">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</a>
</div>
<?php
$homeid = "option";
?>
<div class="col-lg-10 col-12">
<div class="navbar" id="navbar-main">
<div class="bg">
<div class="arrow"></div>
</div>
<div class="navbar-container">
<?php while( have_rows('navigation_main',$homeid) ): the_row();
$navposts = get_sub_field('nav_item_list');
?>
<div class="navbar-item">
<div class="link">
<a href="<?php echo get_permalink($navposts[0])?>">
<?php echo get_sub_field('nav_item_title'); ?>
</a>
<span class="arrow"><img src="/wp-content/uploads/arrow-menu-1.svg"></span>
</div>
<?php if (is_countable($navposts)){?>
<div class="dropdown">
<?php
$idx = 0;
foreach( $navposts as $navpost):?>
<div class="link <?php echo ($idx==0?'first d-lg-none':'') ?>">
<a href="<?php echo get_the_permalink($navpost->ID) ?>"><?php echo get_the_title($navpost->ID)?></a>
</div>
<?php $idx++; endforeach; ?>
</div>
<?php }?>
</div>
<?php endwhile; ?>
<div class="navbar-item lang-mob">
<div class="link lang-mobile">
<?php
$current_language = apply_filters('wpml_current_language', NULL);
$languages = apply_filters('wpml_active_languages', NULL, 'skip_missing=0');
if (!empty($languages) && isset($languages[$current_language])) {
$current_lang = $languages[$current_language];
echo '<a href="#"><img src="' . esc_url($current_lang['country_flag_url']) . '" alt="' . esc_attr($current_lang['translated_name']) . '">';
echo '<span>Language | ' . esc_html($current_lang['translated_name']) . '</span></a>';
}
?>
</div>
<div class="dropdown">
<?php
if (!empty($languages)) {
foreach ($languages as $lang) {
if (!$lang['active']) {
echo '<div class="link"><a href="' . esc_url($lang['url']) . '"><img class="flag" src="' . esc_url($lang['country_flag_url']) . '" alt="' . esc_attr($lang['translated_name']) . '"> ' . esc_html($lang['translated_name']) . '</a></div>';
}
}
}
?>
</div>
</div>
<div class="navbar-item lang">
<div class="link">
<a href="#">
<span class="lang-current"></span>
<span class="icon-inline sm gray caret down">
<?php get_template_part('inc/caret.svg'); ?>
</span>
</a>
</div>
<div class="dropdown">
<?php do_action('wpml_add_language_selector'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</header>