-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-home.php
139 lines (135 loc) · 6.17 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
<?php
/**
* Home page
* @version 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<section class="home-element banner">
<div class="banner-bckg">
<?php
$bckg = get_field('background_edcoaching');
if($bckg): ?>
<img src="<?php echo $bckg['url']?>" alt="<?php echo $bckg['alt']; ?>"/>
<?php endif; ?>
</div>
<div class="banner-content">
<div class="wrap-sb">
<div class="sb left">
<div class="sb-top"></div>
<div class="sb-mid orange left">
<div class="sb-round left"><div></div></div>
</div>
</div>
<h1 class="content"><?php the_title() ?></h1>
</div>
<div class="wrap-sb">
<p><?php the_field('description_edcoaching') ?></p>
<div class="sb right">
<div class="sb-top"></div>
<div class="sb-mid red right">
<div class="sb-round right"><div></div></div>
</div>
</div>
</div>
</div>
</section>
<section class="home-element activity">
<div class="wrap-list">
<aside>
<div class="title-content">
<h2>Découvrez nos activités</h2>
<p><?php the_field('description_activite') ?></p>
</div>
</aside>
<article>
<ul class="list-content">
<?php
for ($act = 1; $act<=3; $act++):
$element = get_field('activite_'.$act);
if($element): ?>
<li>
<div class="wrap-sb">
<div class="sb left">
<div class="sb-top"></div>
<div class="sb-mid white left">
<div class="sb-round left"><div></div></div>
</div>
</div>
<div class="content">
<img src="<?php echo $element['icone']['url']?>" alt="<?php echo $element['icone']['alt']; ?>"/>
</div>
</div>
<h3><?php echo $element['libelle']?></h3>
<p><?php echo $element['description']?></p>
</li>
<?php endif; endfor;?>
</ul>
</article>
</div>
</section>
<div class="home-element contact">
<div class="wrap">
<h3 class="content">Pour nous contacter rien de plus simple <a href="#">c'est ici</a></h3>
</div>
</div>
<section class="home-element coach">
<div class="banner-bckg">
<?php
$bckg = get_field('background_coach');
if($bckg): ?>
<img src="<?php echo $bckg['url']?>" alt="<?php echo $bckg['alt']; ?>"/>
<?php endif; ?>
</div>
<div class="banner-content">
<div class="wrap-list">
<aside>
<div class="title-content">
<h2>Nos Coachs</h2>
</div>
</aside>
<article>
<ul class="list-content">
<?php
for ($c = 1; $c<=4; $c++):
$element = get_field('coach_'.$c);
if($element): ?>
<li>
<img src="<?php echo $element['avatar']['url']; ?>" alt="<?php echo $element['avatar']['alt']; ?>"/>
<h3><?php echo $element['prenom']; ?></h3>
<p><?php echo $element['description']; ?></p>
</li>
<?php endif; endfor;?>
</ul>
</article>
</div>
</div>
</section>
<section class="home-element partner">
<div class="wrap-list">
<aside>
<div class="title-content">
<h2>Nos Partenaires</h2>
</div>
</aside>
<article>
<ul class="list-content">
<?php
$args = array( 'post_type' => 'partenaire', 'posts_per_page' => 3 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<li> <?php
$image = get_field('logo'); $size = 'full';
if($image): ?>
<img src="<?php echo $image['url']?>" alt="<?php echo $image['alt']; ?>"/>
<?php endif; ?>
</li>
<?php endwhile; ?>
</ul>
</article>
</div>
</section>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer();