-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
191 lines (160 loc) · 5.46 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
185
186
187
188
189
190
191
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title><?php wp_title( ' | ', true, 'right' ); ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" />
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Poly:400,400italic' rel='stylesheet' type='text/css'>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
var surl ='<?php echo 'http://' . $_SERVER['SERVER_NAME'].'/site'; ?>';
</script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/masonry.pkgd.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/script.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/isotope.pkgd.min.js"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/imagesloaded.pkgd.min.js"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/less-1.7.5.js"></script>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div class="lightBoxCover">
<div class="lightBoxContainerInner">
<div class="lightBox" onclick="closeLightBox();">
<div class="lightBoxInner">
<div class="lbImage">
</div>
<div class="x" onclick="closeLightBox();"></div>
</div>
<div class="lbTitle">
<h3></h3>
</div>
</div>
</div>
</div>
<?php
global $post;
$pid = $post->ID;
//$shortUrl = explode( 'wp-content/', $imageUrl );
//$shortUrl = 'http://' . $_SERVER['SERVER_NAME'].$imageUrl;
//$imageUrl = wp_get_attachment_url( get_custom_field('header_image:to_image_src') );
?>
<div class="searchPlaceholder">
<div class="searchBar">
<div class="fixedInnerBox">
<div id="search">
<?php get_search_form(); ?>
</div>
</div>
</div>
</div>
<header id="header" class="desktop" role="banner">
<?php if(get_custom_field('header_image:to_image_src')){
$imageUrl = get_custom_field('header_image:to_image_src');
?>
<?php } ?>
<div class="fixedBackground">
<div class="fixedContainerBox">
<div class="headerLogoBottom">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo_bottom.png"/>
</div>
</div>
</div>
<div class="fixedHeader">
<div class="headerNavBox">
<div class="headerNavInner">
<nav id="menu" role="navigation">
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
<div class="searchLink" onclick="searchToggle(); return false;">
<a href="#">Search</a><div class="searchArrowSmall"></div>
</div>
<div class="clear"></div>
</nav>
</div>
<div class="clear"></div>
</div>
</div>
<div class="headerOverlay">
</div>
<div class="headerGradient">
</div>
<div class="headerBackground" style="background-image:url('<?php echo $imageUrl; ?>');">
</div>
<script>
detectImageLoad('<?php echo $imageUrl ?>', 'headerBackground');
</script>
<div class="fixedContainerBox">
<div class="fixedContainer">
<div class="headerText">
<?php if(get_custom_field('headercontent:do_shortcode') && $post){ ?>
<?php print_custom_field('headercontent:do_shortcode'); ?>
<?php } ?>
</div>
</div>
<div class="headerLogo">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo_header.png"/>
<div class="logoDrips">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo_drips.png"/>
</div>
</div>
</div>
</header>
<header id="header" class="mobile" role="banner">
<?php if(get_custom_field('header_image:to_image_src')){
$imageUrl = get_custom_field('header_image:to_image_src');
?>
<?php } ?>
<div class="fixedBackground">
<div class="fixedContainerBox">
<div class="headerLogoBottom">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo_bottom.png"/>
</div>
</div>
</div>
<div class="fixedHeader">
<div class="fixedContainerBox">
<div class="headerNavBox">
<div class="openNav" onclick="toggleNav();"></div>
<div class="headerNavInner">
<nav id="menu" role="navigation">
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
<div class="searchLink" onclick="searchToggle(); return false;">
<a href="#">Search</a><div class="searchArrowSmall"></div>
</div>
<div class="clear"></div>
</nav>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="headerOverlay">
</div>
<div class="headerGradient">
</div>
<div class="headerBackground" style="background-image:url('<?php echo $imageUrl; ?>');">
</div>
<script>
detectImageLoad('<?php echo $imageUrl ?>', 'headerBackground');
</script>
<div class="fixedContainerBox mobileContainer">
<div class="fixedContainer">
<div class="headerText">
<?php if(get_custom_field('headercontent:do_shortcode') && $post){ ?>
<?php print_custom_field('headercontent:do_shortcode'); ?>
<?php } ?>
</div>
</div>
<div class="headerLogo">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo_header.png"/>
<div class="logoDrips">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo_drips.png"/>
</div>
</div>
</div>
</header>
<div id="container">