-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
114 lines (91 loc) · 3.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<?php wp_head(); ?>
<!--
Adobe font: Sofia Pro
Font family: sofia-pro, Helvetica, Arial, sans-serif;
Font styles: 300, 300i, 500, 500i, 700, 700i
Used pretty much everywhere
Google font: Abhaya Libre
Font Family: 'Abhaya Libre', serif;
Font styles: 400, 700
Used as the serif font on the cards on top of certain hero images
See https://radleysustaire.com/s3/fd0329/figma
-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php
// Custom header CSS
if ( $css = get_field( 'custom_css_header', 'option' ) ) {
echo "\n<style id=\"custom-header-css\">\n". esc_html( $css ) . "\n</style>\n";
}
// Custom header JS
if ( $js = get_field( 'custom_js_header', 'option' ) ) {
echo "\n<script type=\"text/javascript\" id=\"custom-header-js\">\n". esc_html( $js ) . "\n</script>\n";
}
// Custom header tracking codes (plain html) from GCM general settings
if ( $tracking = get_field( 'header_tracking_code', 'gcm_settings' ) ) {
echo "\n<!-- GCM Header Tracking Codes -->\n";
echo $tracking;
echo "\n<!-- END: GCM Header Tracking Codes -->\n";
}
?>
</head>
<body <?php body_class('loading'); ?>>
<?php
global $show_admin_bar;
$tab_index = ($show_admin_bar ?? false) ? 2 : 1;
?>
<a class="screen-reader-shortcut" href="#site-content" tabindex="<?php echo $tab_index; ?>">Skip to page content</a>
<div class="menu-header">
<div class="menu-logo">
<?php get_template_part( 'template-parts/logo', null, array() ); ?>
</div>
<a href="#" id="menu-button" aria-expanded="false" aria-controls="primary-menu">
<span class="open"><?php echo file_get_contents( __DIR__ . '/assets/images/menu-button.svg' ); ?></span>
<span class="close"><?php echo file_get_contents( __DIR__ . '/assets/images/menu-close.svg' ); ?></span>
</a>
</div>
<header class="site-header">
<div class="row top">
<div class="inside">
<div class="header-locations">
<?php get_template_part( 'template-parts/locations', null, array( 'hours' => false, 'icon_size' => 'tiny', 'switching' => true ) ); ?>
</div>
<div class="header-logo">
<?php get_template_part( 'template-parts/logo', null, array() ); ?>
</div>
<div class="header-links">
<div class="language-list">
<?php get_template_part( 'template-parts/languages', null, array( 'icon' => false, 'code' => true ) ); ?>
</div>
<?php
$button = get_field( 'header_button', 'gcm_settings' );
if ( $button['text'] && $button['url'] ) {
?>
<div class="major-button">
<a href="<?php echo esc_attr($button['url']); ?>" target="_blank" rel="external" class="button button-secondary"><?php _e( $button['text'], 'gcm' ); ?></a>
</div>
<?php
}
?>
</div>
</div>
</div>
<div class="row bottom">
<div class="inside">
<nav id="primary-menu" class="gcm-menu primary-menu" role="navigation">
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'container' => '',
'depth' => 2,
));
?>
</nav>
</div>
</div>
</header>
<div class="site-content" id="site-content">