/
index.php
375 lines (326 loc) · 13 KB
/
index.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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<?php
get_header(); ?>
<?php
$query = new WP_Query(array(
'post_type' => 'event',
'posts_per_page' => -1,
'order' => 'ASC'
));
$dates = array();
if ( $query->have_posts() ) {
while ($query->have_posts()) {
$query->the_post();
$dates[] = event_timing_get_meta( 'event_timing_date' );
}
};
$dates = array_values(array_unique( $dates ));
wp_reset_postdata();
?>
<body id="page-top" data-spy="scroll" data-target=".side-menu">
<nav class="side-menu">
<ul>
<li class="hidden active">
<a class="page-scroll" href="#page-top"></a>
</li>
<li>
<a href="#home" class="page-scroll">
<span class="menu-title">Home</span>
<span class="dot"></span>
</a>
</li>
<!-- <li>
<a href="#speakers" class="page-scroll">
<span class="menu-title">Coachs et experts</span>
<span class="dot"></span>
</a>
</li> -->
<li>
<a href="#tickets" class="page-scroll">
<span class="menu-title">Inscription</span>
<span class="dot"></span>
</a>
</li>
<li>
<a href="#schedule" class="page-scroll">
<span class="menu-title">Planning de l'événement</span>
<span class="dot"></span>
</a>
</li>
</ul>
</nav>
<div class="container-fluid">
<!-- Start: Header -->
<div class="row hero-header" id="home">
<div class="col-md-7">
<?php
$query = new WP_Query(array(
'post_type' => 'post',
'posts_per_page' => 1,
'order' => 'DSC'
));
if ( $query->have_posts() ) {
while ($query->have_posts()) {
$query->the_post();
?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/dist/image/logo.png" class="logo">
<h1><?php the_title(); ?></h1>
<h3><?php the_content(); ?></h3>
<?php
$tabLength = count($dates);
$event_start = new \DateTime($dates[0]);
$event_end = new \DateTime( $dates[$tabLength-1] );
?>
<h4>Du <?php echo $event_start->format('d-m') ?> au <?php echo $event_end->format('d-m') ?></h4>
<a href="#tickets" class="btn btn-lg btn-red white-txt page-scroll">Réservez votre place<span class="ti-arrow-right"></span></a>
<?php
}
};
wp_reset_postdata();
?>
</div>
<div class="col-md-5 hidden-xs">
<img src="<?php bloginfo('stylesheet_directory'); ?>/dist/image/rocket.png" class="rocket animated bounce">
</div>
</div>
<!-- End: Header -->
</div>
<div class="container whyItsSuperCool">
<!-- Start: Desc -->
<div class="row me-row content-ct">
<h2 class="row-title">Pourquoi ne pas rater cet événement</h2>
<div class="col-md-4 feature">
<i class="fi flaticon-signs"></i>
<h3>Esprit de compétition</h3>
<p><?= just_variable( "motivation1", FALSE ); ?></p>
</div>
<div class="col-md-4 feature">
<i class="fi flaticon-people"></i>
<h3>Travailler en réseau</h3>
<p><?= just_variable( "motivation2", FALSE ); ?></p>
</div>
<div class="col-md-4 feature">
<i class="fi flaticon-technology-1"></i>
<h3>Concrétiser une idée</h3>
<p><?= just_variable( "motivation3", FALSE ); ?></p>
</div>
</div>
<!-- End: Desc -->
<!-- Start: Speakers -->
<!--
<div class="row me-row content-ct speaker" id="speakers">
<h2 class="row-title">Coachs et experts</h2>
<?php
// WP_Query arguments
$args = array (
'post_type' => array( 'speaker' ),
'post_status' => array( 'publish' ),
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
?>
<div class="col-md-4 col-sm-6 feature">
<img src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID))?>" class="speaker-img animated bounce">
<h3><?php the_title() ?></h3>
<p><?php the_content() ?></p>
<ul class="speaker-social">
<?php if(speaker_social_get_meta( 'speaker_social_facebook' )) : ?>
<li>
<a href="<?php echo speaker_social_get_meta( 'speaker_social_facebook' ) ?>"><span class="ti-facebook"></span>
</a>
</li>
<?php endif; ?>
<?php if(speaker_social_get_meta( 'speaker_social_twitter' )) : ?>
<li>
<a href="<?php echo speaker_social_get_meta( 'speaker_social_twitter' ) ?>"><span class="ti-twitter-alt"></span></a>
</li>
<?php endif; ?>
<?php if(speaker_social_get_meta( 'speaker_social_linkedin' )) : ?>
<li><a href="<?php echo speaker_social_get_meta( 'speaker_social_linkedin' ) ?>"><span class="ti-linkedin"></span></a></li>
<?php endif; ?>
</ul>
</div>
<?php
}
} else {
?>
<div class="col-md-4 col-sm-6 feature">
Pas encore de conférenciers
</div>
<?php
}
// Restore original Post Data
wp_reset_postdata();
?>
</div>
-->
<!-- End: Speakers -->
</div>
<!-- Start: Tickets -->
<div class="container-fluid tickets" id="tickets">
<div class="row me-row content-ct">
<h2 class="row-title">Votre place</h2>
<div class="col-md-4 col-sm-6 col-md-offset-2">
<h3>Tickets pour participer</h3>
<p class="price">Gratuit</p>
<p>Réservez votre place pour participer au hackathon</p>
<?php if( just_variable( "url eventbrite event", FALSE ) != ''): ?>
<a href="<?php just_variable( "url eventbrite event" ) ?>" class="btn btn-lg btn-red">Commander</a>
<?php else: ?>
<a href="#" class="btn btn-lg btn-red">Rajouter l'eventbrite</a>
<?php endif; ?>
</div>
<div class="col-md-4 col-sm-6">
<h3>Tickets pour la remise des prix</h3>
<p class="price">Gratuit</p>
<p>Réservez votre place pour assister à la remise des prix</p>
<?php if( just_variable( 'url eventbrite conference', FALSE ) != ''): ?>
<a target="_blank" href="<?php just_variable('url eventbrite conference' ) ?>" class="btn btn-lg btn-red">Commander</a>
<?php else: ?>
<a target="_blank" href="#" class="btn btn-lg btn-red">Rajouter l'eventbrite</a>
<?php endif; ?>
</div>
</div>
</div>
<!-- End: Tickets -->
<div class="container">
<div class="row me-row schedule" id="schedule">
<h2 class="row-title content-ct">Planning des évènements</h2>
<div class="col-md-12">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<?php foreach($dates as $key => $date): ?>
<?php $dateObject = new \DateTime($date);?>
<li role="presentation">
<a href="#day-<?php echo ($key + 1) ?>" aria-controls="home" role="tab" data-toggle="tab">
Journée <?php echo ($key + 1) ?> <small class="hidden-xs">( <?php echo $dateObject->format('d-m-Y') ?>)</small>
</a>
</li>
<?php endforeach; ?>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<?php if(count($dates) > 0 ) : ?>
<?php foreach($dates as $key=>$date): ?>
<div role="tabpanel" class="tab-pane fade in <?php if($key == 0){ echo 'active';} ?>" id="day-<?php echo ($key + 1) ?>">
<div class="row">
<?php
$args = array (
'post_type' => array( 'event' ),
'post_status' => array( 'publish' ),
'meta_query' => array(
array(
'key' => 'event_timing_date',
'value' => $date,
'compare' => '=',
'type' => 'DATETIME',
),
),
'order' => 'ASC',
'orderby' => 'event_timing_order',
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
?>
<div class="col-md-6">
<div class="media">
<!--<div class="media-left">
<a href="#">
<img class="media-object" src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID))?>" alt="...">
</a>
</div>-->
<div class="media-body">
<?php
$start = event_timing_get_meta( 'event_timing_start' );
$end = event_timing_get_meta( 'event_timing_end' );
?>
<?php if(isset($start) && isset($end) ): ?>
<h4 class="media-heading">De <?php echo $start?> à <?php echo $end?></h4>
<?php else: ?>
<h4 class="media-heading">Pas encore d'horraires</h4>
<?php endif; ?>
<!--
<?php if(get_the_title()) : ?>
<h5><?php echo the_title()?></h5>
<?php else: ?>
<h4 class="media-heading">Pas encore de titre</h4>
<?php endif; ?>
-->
<?php if(get_the_content()) : ?>
<p><?php echo the_content(); ?></p>
<?php else: ?>
<p class="media-heading">Pas encore de description</p>
<?php endif; ?>
</div>
</div>
</div><!-- single event -->
<?php
}
} else {
?>
Pas de description disponible pour cette journée, revenez plus tard.
<?php
}
// Restore original Post Data
wp_reset_postdata();
?>
</div>
</div> <!-- tab panel-->
<?php endforeach; ?>
<?php endif; ?>
</div> <!-- tab content-->
</div>
</div>
</div><!--end schedule -->
<div>
<div class="">
<div class="container">
<div class="col-md-12">
<div class="slides owl-carousel">
<?php
$args = array (
'post_type' => array( 'slide' ),
'post_status' => array( 'publish' ),
'meta_query' => array(
array(
'key' => 'ordre_slide_numero',
),
),
'order' => 'ASC',
'orderby' => 'ordre_slide_numero',
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
?>
<?php
while ( $query->have_posts() ) {
$query->the_post();
?>
<div class="slide">
<img src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID))?>" alt="<?php the_title() ?>" title="<?php the_title() ?>"/>
</div><!-- single slide -->
<?php
}
} else {
?>
Pas de Slides disponible pour cet évènement, veuillez en ajouter.
<?php
}
wp_reset_postdata();
?>
</div>
</div>
</div>
</div>
</div><!-- End slides -->
<?php
get_footer();