-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
93 lines (73 loc) · 3.39 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 <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Enhanced comments -->
<?php if ( is_singular() ) wp_enqueue_script( "comment-reply" ); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="skipnav"><a href="#main">Skip to main content</a></div>
<div id="cu-search" class="cu-search">
<div class="container-fluid">
<form id="cu-search-form" tabindex="-1" role="search" action="<?php echo site_url(); ?>">
<label for="cu-search-query" class="sr-only">Search:</label>
<input type="text" id="cu-search-query" name="s" value="" size="30">
<button name="btnG" id="cu-search-submit" type="submit" value="go"><span class="sr-only">Submit Search</span></button>
<fieldset class="search-filters" role="radiogroup">
<legend class="sr-only">Search Filters</legend>
<input type="radio" id="cu-search-filter1" name="sitesearch" value="thissite" checked="checked">
<label for="cu-search-filter1"><span class="sr-only">Search </span>This Site</label>
<input type="radio" id="cu-search-filter2" name="sitesearch" value="cornell">
<label for="cu-search-filter2"><span class="sr-only">Search </span>Cornell</label>
</fieldset>
</form>
</div>
</div>
<?php
$header_img_url = get_header_img_url();
$has_slider = get_field('use_slider_in_header');
?>
<div id="super-header" <?php if($header_img_url || $has_slider == 'Yes') { echo 'class="has_header_image"'; } ?>>
<header id="cu-header" aria-label="Cornell Header">
<div class="cu45-helper"></div>
<div class="container-fluid cu-brand">
<h1 class="cu-logo"><a href="//www.cornell.edu"><img class="sr-only" src="<?php echo get_template_directory_uri(); ?>/images/cornell/bold_cornell_logo_simple_b31b1b.svg" alt="Cornell University" width="245" height="62"></a></h1>
<div class="cu-unit">
<?php if (display_header_text()==true) { ?>
<h2><a href="<?php echo site_url(); ?>"><?php bloginfo('name'); ?></a></h2>
<h3 class="sans"><?php bloginfo('description'); ?></h3>
<?php } ?>
</div>
<div class="buttons">
<button class="mobile-button" id="mobile-nav">Main Menu</button>
<button class="mobile-button" id="cu-search-button">Toggle Search Form</button>
<nav id="utility-navigation" aria-label="Supplementary Navigation" class="dropdown-menu dropdown-menu-on-demand">
<?php cwd_base_nav_top(); ?>
</nav>
</div>
</div>
</header>
<header id="site-header" aria-label="Site Header">
<?php if ( $has_slider ): ?>
<div class="band slider-container">
<div class="container-fluid">
<div id="slider-caption" class="slider-caption align-caption-<?php the_field('slider_align'); ?>"></div>
</div>
</div>
<?php elseif ( $header_img_url ): ?>
<div id="image-band" class="band" aria-label="Site Banner" style="background-image: url(<?php echo $header_img_url; ?>)"></div>
<?php endif; ?>
<nav class="dropdown-menu dropdown-menu-on-demand" id="main-navigation" aria-label="Main Navigation">
<div class="container-fluid">
<a id="mobile-home" href="<?php echo site_url(); ?>">
<span class="sr-only">Home</span>
</a>
<?php cwd_base_nav(); ?>
</div>
</nav>
</header>
</div>