-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheader.php
140 lines (95 loc) · 4.42 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
<?php
/**
* The Header for our theme.
* Displays all of the <head> section and everything up till <div id="content">
*/
?><!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">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!--[if lt IE 9]>
<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
<link rel="stylesheet" href="<?php echo esc_url( get_template_directory_uri() ); ?>/css/ie.css" type="text/css">
<![endif]-->
<?php
if ( ! function_exists( '_wp_render_title_tag' ) ) :
function openlab_old_render_title() {
?>
<title><?php wp_title( '-', true, 'right' ); ?></title>
<?php
}
add_action( 'wp_head', 'openlab_old_render_title' );
endif;
wp_head(); ?>
</head>
<?php if(isset($_POST['scrollPosition'])): ?>
<body <?php body_class(); ?> onLoad="window.scrollTo(0,<?php echo intval($_POST['scrollPosition']); ?>)">
<?php else: ?>
<body <?php body_class(); ?> >
<?php endif;
global $wp_customize;
/* Preloader */
if(is_front_page() && !isset( $wp_customize ) && get_option( 'show_on_front' ) != 'page' ):
$openlab_disable_preloader = get_theme_mod('openlab_disable_preloader');
if( isset($openlab_disable_preloader) && ($openlab_disable_preloader != 1)):
echo '<div class="preloader">';
echo '<div class="status"> </div>';
echo '</div>';
endif;
endif; ?>
<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">
<header id="home" class="header">
<div id="main-nav" class="navbar navbar-inverse bs-docs-nav" role="banner">
<div class="container">
<div class="navbar-header responsive-logo">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<span class="sr-only"></span>
<span class="icon-bar open"></span>
<span class="icon-bar open"></span>
<span class="icon-bar open"></span>
<span class="icon-bar first closed"></span>
<span class="icon-bar second closed"></span>
</button>
<?php
$openlab_logo_responsive = get_theme_mod('openlab_logo_light', get_stylesheet_directory_uri().'/images/openlab-light.svg');
if(isset($openlab_logo_responsive) && $openlab_logo_responsive != ""):
echo ' <span class="icon-wrap-responsive">';
echo ' <a class="home-responsive" href="'. esc_url( home_url( '/' ) ) .'" alt="'. get_bloginfo('title') .'">';
echo ' <img class="logo-light" src="'. $openlab_logo_responsive .'">';
echo ' </a>';
echo '</span>';
endif;
?>
<?php
$openlab_logo = get_theme_mod('openlab_logo', get_stylesheet_directory_uri().'/images/openlab-logo.svg');
/*Logo and Fixed Marks*/
if(isset($openlab_logo) && $openlab_logo != ""):
echo '<div class="fixed-mark-openlab top-right">';
echo '<a href="'.esc_url( home_url( '/' ) ).'">';
echo '<img src="'.$openlab_logo.'" alt="'.get_bloginfo('title').'" class="top-right openlab-logo">';
echo '</a>';
echo '</div>';
endif;
echo '<div class="fixed-mark-openlab top-left"><img src="'.get_stylesheet_directory_uri().'/images/openlab-mark.svg" class="top-left" /></div>';
echo '<div class="fixed-mark-openlab bottom-left"><img src="'.get_stylesheet_directory_uri().'/images/openlab-mark.svg" class="bottom-left" /></div>';
echo '<div id="scroll-top" class="fixed-mark-openlab bottom-right">
<svg class="bottom-right"version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
<polygon class="st0" points="0,0 0,30 8.5,30 8.5,8.5 30,8.5 30,0 "/>
</svg>
</div>';
?>
</div>
<nav class="navbar-collapse bs-navbar-collapse collapse" role="navigation" id="site-navigation">
<?php wp_nav_menu( array('theme_location' => 'primary', 'container' => false, 'menu_class' => 'nav navbar-nav responsive-nav main-nav-list', 'fallback_cb' => 'openlab_wp_page_menu')); ?>
</nav>
</div>
</div>
<!-- / END TOP BAR -->