-
Notifications
You must be signed in to change notification settings - Fork 0
/
header-noticias.php
231 lines (197 loc) · 11.1 KB
/
header-noticias.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
<?php
/**
* Header
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> dir="ltr">
<head>
<?php
// get the category for GA
$post = get_post();
$categories = get_the_category($post -> ID);
$output = '';
if (! empty($categories)) {
foreach ($categories as $category) {
if ($output == '') {
if ($category->name == "Borderlands") {
//$output = "ga('set', 'Borderlands', '" . esc_html( $category->name ) . "');";
//$output = "ga('set', 'contentGroup1', 'Borderlands');";
$output = "gtag('set', {'contentGroup1': 'Borderlands'});";
}
if ($category->name == "Sustainability") {
//$output = "ga('set', 'contentGroup2', 'Sustainability');";
$output = "gtag('set', {'contentGroup2': 'Sustainability'});";
}
if ($category->name == "Education") {
//$output = "ga('set', 'contentGroup3', 'Education');";
$output = "gtag('set', {'contentGroup3': 'Education'});";
}
if ($category->name == "Consumer") {
//$output = "ga('set', 'contentGroup4', 'Consumer');";
$output = "gtag('set', {'contentGroup4': 'Consumer'});";
}
if ($category->name == "Future") {
$output = "ga('set', 'contentGroup5', 'Future');";
}
}
}
}
?>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CSKTFTYNJ0"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CSKTFTYNJ0'); </script>
<!-- Google Optimize -->
<script src="https://www.googleoptimize.com/optimize.js?id=OPT-KJHZKHH"></script>
<!-- Chartbeat Analytics -->
<script type='text/javascript'>var _sf_startpt=(new Date()).getTime()</script>
<script src="<?php bloginfo('template_directory'); ?>/js/jquery-3.2.1.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#216CB7">
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Add Favicon -->
<link type="image/png" href="<?php echo get_field('favicon', 'options'); ?>" rel="icon">
<link type="image/png" href="<?php echo get_field('favicon', 'options'); ?>" rel="shortcut icon">
<link type="image/png" href="<?php echo get_field('favicon', 'options'); ?>" rel="apple-touch-icon">
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/0f0514404d.js" crossorigin="anonymous"></script>
<!-- AMP Analytics -->
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<!-- FB App Configuration for Comment Moderation -->
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '511732915827177',
xfbml : true,
version : 'v2.11'
});
FB.AppEvents.logPageView();
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<meta property="fb:app_id" content="511732915827177" />
<!-- FB instant articles -->
<meta property="fb:pages" content="305166330794" />
<?php wp_head(); ?>
<?php
$settings = get_field('page-settings', get_the_ID());
if (isset($settings['text-color']) && $settings['text-color'] != '') {
$textColor = $settings['text-color'];
}
?>
<!-- NEW NAV - 12/12/19 -->
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/foundation.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900,900i&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Libre+Caslon+Text&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Oleo+Script:400,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<link href="<?php bloginfo('template_directory'); ?>/assets/css/hamburgers.css" rel="stylesheet">
<link href="<?php bloginfo('template_directory'); ?>/assets/css/all.min.css" rel="stylesheet"> <!--load all styles -->
<link href="<?php bloginfo('template_directory'); ?>/assets/css/print.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/assets/css/tooltipster.bundle.min.css" />
<?php if (get_the_ID() == 143506 || get_the_ID() == 127403 || get_the_ID() == 152159 || get_the_ID() == 143528 || get_the_ID() == 156485) { ?>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/youth-suicide/youth-suicide.css">
<?php } ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/assets/js/vendor/slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/assets/js/vendor/slick/slick-theme.css">
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/impeachment.css">
<link href="<?php bloginfo('template_directory'); ?>/assets/css/nav.css" rel="stylesheet">
<?php if (is_page(18) || is_single() || is_category() || is_page('people') || is_search() || is_page(158103) || is_page(122187) || is_page(83139) || is_page(83161) || is_page(1131) || is_page(175279)) { ?>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/single-story-post.css">
<?php } ?>
<!-- sports page -->
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/css/noticias.css">
<link href="<?php bloginfo('template_directory'); ?>/assets/css/footer.css" rel="stylesheet">
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/js/vendor/plyr-master/dist/plyr.css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/assets/js/vendor/before-after/css/twentytwenty.css" />
<style type='text/css'>
body.admin-bar {margin-top:32px !important}
@media screen and (max-width: 782px) {
body.admin-bar { margin-top:0px !important }
}
@media screen and (max-width: 600px) {
body.admin-bar { margin-top:0px !important }
html #wpadminbar{ margin-top: -46px; }
}
</style>
</head>
<body <?php body_class(); ?>>
<!-- reading progress container -->
<div class="progress-container">
<div class="progress-bar" id="progressBar"></div>
</div>
<!-- start header -->
<nav class="cn_navigation" role="navigation" aria-label="Cronkite Noticias - Navigation">
<!-- navigation container -->
<div class="main_nav_container">
<!-- main navigation -->
<div class="main_nav">
<!-- logo -->
<div class="logo">
<a href="https://cronkitenews.azpbs.org/noticias/"><img src="<?php bloginfo('template_directory'); ?>/assets/img/cronkite_noticias.svg" alt="Cronkite Noticias" title="Cronkite Noticias" /></a>
</div>
<!-- main navigation -->
<div class="nav_links">
<!-- top navigation -->
<ul class="top_links">
<li>
<div class="search-box">
<form method="get" class="navbar-form search" id="searchform" action="https://cronkitenews.azpbs.org/">
<input type="text" placeholder="Search" name="s" autocomplete="off" />
<img src="<?php bloginfo('template_directory'); ?>/assets/img/search.svg" width="16" height="16" />
</form>
</div>
</li>
<?php
$args = [
'menu' => 'Noticias header nav',
'container' => false,
'items_wrap' => '%3$s',
'depth' => 1,
'fallback_cb' => false,
'menu_id' => '',
'menu_class' => '',
];
wp_nav_menu($args);
?>
</ul>
</div>
<!-- hamburger icon -->
<div class="nav-hamburger animated slideInRight">
<button class="hamburger hamburger--collapse" type="button">
<div class="hamburger-box">
<div class="hamburger-inner"></div>
</div>
</button>
</div>
</div>
</div>
<!-- verticals navigation -->
<div id="sub_nav" class="sub_nav drop-shadow animated slideInDown noticias">
<ul>
<li class="misc_links_m">
<form method="get" class="navbar-form search" id="searchform" action="https://cronkitenews.azpbs.org/">
<input type="text" placeholder="Search" name="s" autocomplete="off" />
<img src="<?php bloginfo('template_directory'); ?>/assets/img/search.svg" width="16" height="16" />
</form>
</li>
<li class="top_links_m"><a href="https://cronkitenews.azpbs.org/sitenewscast/">Newscast</a></li>
<li class="top_links_m"><a href="https://www.asufoundation.org/colleges-and-programs/cronkite-news-CA126207.html" target="_blank">GIVE</a></li>
<li class="top_links_m last"><a href="https://cronkitenews.azpbs.org/daily-newsletter-signup/">Subscribe</a></li>
<li class="misc_links_m first"><a href="https://cronkitenews.azpbs.org/about-us/">About</a></li>
<li class="misc_links_m"><a href="https://cronkitenews.azpbs.org/what-we-do/" target="_blank">What we do</a></li>
<li class="misc_links_m"><a href="https://www.azpbs.org/" target="_blank">Arizona PBS</a></li>
<li class="misc_links_m"><a href="https://cronkite.asu.edu/" target="_blank">Walter Cronkite School of Journalism<br />and Mass Communication</a></li>
<li class="social_links_m"><a href="https://twitter.com/cronkitenews" target="_blank"><i class="fab fa-twitter"></i></a> <a href="https://www.facebook.com/cronkitenewsazpbs" target="_blank"><i class="fab fa-facebook-square"></i></a> <a href="https://www.instagram.com/cronkitenews/" target="_blank"><i class="fab fa-instagram"></i></a> <a href="https://www.youtube.com/user/cronkitenewswatch" target="_blank"><i class="fab fa-youtube"></i></a></li>
<li class="copyright_m">© <?php echo date('Y'); ?> Cronkite News. All rights reserved. Creative Commons.</li>
</ul>
</div>
</nav>
<!-- end start -->