-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
61 lines (55 loc) · 3.76 KB
/
front-page.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
<?php get_header(); ?>
<div class="catchphrase col-md-8 col-md-offset-2 col-sm-6 col-sm-offset-3">
<picture class="catchphrase-picture">
<source type="image/avif" srcset="<?php echo get_template_directory_uri(); ?>/dist/img/jd.avif" alt="">
<source type="image/webp" srcset="<?php echo get_template_directory_uri(); ?>/dist/img/jd.webp" alt="">
<img class="catchphrase-image" src="<?php echo get_template_directory_uri(); ?>/dist/img/jd.png" alt="">
</picture>
<blockquote class="catchphrase-quote">
<p class="catchphrase-text"><?php _e("J'aide les organisations de petites et moyennes tailles à développer leur projets internets.", "jdd"); ?></p>
<p class="catchphrase-author reveal">– <?php _e("Jean-David Daviet", "jdd"); ?></p>
</blockquote>
</div>
<?php $testimonies = new WP_Query(['post_type' => 'temoignage', 'posts_per_page' => 2, 'order' => 'ASC']); if ( $testimonies->have_posts() ) : ?>
<div class="testimonies">
<div class="testimonies-controls">
<svg class="testimony-arrow testimony-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 492 492" width="34" height="34"><path d="M382.7 226.8l-219-219c-5-5-11.8-7.8-19-7.8s-14 2.8-19 7.9l-16.2 16a27 27 0 000 38.1L293.4 246l-184 184a26.8 26.8 0 000 38l16 16.2a26.9 26.9 0 0038 0L382.8 265c5-5 7.8-11.9 7.8-19 0-7.3-2.7-14.1-7.8-19.2z"/></svg>
<svg class="testimony-arrow testimony-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 492 492" width="34" height="34"><path d="M382.7 226.8l-219-219c-5-5-11.8-7.8-19-7.8s-14 2.8-19 7.9l-16.2 16a27 27 0 000 38.1L293.4 246l-184 184a26.8 26.8 0 000 38l16 16.2a26.9 26.9 0 0038 0L382.8 265c5-5 7.8-11.9 7.8-19 0-7.3-2.7-14.1-7.8-19.2z"/></svg>
</div>
<div class="testimony-slider">
<?php while ( $testimonies->have_posts() ) : $testimonies->the_post(); ?>
<div class="testimony">
<?php the_content(); ?>
</div>
<?php endwhile; ?>
</div>
</div>
<?php endif; ?>
<?php $articles = new WP_Query(['post_type' => 'post', 'posts_per_page' => 3, 'category__not_in' => array( 22, 62 ) ]); if ( $articles->have_posts() ) : ?>
<div class="homepage-last">
<h3 class="homepage-last-title"><?php _e("Les derniers articles", "jdd"); ?></h3>
<?php while ( $articles->have_posts() ) : $articles->the_post(); ?>
<p><a class="homepage-last-link" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
<?php endwhile; ?>
<p><a class="homepage-last-link-more" href="<?php echo get_permalink(get_option('page_for_posts')); ?>"><?php _e("Plus d'articles", "jdd"); ?></a></p>
</div>
<?php endif; ?>
<?php $links = new WP_Query(['post_type' => 'link', 'posts_per_page' => 3]); if ( $links->have_posts() ) : ?>
<div class="homepage-last">
<h3 class="homepage-last-title"><?php _e("Les derniers liens", "jdd"); ?></h3>
<?php while ( $links->have_posts() ) : $links->the_post(); ?>
<p><a class="homepage-last-link" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
<?php endwhile; ?>
<p><a class="homepage-last-link-more" href="/liens"><?php _e("Plus de liens", "jdd"); ?></a></p>
</div>
<?php endif; ?>
<?php $dossiers = get_categories(array('exclude' => array(1 /* Articles */ , 22 /* News */))); if( !empty($dossiers) ) : ?>
<div class="homepage-last">
<h3 class="homepage-last-title"><?php _e("Les derniers dossiers", "jdd"); ?></h3>
<?php foreach($dossiers as $dossier): ?>
<p><a class="homepage-last-link" href="<?php echo get_category_link($dossier->term_id); ?>"><?php echo $dossier->name; ?></a></p>
<?php endforeach; ?>
<p><a href="<?php echo home_url('/dossiers'); ?>" class="homepage-last-link-more"><?php _e("Plus de dossiers", "jdd"); ?></a></p>
</div>
<?php endif; ?>
<?php get_footer(); ?>