-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
184 lines (172 loc) · 5.5 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Elakisto
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'elakisto' ); ?></a>
<header id="masthead" class="site-header container">
<table>
<tr>
<td class="site-branding-td">
<?php
$nav_alignment = get_theme_mod( 'header_nav_align_setting', 'left' );
if ( $nav_alignment == 'hamburger') { ?>
<nav id="site-navigation" class="main-navigation">
<button id="menu-toggle-button" class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
<span class="screen-reader-text">
<?php esc_html_e( 'Primary Menu', 'elakisto' ); ?>
</span>
<i class="icon-hamburger">
<span class="icon-hamburger-line"></span>
<span class="icon-hamburger-line"></span>
<span class="icon-hamburger-line"></span>
</i>
</button>
<div class="menu-wrapper">
<?php elakisto_site_branding(); ?>
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
'depth' => 3,
) );
?>
<button id="menu-close-button" class="menu-close">
<span>
<?php esc_html_e( 'Close', 'elakisto' ); ?>
</span>
<i class="icon-close">
<span class="icon-close-line"></span>
<span class="icon-close-line"></span>
</i>
</button>
</div>
<div class="menu-background"></div>
</nav><!-- #site-navigation -->
<?php } else { ?>
<button id="menu-toggle-button" class="menu-toggle mobile-menu-toggle" aria-controls="primary-menu" aria-expanded="false">
<span class="screen-reader-text">
<?php esc_html_e( 'Primary Menu', 'elakisto' ); ?>
</span>
<i class="icon-hamburger">
<span class="icon-hamburger-line"></span>
<span class="icon-hamburger-line"></span>
<span class="icon-hamburger-line"></span>
</i>
</button>
<?php
}
?>
<?php elakisto_site_branding(); ?>
</td>
<?php
if ( $nav_alignment != 'hamburger') { ?>
<td class="main-navigation-td">
<nav id="site-navigation" class="main-navigation">
<div class="menu-wrapper">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
'depth' => 3,
) );
?>
<button id="menu-close-button" class="menu-close">
<span>
<?php esc_html_e( 'Close', 'elakisto' ); ?>
</span>
<i class="icon-close">
<span class="icon-close-line"></span>
<span class="icon-close-line"></span>
</i>
</button>
</div>
<div class="menu-background"></div>
</nav><!-- #site-navigation -->
<?php if ( function_exists( 'jetpack_social_menu' ) ) {
if ( has_nav_menu( 'jetpack-social-menu' ) ) { ?>
<!-- Social menu -->
<div id="bigSocialWrap" class="social-wrapper">
<?php elakisto_social_menu(); ?>
</div>
<?php
}
}
?>
</td>
<?php } else { ?>
<td class="main-navigation-td">
<?php if ( function_exists( 'jetpack_social_menu' ) ) {
if ( has_nav_menu( 'jetpack-social-menu' ) ) { ?>
<!-- Social menu -->
<div id="bigSocialWrap" class="social-wrapper">
<?php elakisto_social_menu(); ?>
</div>
<?php
}
}
?>
</td>
<?php
}
?>
<td class="social-search-td">
<div class="social-search-wrapper">
<?php if ( function_exists( 'jetpack_social_menu' ) ) {
if ( has_nav_menu( 'jetpack-social-menu' ) ) { ?>
<!-- Social menu -->
<button class="social-button">
<span class="social-follow"><?php esc_html_e( 'Follow', 'elakisto' ); ?></span>
<span class="social-close"><?php esc_html_e( 'Close', 'elakisto' ); ?>
<i class="icon-close">
<span class="icon-close-line"></span>
<span class="icon-close-line"></span>
</i>
</span>
</button>
<?php
}
}
?>
<!-- Search form -->
<button class="big-search-trigger">
<span class="screen-reader-text"><?php esc_html_e( 'open search form', 'elakisto' ); ?></span>
<i class="icon-search"></i>
</button>
</div>
</td>
</tr>
</table>
</header><!-- #masthead -->
<!-- Search form -->
<div class="search-wrap">
<div class="search-line">
<span class="search-instructions"><?php esc_html_e( 'Search and Hit Enter', 'elakisto' ); ?></span>
<?php get_search_form(); ?>
</div>
<button class="big-search-close">
<span><?php esc_html_e( 'Close', 'elakisto' ); ?></span>
<i class="icon-close">
<span class="icon-close-line"></span>
<span class="icon-close-line"></span>
</i>
</button>
</div>
<div class="menu-background"></div>
<div id="content" class="site-content">