-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-home.php
executable file
·292 lines (221 loc) · 9.02 KB
/
page-home.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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<?php Themewrangler::setup_page();get_header(/***Template Name: Home Page */); ?>
<div id="home-slider">
<div id="home-carousel" class="rsMinW">
<?php if( have_rows('featured_slider', 'options') ): while ( have_rows('featured_slider', 'options') ) : the_row(); ?>
<?php
<<<<<<< HEAD
=======
>>>>>>> origin/master
if (get_sub_field('slide_color') == "pink") {
$bgColor = 'RGBA(226, 67, 140, 1)';
} elseif (get_sub_field('slide_color') == "green") {
$bgColor = '#86993F';
} elseif (get_sub_field('slide_color') == "orange") {
$bgColor = '#E37428';
} elseif (get_sub_field('slide_color') == "teal") {
$bgColor = '#3BB8EA';
} elseif (get_sub_field('slide_color') == "blue") {
$bgColor = 'RGBA(0, 139, 190, 1)';
} else {
$bgColor = '';
}
$post_object = get_sub_field('slide_post');
$post = $post_object;
setup_postdata( $post );
if (get_sub_field('slide_image')){
$image = get_sub_field('slide_image');
$url = $image['url'];
$title = $image['title'];
$alt = $image['alt'];
$caption = $image['caption'];
$size = 'header-bg';
$altsize = 'large';
$large = $image['sizes'][ $altsize ];
$thumb = $image['sizes'][ $size ];
$width = $image['sizes'][ $size . '-width' ];
$height = $image['sizes'][ $size . '-height' ];
}
?>
<div class="slide" style="background-image:url(<?php echo $large; ?>);">
<div class="meta">
<div class="row">
<div class="desktop-10 tablet-6 mobile-3 centered">
<h2 class="title"><a href="<?php the_sub_field('slide_post');?>"><?php the_sub_field('slide_title'); ?></a></h2>
<div class="slide_meta">
<div class="row">
<div class="desktop-12 tablet-6 mobile-3 centered">
<a class='section-link' href="<?php the_sub_field('slide_post');?>">
<span class="button post-title" style="background-color:<?php echo $bgColor; ?>"><?php the_sub_field('button_text');?></span>
<span class="button sub-title"><?php the_sub_field('slide_sub-title', ''); ?></span>
</a>
</div>
</div>
</div>
</div>
<<<<<<< HEAD
=======
>>>>>>> origin/master
</div>
<hr style="background-color:<?php echo $bgColor; ?>">
</div>
<?php
if (get_sub_field('slide_image')){ ?>
<img class="rsImg" src="<?php echo $thumb; ?>" alt="<?php echo $image['alt']; ?>" />
<<<<<<< HEAD
=======
if (get_sub_field('slide_image')){
$image = get_sub_field('slide_image');
$url = $image['url'];
$title = $image['title'];
$alt = $image['alt'];
$caption = $image['caption'];
$size = 'header-bg';
$thumb = $image['sizes'][ $size ];
$width = $image['sizes'][ $size . '-width' ];
$height = $image['sizes'][ $size . '-height' ];
?>
<img class="rsImg" src="<?php echo $thumb; ?>" alt="<?php echo $image['alt']; ?>" />
>>>>>>> origin/master
<?php } else {
if ( has_post_thumbnail() ) {
the_post_thumbnail('header-bg', array('class' => 'rsImg'));
} else {
echo '<img src="http://placehold.it/1200x500/C9B6F2" class="rsImg">';
}
}
?>
</div>
<?php wp_reset_postdata();?>
<?php endwhile; endif; ?>
</div>
</div>
<div id="books-bg">
<div class="row">
<div class="desktop-12">
<div id="mission-statement">
<div class="page-content">
<div class="row">
<div class="desktop-10 tablet-6 mobile-3 centered">
<?php the_content(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="desktop-10 tablet-6 mobile-3 centered arrow-wrapper">
<a href="#upcoming-events">
<i class="ss-icon ss-gizmo home-arrow left">down</i>
<h3 id="upcoming-events">Upcoming Events</h3>
</a>
</div>
</div>
</div>
<div id="home-upcoming">
<div class="row">
<div class="desktop-10 centered">
<div class="row">
<header class="desktop-8 tablet-4 mobile-3">
<p>
From Member events to ALOUD programs, Library Store On Wheels stops and much much more, stay up on the Library Foundation’s activities.
</p>
</header>
<div id="carousel-date-select" class="desktop-3 tablet-2 mobile-3 text-right right">
<select name="selecter_basic" id="selecter_basic" class="selecter_basic" data-selecter-options='{"label":"Jump to Month"}'>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-01-01">Jan</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-02-01">Feb</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-03-01">Mar</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-04-01">Apr</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-05-01">May</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-06-01">Jun</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-07-01">Jul</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-08-01">Aug</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-09-01">Sep</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-10-01">Oct</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-11-01">Nov</option>
<option value="/calendar/?action=tribe_list&tribe_paged=1&tribe_event_display=list&tribe-bar-date=<?php echo date("Y"); ?>-12-01">Dec</option>
</select>
<<<<<<< HEAD
=======
>>>>>>> origin/master
</div>
</div>
</div>
<a class="carouselBtn prevBtn"><i class="ss-icon ss-gizmo">navigateleft</i></a>
<a class="carouselBtn nextBtn"><i class="ss-icon ss-gizmo">navigateright</i></a>
<div id="upcoming-events-carousel" class="desktop-12 contained">
<<<<<<< HEAD
<?php
=======
<?php
>>>>>>> origin/master
$args = array(
'showposts' => 9,
'post_type' => 'tribe_events',
// 'meta_query' => array(
// array(
// 'key' => 'no_homepage',
// 'value' => '0',
// 'compare' => 'NOT EXISTS'
// )
// )
);
<<<<<<< HEAD
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query($args);
while ($wp_query->have_posts()) : $wp_query->the_post();
=======
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query($args);
while ($wp_query->have_posts()) : $wp_query->the_post();
>>>>>>> origin/master
?>
<?php get_template_part('templates/home/events-carousel', 'item' ); ?>
<?php endwhile; ?>
<?php
$wp_query = null;
$wp_query = $temp; // Reset
?>
</div>
</div>
</div>
<div id="home-featured">
<div class="row">
<header class="desktop-10 tablet-6 mobile-3 centered">
<hr>
<a href="#spotlight-events">
<i class="ss-icon ss-gizmo home-arrow left ">down</i>
<h3 id="spotlight-events"><a href="/calendar">Spotlight<span> | View Full Calendar</span></a></h3>
</a>
</header>
<div class="desktop-12 tablet-6 mobile-3">
<div class="slider rsMinW">
<<<<<<< HEAD
<?php
if( have_rows('featured_slider_bottom', 'options') ):
while ( have_rows('featured_slider_bottom', 'options') ) : the_row();
$post_object = get_sub_field('slide_post');
$post = $post_object;
setup_postdata( $post );
=======
<?php
if( have_rows('featured_slider_bottom', 'options') ):
while ( have_rows('featured_slider_bottom', 'options') ) : the_row();
$post_object = get_sub_field('slide_post');
$post = $post_object;
setup_postdata( $post );
>>>>>>> origin/master
get_template_part('templates/home/slider', 'bottom' );
wp_reset_postdata();
endwhile; endif;
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>