-
Notifications
You must be signed in to change notification settings - Fork 5
/
header-logo.php
134 lines (123 loc) · 4.44 KB
/
header-logo.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
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<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">
<?php wp_head(); ?>
</head>
<body <?php body_class('loading'); // Enable JS transitions ?>>
<?php include get_stylesheet_directory() . '/inc/google-analytics.php'; ?>
<header>
<a href="#main" id="skip-link" class="visuallyhidden focusable">Skip to main content</a>
<div class="header unit">
<?php
$disable_global_elements = get_theme_mod('disable_global_elements', 0);
if ( !$disable_global_elements ):
?>
<a href="http://ufl.edu/" class="logo">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/img/logo-uf.svg" alt="University of Florida">
</a>
<h1 class="screen-reader-title">
<a href="<?php echo site_url('/'); ?>" class="logo mobile">
<span class="screen-reader-text"><?php echo bloginfo('name'); ?></span>
<span class="icon-svg logo-herbert"><svg><use xlink:href="<?php echo ufclas_ufl_2015_get_custom_logo(); ?>#Layer_1"></use></svg></span>
</a>
</h1>
<?php endif; ?>
<div class="menu-wrap">
<div class="main-menu-wrap">
<h1 class="screen-reader-title">
<a href="<?php echo site_url('/'); ?>">
<span class="screen-reader-text"><?php echo bloginfo('name'); ?></span>
<span class="icon-svg logo-herbert"><svg><use xlink:href="<?php echo ufclas_ufl_2015_get_custom_logo(); ?>#Layer_1"></use></svg></span>
</a>
</h1>
<nav role="navigation" aria-label="<?php _e( 'Main Menu', 'ufclas-ufl-2015' ); ?>">
<?php
wp_nav_menu( array(
'theme_location' => 'main_menu',
'container' => '',
'depth' => 2,
'walker' => new ufclas_ufl_2015_main_nav_menu(),
'fallback_cb' => 'ufclas_ufl_2015_main_nav_menu::fallback',
));
?>
</nav>
</div>
<?php if ( !$disable_global_elements ): ?>
<div class="aux-menu-wrap">
<ul class="aux-nav">
<?php
// Audience menu
if ( has_nav_menu( 'audience_nav' ) ):
wp_nav_menu( array(
'theme_location' => 'audience_nav',
'items_wrap' => '%3$s',
'container' => '',
'depth' => 1,
'fallback_cb' => false,
));
endif;
// Display parent organization link
ufclas_global_parent_organization();
// Global menu
wp_nav_menu( array(
'theme_location' => 'global_menu',
'items_wrap' => '%3$s',
'container' => '',
'depth' => 1,
'fallback_cb' => false,
));
?>
</ul>
<div class="audience-nav-wrap">
<?php
if ( has_nav_menu( 'audience_nav' ) ): ?>
<a href="#" class="cur-audience"><?php echo ufclas_nav_menu_name_by_location( 'audience_nav' ); ?></a>
<span class="arw-right icon-svg"><svg><use xlink:href="<?php echo get_stylesheet_directory_uri(); ?>/img/spritemap.svg#arw-down"></use></svg></span>
<?php
wp_nav_menu( array(
'theme_location' => 'audience_nav',
'items_wrap' => '<ul>%3$s</ul>',
'container' => '',
'depth' => 1,
'fallback_cb' => false,
));
endif;
?>
</div>
</div>
<a href="#" class="btn-show-aux">
<span class="icon-svg icon-menu">
<svg>
<use xlink:href="<?php echo get_stylesheet_directory_uri(); ?>/img/spritemap.svg#menu"></use>
</svg>
</span>
<span class="icon-svg icon-close">
<svg>
<use xlink:href="<?php echo get_stylesheet_directory_uri(); ?>/img/spritemap.svg#close"></use>
</svg>
</span>
</a>
<?php ufclas_get_search_form( 'menu' ); ?>
<?php endif; ?>
</div>
<div class="mobile-dropdown-wrap"></div>
<?php get_template_part( 'template-parts/content', 'alert-small' ); ?>
<?php ufclas_get_search_form( 'mobile' ); ?>
<a href="#" class="btn-menu" role="button" aria-haspopup="true" aria-expanded="false">
<span class="icon-svg icon-menu">
<svg>
<use xlink:href="<?php echo get_stylesheet_directory_uri(); ?>/img/spritemap.svg#menu"></use>
</svg>
</span>
<span class="icon-svg icon-close" role="button">
<svg>
<use xlink:href="<?php echo get_stylesheet_directory_uri(); ?>/img/spritemap.svg#close"></use>
</svg>
</span>
</a>
</div><!-- .header.unit -->
</header>
<!-- END HEADER -->