-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
244 lines (225 loc) · 7.77 KB
/
footer.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
232
233
234
235
236
237
238
239
240
241
242
243
244
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package ROCKHARBOR_Church
*/
?>
</div>
<footer id="colophon" class="site-footer">
<div class="footer-info">
<div class="social">
<a href="https://www.twitter.com/rockharbor"><i class="fab fa-twitter"></i></a>
<a href="https://www.instagram.com/rockharborchurch/"><i class="fab fa-instagram"></i></a>
<a href="https://www.facebook.com/rockharborchurch"><i class="fab fa-facebook-f"></i></a>
</div>
<?php wp_nav_menu( array(
'theme_location' => 'footer',
'menu_id' => 'footer-menu',
'menu_class' => 'footer-menu',
'container' => '',
'depth' => 1,
)); ?>
<div class="app-store">
<h5>Download the Rockharbor App</h5>
<a href="https://itunes.apple.com/us/app/rockharbor/id1230114218?mt=8"><img src="<?php bloginfo('template_url');?>/images/apple_app_store_badge.svg" alt="Download the ROCKHARBOR App on the App Store for iPhone and iPad" class="svg-logo"></a>
<a href="https://play.google.com/store/apps/details?id=io.echurch.rockharborc&hl=en"><img src="<?php bloginfo('template_url');?>/images/google_play_web_badge.png" alt="Get the ROCKHARBOR App on Google Play"></a>
</div>
</div>
<div class="site-info">
© <?php echo date('Y');?> <?php bloginfo('name'); ?> <span class="sep"></span> <a href="/privacy-policy/">Privacy Policy</a>
</div>
</footer>
</div>
<nav class="overlay-navigation">
<img src="<?php bloginfo('template_url');?>/images/rockharbor-white-logo.svg" alt="<?php bloginfo('name');?>" class="overlay-logo">
<span class="overlay-close"><i></i></span>
<div class="wrapper">
<div class="overlay-scroller">
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'overlay-menu',
'menu_class' => 'overlay-menu',
'container' => '',
) );
?>
<form role="search" method="get" class="overlay-search" action="<?php echo home_url( '/' ); ?>">
<div>
<input type="search" placeholder="What are you looking for?" value="<?php echo get_search_query() ?>" name="s" autocomplete="off">
<button type="submit"><i></i></button>
</div>
</form>
</div>
</div>
<div class="overlay-social">
<a href="https://www.twitter.com/rockharbor"><i class="fab fa-twitter"></i></a>
<a href="https://www.instagram.com/rockharborchurch/"><i class="fab fa-instagram"></i></a>
<a href="https://www.facebook.com/rockharborchurch"><i class="fab fa-facebook-f"></i></a>
</div>
</nav>
<?php wp_footer(); ?>
<?php if(!is_page_template('templates/events.php')) { // dont run on events page ?>
<script>
//////////////////////////////////////////////////////////////////////////////////////////////////
////// Update Campus Filter to match Cookie
var $campus = Cookies.get('campus');
if (!$campus) {
$campus = 'all';
}
// fix new -online campus pages; costa-mesa-online becomes costa-mesa
$campus.replace('/(.*)-online/', '$1');
$('#campus-filter').val($campus);
</script>
<?php } ?>
<script>
//////////////////////////////////////////////////////////////////////////////////////////////////
////// Campus Filter Cookie on Change
$('#campus-filter').change(function(){
// get filter value
var campus = $(this).val();
// set cookie
Cookies.set('campus', campus, 2147483647, {path: '/'});
// append campus to url in case cookies are disallowed
redirectUrl = document.location.protocol + "//" + document.location.hostname + document.location.pathname;
if (document.location.search.length > 0) {
redirectUrl += "?";
newParams = Array();
queryParams = document.location.search.substring(1).split('&');
queryParams.forEach(function(queryParam) {
if (queryParam.search(/^c=/g) == -1) {
newParams.push(queryParam);
}
});
newParams.push("c=" + campus);
redirectUrl += newParams.join("&");
} else {
redirectUrl += "?c=" + campus;
}
location.href = redirectUrl; });
</script>
<?php
///////////////// JESUS PAGE
if(is_page_template('templates/jesus.php')) { ?>
<script src="<?php bloginfo('template_url');?>/js/vendors/multiplyfilter.min.js"></script>
<script src="//cdn.plyr.io/3.5.10/plyr.js"></script>
<script src="<?php bloginfo('template_url');?>/js/vendors/scrolloverflow.min.js"></script>
<script src="<?php bloginfo('template_url');?>/js/vendors/fullpage.min.js"></script>
<script src="<?php bloginfo('template_url');?>/js/vendors/aos.min.js"></script>
<script>
const player = new Plyr('#plyr');
var myFullpage = new fullpage('#know-jesus', {
licenseKey: 'OPEN-SOURCE-GPLV3-LICENSE',
menu: '#fp-nav',
navigationPosition: 'left',
showActiveTooltip: true,
scrollingSpeed: 1000,
paddingTop: '0',
paddingBottom: '0',
lockAnchors: true,
normalScrollElements: '.site-footer',
fitToSection: false,
scrollOverflow: true,
responsiveHeight: 0,
//hybrid: true,
//v2compatible: true,
onLeave: function(index, nextIndex, direction) {
player.pause();
//$('#know-jesus').attr('class', 'fullpage-wrapper');
//$('#know-jesus').addClass('section' + nextIndex);
//$('body.page-template-jesus').addClass('gradient' + nextIndex);
}
});
$(window).ready(function() {
AOS.init({ duration: 1000, once: true,});
});
</script>
<?php } ?>
<?php
///////////////// MESSAGES PAGE
if(is_singular('message')) { ?>
<script src="//cdn.plyr.io/3.5.10/plyr.js"></script>
<script>
const player = new Plyr('#plyr',{
//autoplay: true,
});
const player_audio = new Plyr('#plyr-audio');
/* Janky browsers (cough Safari cough) turn on captions in the native player with no controls so we get duplicates
So this turns them all off when the video player loads so we can toggle on plyr captions with the UI */
var video = document.getElementById("plyr");
video.addEventListener("canplay", function(event) {
for (var i = 0; i < event.target.textTracks.length; i++) {
video.textTracks[i].mode = 'hidden';
}
});
</script>
<?php } ?>
<?php
///////////////// CAMPUSES PAGE
if(is_singular('campus')) { ?>
<script src="<?php bloginfo('template_url');?>/js/vendors/sticky.min.js"></script>
<script>
$(window).ready(function() {
$('.campus-menu').scrollToFixed();
});
</script>
<?php } ?>
<?php
///////////////// HOME PAGE
if(is_front_page()) { ?>
<script src="<?php bloginfo('template_url');?>/js/vendors/slick.min.js"></script>
<script src="<?php bloginfo('template_url');?>/js/vendors/wheel-indicator.min.js"></script>
<script src="<?php bloginfo('template_url');?>/js/vendors/aos.min.js"></script>
<script type="text/javascript">
$(window).ready(function() {
var SLIDER = (function () {
var slider = {};
slider.build = function ($selector) {
var $currentSlider = $selector.slick({
vertical: true,
verticalSwiping: true,
infinite: true,
dots: false,
centerMode: true,
prevArrow: '<span class="slick-prev"><i class="fas fa-angle-up"></i></span>',
nextArrow: '<span class="slick-next"><i class="fas fa-angle-down"></i></span>',
slidesToShow: 3,
slidesToScroll: 3,
focusOnSelect: true
});
new WheelIndicator({
elem: document.querySelector('.callout-slider'),
callback: function (e) {
if ($currentSlider.slick('slickCurrentSlide') == $currentSlider.find('.slide').length - 1) {
this.setOptions({
preventMouse: false
});
} else {
this.setOptions({
preventMouse: true
});
}
e.direction === 'up' ? $currentSlider.slick('slickPrev') : $currentSlider.slick('slickNext');
}
});
};
return slider;
}());
SLIDER.build($('.callout-slider'));
});
$(window).ready(function() {
AOS.init({ duration: 1000, once: true,});
});
</script>
<?php } ?>
<?php if(is_search()) { ?>
<script>
$("#heading-search").focus();
</script>
<?php } ?>
</body>
</html>