-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
116 lines (96 loc) · 3.67 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
<?php
/**
* The header for our theme
*
* @package log-book
* @version 1.0.1
*/
// For top header
$header_status = log_book_get_option( 'show_top_header' );
$back_to_top_type = log_book_get_option( 'back_to_top_type' );
$unique_id = esc_attr( uniqid( 'search-form-' ) );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<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(); ?>>
<?php
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
}
if($back_to_top_type == 'enable'): ?>
<div id="backTop"><i class="fa fa-arrow-up" aria-hidden="true"></i></div>
<?php endif; ?>
<a class="skip-link screen-reader-text"
href="#content"><?php esc_html_e('Skip to content', 'log-book'); ?></a>
<?php if( $header_status == '1' ): ?>
<!-- Topbar -->
<div class="tm-topbar">
<div class="container">
<!-- Social Links -->
<div class="social-icons">
<?php do_action( 'log_book_top_header_social_icon' );?>
</div>
<!-- /Social Links -->
<!-- Language and search -->
<div class="search-area">
<div class="search-top">
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input type="search" id="<?php echo $unique_id; ?>" class="form-control" type="text" placeholder="<?php echo esc_attr__( "Search …","log-book" ); ?>" value="<?php echo get_search_query(); ?>" name="s"/>
<button type="submit" class="btn btn-colored" name="submit" value="">
<span class="icon-magnifying-glass"></span>
</button>
</form>
</div>
</div>
<!-- /Language and search -->
</div>
</div>
<!-- /Topbar -->
<?php endif; ?>
<!-- Menu Bar -->
<div class="menu-bar default">
<div class="container">
<div class="logo-top">
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?></a>
</div>
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<div class="menu-links">
<?php wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'menu_class' => 'main-menu',
) );
?>
</div>
<?php endif; ?>
</div>
</div>
<!-- /Menu Bar -->
<!-- Mobile Menu -->
<div id="dl-menu" class="dl-menuwrapper">
<button class="dl-trigger"><?php esc_html_e('Open Menu','log-book'); ?></button>
<?php wp_nav_menu( array(
'container' => false,
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'menu_class' => 'dl-menu',
) );
?>
</div><!-- /dl-menuwrapper -->
<!-- /Mobile Menu -->
<?php
// Custom image.
global $header_image, $header_style;
$header_image = get_header_image();
if( $header_image ){
$header_style = 'style="background-image: url('.esc_url( $header_image ).');"';
} else{
$header_style = '';
}
?>