-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
166 lines (125 loc) · 5.93 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
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package parallax-one
*/
?><!DOCTYPE html>
<?php parallax_hook_html_before(); ?>
<html <?php language_attributes(); ?> class="no-js">
<head>
<?php parallax_hook_head_top(); ?>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php parallax_hook_head_bottom(); ?>
<?php wp_head(); ?>
</head>
<body itemscope itemtype="http://schema.org/WebPage" <?php body_class(); ?> dir="<?php if (is_rtl()) echo "rtl"; else echo "ltr"; ?>">
<?php parallax_hook_body_top(); ?>
<div id="mobilebgfix">
<div class="mobile-bg-fix-img-wrap">
<div class="mobile-bg-fix-img"></div>
</div>
<div class="mobile-bg-fix-whole-site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'parallax-one' ); ?></a>
<!-- =========================
PRE LOADER
============================== -->
<?php
if(is_front_page() && !is_customize_preview() && get_option( 'show_on_front' ) != 'page' ):
$parallax_one_disable_preloader = get_theme_mod('paralax_one_disable_preloader');
if( isset($parallax_one_disable_preloader) && ($parallax_one_disable_preloader != 1)):
echo '<div class="preloader">';
echo '<div class="status"> </div>';
echo '</div>';
endif;
endif; ?>
<!-- =========================
SECTION: HOME / HEADER
============================== -->
<!--header-->
<?php parallax_hook_header_before(); ?>
<header itemscope itemtype="http://schema.org/WPHeader" id="masthead" role="banner" data-stellar-background-ratio="0.5" class="header header-style-one site-header">
<?php parallax_hook_header_top(); ?>
<!-- COLOR OVER IMAGE -->
<?php
$paralax_one_sticky_header = get_theme_mod('paralax_one_sticky_header','parallax-one');
if( isset($paralax_one_sticky_header) && ($paralax_one_sticky_header != 1)){
$fixedheader = 'sticky-navigation-open';
} else {
if( !is_front_page() ){
$fixedheader = 'sticky-navigation-open';
}else{
$fixedheader = '';
if ( 'posts' != get_option( 'show_on_front' ) ) {
if( isset($paralax_one_sticky_header) && ($paralax_one_sticky_header != 1)){
$fixedheader = 'sticky-navigation-open';
} else {
$fixedheader = '';
}
}
}
}
?>
<div class="overlay-layer-nav <?php if(!empty($fixedheader)) {echo esc_attr($fixedheader);} ?>">
<!-- STICKY NAVIGATION -->
<div class="navbar navbar-inverse bs-docs-nav navbar-fixed-top sticky-navigation appear-on-scroll">
<!-- CONTAINER -->
<div class="container">
<div class="navbar-header">
<!-- LOGO -->
<button title='<?php _e( 'Toggle Menu', 'parallax-one' ); ?>' aria-controls='menu-main-menu' aria-expanded='false' type="button" class="navbar-toggle menu-toggle" id="menu-toggle" data-toggle="collapse" data-target="#menu-primary">
<span class="screen-reader-text"><?php esc_html_e('Toggle navigation','parallax-one'); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php
$parallax_one = get_theme_mod('paralax_one_logo', parallax_get_file('/images/logo-nav.png') );
if(!empty($parallax_one)):
echo '<a href="'.esc_url( home_url( '/' ) ).'" class="navbar-brand" title="'.get_bloginfo('title').'">';
echo '<img src="'.parallax_one_make_protocol_relative_url(esc_url($parallax_one)).'" alt="'.get_bloginfo('title').'">';
echo '</a>';
echo '<div class="header-logo-wrap text-header paralax_one_only_customizer">';
echo '<h1 itemprop="headline" id="site-title" class="site-title"><a href="'.esc_url( home_url( '/' ) ).'" title="'.esc_attr( get_bloginfo( 'name', 'display' ) ).'" rel="home">'.get_bloginfo( 'name' ).'</a></h1>';
echo '<p itemprop="description" id="site-description" class="site-description">'.get_bloginfo( 'description' ).'</p>';
echo '</div>';
else:
if( is_customize_preview() ):
echo '<a href="'.esc_url( home_url( '/' ) ).'" class="navbar-brand paralax_one_only_customizer" title="'.get_bloginfo('title').'">';
echo '<img src="" alt="'.get_bloginfo('title').'">';
echo '</a>';
endif;
echo '<div class="header-logo-wrap text-header">';
echo '<h1 itemprop="headline" id="site-title" class="site-title"><a href="'.esc_url( home_url( '/' ) ).'" title="'.esc_attr( get_bloginfo( 'name', 'display' ) ).'" rel="home">'.get_bloginfo( 'name' ).'</a></h1>';
echo '<p itemprop="description" id="site-description" class="site-description">'.get_bloginfo( 'description' ).'</p>';
echo '</div>';
endif;
?>
</div>
<!-- MENU -->
<div itemscope itemtype="http://schema.org/SiteNavigationElement" aria-label="<?php esc_html_e('Primary Menu','parallax-one') ?>" id="menu-primary" class="navbar-collapse collapse">
<!-- LOGO ON STICKY NAV BAR -->
<div id="site-header-menu" class="site-header-menu">
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_class' => 'primary-menu small-text',
'depth' => 4,
'fallback_cb' => 'parallax_one_wp_page_menu'
)
);
?>
</nav>
</div>
</div>
</div>
<!-- /END CONTAINER -->
</div>
<!-- /END STICKY NAVIGATION -->