-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
295 lines (247 loc) · 11 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="<?php bloginfo( 'charset' ); ?>">
<title><?php
// Page or Single Post
if ( is_page() or is_single() ) {
the_title();
// Category Archive
} elseif ( is_category() ) {
echo single_cat_title('', false);
// Tag Archive
} elseif ( function_exists('is_tag') and function_exists('single_tag_title') and is_tag() ) {
printf( __('Tag: %s','Aqua'), single_tag_title('', false) );
// General Archive
} elseif ( is_archive() ) {
printf( __('Archive: %s','Aqua'), wp_title('', false) );
// Search Results
} elseif ( is_search() ) {
printf( __('Search: %s','Aqua'), get_query_var('s') );
}
// Insert separator for the titles above
if ( !is_home() and !is_404() ) {
echo " - ";
}
// Finally the blog name
bloginfo('name');
?></title>
<meta name="description" content="<?php bloginfo('description'); ?>" />
<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS
================================================== -->
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600' rel='stylesheet' type='text/css'>
<?php
$fonts_already_loaded = array("Open+Sans");
$fonts_to_load = array();
// Load Nav Font
if(!in_array(($nav_font = ot_get_option('nav_font_family')), $fonts_already_loaded)) {
$fonts_to_load[] = $nav_font;
}
// Load Headings Font
if(!in_array(($heading_font = ot_get_option('heading_font_family')), $fonts_already_loaded)) {
$fonts_to_load[] = $heading_font;
}
// Load Buttons Font
if(!in_array(($button_font = ot_get_option('button_font_family')), $fonts_already_loaded)) {
$fonts_to_load[] = $button_font;
}
// Loading fonts
foreach($fonts_to_load as $font){
echo "<link href='http://fonts.googleapis.com/css?family=".$font."' rel='stylesheet' type='text/css'>\n\t";
}
// Apply Dynamic CSS
echo "<style type='text/css'>";
// Nav font family
if($nav_font!="Open+Sans"){
echo "
#menu {
font-family: '".str_replace('+',' ',$nav_font)."';
}\n";
}
// Nav font size
if(($nav_font_size=ot_get_option('nav_font_size'))!="16px"){
echo "
#menu > ul > li > a {
font-size: ".$nav_font_size.";
}
#menu > ul > li ul > li > a {
font-size: ".((int)(substr($nav_font_size,0,2)) - 2).'px'.";
}\n";
}
// Custom Menu BGR color
if( (($nav_bgr_color=get_theme_mod('nav_bgr_color'))!="#0ad1e5") && ((get_theme_mod('main_menu_style') == 'custom_menu')||(get_theme_mod('main_menu_style') == 'custom_menu2'))){
echo "
.custom_menu #menu, .custom_menu #menu > ul > li > a {
background-color: ".$nav_bgr_color.";
}
.custom_menu2 #menu > ul > li > a:hover, .custom_menu2 #menu > ul > li:hover > a, .custom_menu2 #menu > ul > li ul > li > a:hover > span {
background-color: ".$nav_bgr_color.";
}\n";
}
// Main Color
if(($aqua_main_color=get_theme_mod('aqua_main_color'))!="#0ad1e5"){
echo '
a:hover, a:focus { color: '.$aqua_main_color.' ; }
.button:hover,a:hover.button,button:hover,input[type="submit"]:hover,input[type="reset"]:hover, input[type="button"]:hover, .button_hilite, a.button_hilite { color: #fff; background-color: '.$aqua_main_color.' ;}
.button_hilite, a.button_hilite { color: #fff; background-color: '.$aqua_main_color.' ;}
.button_hilite:hover, a:hover.button_hilite { color: #fff; background-color: #374045;}
.section_big_title h1 strong { color: '.$aqua_main_color.' ;}
.section_featured_texts h3 a:hover { color: '.$aqua_main_color.' ;}
.breadcrumb a:hover{ color: '.$aqua_main_color.' ;}
.post_meta a:hover{ color: '.$aqua_main_color.' ;}
.portfolio_filter div.current{ background-color: '.$aqua_main_color.' ;}
.next:hover,.prev:hover{ background-color: '.$aqua_main_color.' ;}
.pagination .links a:hover{ background-color: '.$aqua_main_color.' ;}
.hilite { background: '.$aqua_main_color.' ;}
.price_column.price_column_featured ul li.price_column_title { background: '.$aqua_main_color.' ;}
.post_description blockquote{ border-left: 4px solid '.$aqua_main_color.'; }
.info h2{ background-color: '.$aqua_main_color.' ;}
#footer a:hover { color: '.$aqua_main_color.' ;}
#footer .boc_latest_post img:hover{ border: 3px solid '.$aqua_main_color.' ;}
.jcarousel-next-horizontal:hover, .jcarousel-prev-horizontal:hover { background-color: '.$aqua_main_color.' ;}
'."\n";
}
// Headings font family
if($heading_font!="Open+Sans"){
echo "
h1, h2, h3, h4, h5, .title, .section_big_title h1, .heading, #footer h3 {
font-family: '".str_replace('+',' ',$heading_font)."';
}\n";
}
// Button font family
if($button_font!="Open+Sans"){
echo "
.button, a.button, button, input[type='submit'], input[type='reset'], input[type='button'] {
font-family: '".str_replace('+',' ',$button_font)."';
}\n";
}
// Body font family
$body_font = ot_get_option('body_font_family');
if($body_font!="Open+Sans"){
echo "
body {
font-family: '".str_replace('+',' ',$body_font)."';
}\n";
}
// Breadcrumbs
if(!$boc_breadcrumb = ot_get_option('breadcrumbs')){
echo "
.breadcrumb {
display: none;
}\n";
}
// Custom CSS
if($boc_custom_css = ot_get_option('custom_css')){
echo "\n\n".$boc_custom_css."\n";
}
echo "\t</style>";
?>
<!-- JS
================================================== -->
<?php wp_enqueue_script('jquery'); ?>
<?php wp_enqueue_script('jquery.easing', get_template_directory_uri().'/js/jquery.easing.1.3.js'); ?>
<?php wp_enqueue_script('aqua.common', get_template_directory_uri().'/js/aqua.common.js'); ?>
<?php wp_enqueue_script('jquery.quicksand', get_template_directory_uri().'/js/jquery.quicksand.js'); ?>
<?php wp_enqueue_script('jquery.flexslider', get_template_directory_uri().'/js/jquery.flexslider-min.js'); ?>
<?php wp_enqueue_script('jquery.prettyPhoto', get_template_directory_uri().'/js/jquery.prettyPhoto.js'); ?>
<?php wp_enqueue_script('jquery.jcarousel', get_template_directory_uri().'/js/jquery.jcarousel.min.js'); ?>
<?php wp_enqueue_script('jquery.tipsy', get_template_directory_uri().'/js/jquery.tipsy.js'); ?>
<?php wp_enqueue_script('jquery.appear', get_template_directory_uri().'/js/jquery.appear.js'); ?>
<?php wp_enqueue_script('jquery.counter', get_template_directory_uri().'/js/jquery.counter.js'); ?>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Favicons
================================================== -->
<link rel="icon" type="image/x-icon" href="<?php echo ot_get_option('favicon_uploaded', get_template_directory_uri().'/images/favicon.png')?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper"<?php echo (ot_get_option('wrapper_style')=='full_width'? ' class="full_wrapper"' : '');?>>
<!-- Container -->
<div class="container">
<div class="header row">
<div class="eight columns header_left">
<?php $logo = ot_get_option('logo_upload');
$top_margin = ot_get_option('logo_top_margin');
$left_margin = ot_get_option('logo_left_margin');
if(isset($top_margin) && is_array($top_margin)){
$logo_extra_style = ($top_margin[0] || $left_margin[0]) ? 1 : 0;
}else{
$logo_extra_style ='';
}
if($logo) { ?>
<a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home">
<img src="<?php echo $logo; ?>" <?php echo $logo_extra_style ? "style='". ($top_margin[0] ? 'margin-top: '.$top_margin[0].$top_margin[1].';' : '') . ($left_margin[0] ? 'margin-left: '.$left_margin[0].$left_margin[1].';' : '')."'" : ""; ?> alt="<?php bloginfo('name'); ?>"/>
</a>
<?php } else { ?>
<h1 class="logo" <?php echo $logo_extra_style ? "style='". ($top_margin[0] ? 'margin-top: '.$top_margin[0].$top_margin[1].';' : '') . ($left_margin[0] ? 'margin-left: '.$left_margin[0].$left_margin[1].';' : '')."'" : ""; ?>>
<a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home"><?php bloginfo('name'); ?></a>
<div class="tagline"><?php echo get_bloginfo ( 'description' ); ?></div>
</h1>
<?php } ?>
</div>
<div class="eight columns">
<div class="header_right">
<div class="header_contacts clearfix">
<?php if($header_phone = ot_get_option('header_phone')){?>
<div class="header_phone"><?php echo $header_phone;?></div>
<?php } ?>
<?php if($header_email = ot_get_option('header_email')){?>
<div class="header_mail"><?php echo $header_email;?></div>
<?php } ?>
</div>
<div class="header_soc_search clearfix">
<div class="header_search">
<form class="search" action="<?php echo home_url(); ?>/" method="get">
<button class="button_search"></button>
<input name="s" id="s" type="text" value="<?php echo ($s ? $s : __('Search', 'Aqua').'...'); ?>" onclick="this.value = '';">
</form>
</div>
<?php if(is_array($header_icons = ot_get_option('header_icons'))){
$header_icons = array_reverse($header_icons);
foreach($header_icons as $header_icon){
echo "<a target='_blank' href='". ( $header_icon['icons_service']!='rss' ? $header_icon['icons_url'] : get_bloginfo('rss2_url') )."' class='header_soc_". $header_icon['icons_service'] ."' title='". $header_icon['title'] ."'>". $header_icon['icons_service'] ."</a>";
}
}
?>
</div>
</div>
</div>
</div>
<!-- Main Navigation -->
<div class="row no_bm">
<div class="<?php echo get_theme_mod('main_menu_style'); ?> sixteen columns">
<?php wp_nav_menu( array(
'theme_location'=> 'main_navigation',
'container_id' => 'menu',
'menu_class' => '',
'walker' => new boc_Menu_Walker,
'fallback_cb' => 'menuFallBack',
'items_wrap' => '<ul><li><a href="'.home_url('/').'"><i class="fa-home"></i></a></li>%3$s<li style="float: right;"><a href="http://ouragan.ageg.ca/"><i class="fa-cloud"></i></a></li></ul>'
));?>
<?php wp_nav_menu( array(
'theme_location'=> 'main_navigation',
'container' => '',
'menu_class' => '',
'walker' => new boc_Menu_Select_Walker,
'fallback_cb' => 'menuSelectFallBack',
'items_wrap' => '<select id="select_menu" onchange="location = this.value"><option value="">'.__('Select Page', 'Aqua').'</option>%3$s</select>',
));?>
</div>
</div>
<!-- Main Navigation::END -->