-
Notifications
You must be signed in to change notification settings - Fork 4
/
header.php
93 lines (83 loc) · 3.71 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
<!DOCTYPE html>
<html class="<?php echo get_theme_option('Style Sheet'); ?>" lang="<?php echo get_html_lang(); ?>">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes" />
<?php if ($description = option('description')): ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php endif; ?>
<?php
if (isset($title)) {
$titleParts[] = strip_formatting($title);
}
$titleParts[] = option('site_title');
?>
<title><?php echo implode(' · ', $titleParts); ?></title>
<?php echo auto_discovery_link_tags(); ?>
<?php fire_plugin_hook('public_head',array('view'=>$this)); ?>
<!-- Stylesheets -->
<?php
queue_css_url('//fonts.googleapis.com/css?family=Balthazar:700,400|Raleway:700,400|Merriweather:400,700');
queue_css_file(array('iconfonts', 'style'));
echo head_css();
$background_color = get_theme_option('Background Color');
$background_image = get_theme_option('Background Image');
if ($background_image) {
$tile = get_theme_option('Background Tile') == 1;
$tile_style = $tile ? 'repeat' : 'no-repeat fixed center top';
$storage = Zend_Registry::get('storage');
$background_uri = $storage->getUri($storage->getPathByType($background_image, 'theme_uploads'));
$background_image = 'url('.$background_uri.') '.$tile_style;
}
if ($background_color || $background_image) {
echo '<style>body { background: ';
if ($background_color) {
echo $background_color;
echo ' ';
}
if ($background_image)
echo $background_image;
echo '; }</style>';
}
if ($logo_size = get_theme_option('logo_size')) {
echo '<style>#site-title { font-size: ' . $logo_size . '; line-height: 90%; }</style>';
}
if ($logo_color = get_theme_option('logo_color')) {
echo '<style>#site-title { color: ' . $logo_color . '; }</style>';
}
?>
<!-- JavaScripts -->
<?php queue_js_file('vendor/selectivizr', 'javascripts', array('conditional' => '(gte IE 6)&(lte IE 8)')); ?>
<?php queue_js_file('vendor/respond'); ?>
<?php queue_js_file('vendor/jquery-accessibleMegaMenu'); ?>
<?php queue_js_file('bigstuff'); ?>
<?php queue_js_file('globals'); ?>
<?php echo head_js(); ?>
</head>
<?php echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass)); ?>
<a href="#content" id="skipnav"><?php echo __('Skip to main content'); ?></a>
<?php fire_plugin_hook('public_body', array('view'=>$this)); ?>
<header role="banner">
<?php fire_plugin_hook('public_header', array('view'=>$this)); ?>
<div id="site-title"><?php echo link_to_home_page(theme_logo()); ?></div>
<div id="search-container" role="search">
<?php if (get_theme_option('use_advanced_search') === null || get_theme_option('use_advanced_search')): ?>
<?php echo search_form(array('show_advanced' => true)); ?>
<?php else: ?>
<?php echo search_form(); ?>
<?php endif; ?>
</div>
</header>
<div id="primary-nav" role="navigation">
<?php
echo public_nav_main();
?>
</div>
<div id="mobile-nav" role="navigation" aria-label="<?php echo __('Mobile Navigation'); ?>">
<?php
echo public_nav_main();
?>
</div>
<?php echo theme_header_image(); ?>
<div id="content" role="main" tabindex="-1">
<?php fire_plugin_hook('public_content_top', array('view'=>$this)); ?>