ldc-groupe/content/themes/ldc/page-rejoin.php
Vincent BRIDIER 067c15466a - Retours 2
2020-06-25 10:40:14 +02:00

354 lines
16 KiB
PHP

<?php
/*
Template Name: Page Rejoin
*/
?>
<?php get_header(); ?>
<?php
global $tp;
$videos = get_field('videos');
$experience = get_field('experience');
$policy = get_field('policy');
$concern = get_field('concern');
$events = get_field('events');
$schools = get_field('schools');
$breeders = get_field('eleveurs');
$map_image = get_field('map_image');
?>
<div class="page-rejoin">
<?php get_template_part('partials/hero'); ?>
<?php get_template_part('partials/breadcrumbs'); ?>
<div data-anchor="Plus de 130 métiers diversifiés">
<?php
set_query_var('hide_links', 1);
get_template_part('partials/professions');
?>
</div>
<?php if(!empty($videos)) : ?>
<div class="videos fw fw-container no-top-padding">
<div class="videos__wrapper wrapper">
<?php if(!empty($videos['videos'])) : ?>
<div class="videos__container">
<?php foreach($videos['videos'] as $v) : ?>
<div class="videos-list">
<h3 class="videos__title subtitle"><?php echo $v['title'] ?></h3>
<div class="videos__info">
<div class="videos__info-inner">
<?php if(!empty($v['list'])) : ?>
<div class="videos-list">
<?php shuffle($v['list']); ?>
<?php foreach(array_slice($v['list'], 0, 3) as $l) : ?>
<div class="video">
<div class="video__wrap">
<div class="play-button"></div>
<?php echo $l['file'] ?>
</div>
<div class="video__title"><?php echo $l['title'] ?></div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if(!empty($videos['text'])) : ?>
<div class="videos__text description"><?php echo $videos['text'] ?></div>
<?php endif; ?>
<?php if(!empty($videos['button'])) : ?>
<div class="videos__btn-wrap">
<a class="videos__btn btn" href="<?php echo $videos['button']['url'] ?>" target="<?php echo $videos['button']['target'] ?>" title="<?php echo $videos['button']['title'] ?>"><?php echo $videos['button']['title'] ?> <i class="btn__icon btn__icon_arrow-right"></i></a>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<div data-anchor="Votre parcours chez LDC">
<?php if(!empty($experience)) : ?>
<div class="experience fw fw-container gray-bg">
<div class="experience__wrapper wrapper">
<?php if(!empty($experience['title']) || !empty($experience['subtitle']['text'])) : ?>
<h2 class="experience__title textblock__title title">
<?php if(!empty($experience['title'])) : ?>
<span class="title-text"><?php echo $experience['title']; ?></span>
<?php endif; ?>
<?php if(!empty($experience['subtitle'])) : ?>
<span class="experience__subtitle subtitle-text textblock__subtitle subtitle subtitle_paint"><?php echo $experience['subtitle']; ?></span>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if(!empty($experience['image'])) : ?>
<div class="experience__image"><img src="<?php echo $experience['image'] ?>" alt="<?php echo (!empty($experience['title']) ? $experience['title'] : ' '); ?>" /></div>
<?php endif; ?>
<?php if(!empty($experience['votre_integration'])) : ?>
<div class="experience__textblock">
<h3 class="experience__textblock-subtitle subtitle"><?php echo $experience['votre_integration']['title'] ?></h3>
<div class="experience__textblock-text description"><?php echo $experience['votre_integration']['text'] ?></div>
</div>
<?php endif; ?>
<?php if(!empty($experience['votre_parcours_de_formation'])) : ?>
<div class="experience__textblock">
<h3 class="experience__textblock-subtitle subtitle"><?php echo $experience['votre_parcours_de_formation']['title'] ?></h3>
<div class="experience__textblock-text description"><?php echo $experience['votre_parcours_de_formation']['text'] ?></div>
</div>
<?php if(!empty($experience['votre_parcours_de_formation']['list'])) : ?>
<div class="training-path">
<?php foreach($experience['votre_parcours_de_formation']['list'] as $vl) : ?>
<div class="training-path__item training-path-item">
<div class="training-path-item__image"><img src="<?php echo $vl['image'] ?>" alt="<?php echo $vl['title'] ?>"></div>
<div class="training-path-item__description description">
<div class="training-path-item__title"><?php echo $vl['title'] ?></div>
<div class="training-path-item__text"><?php echo $vl['text'] ?></div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php
set_query_var('quotes', $experience['votre_parcours_de_formation']['quotes']);
get_template_part('partials/quotes');
?>
<?php endif; ?>
<?php if(!empty($experience['votre_mobilite_au_sein_du_groupe'])) : ?>
<div class="experience__textblock">
<h3 class="experience__textblock-subtitle subtitle"><?php echo $experience['votre_mobilite_au_sein_du_groupe']['title'] ?></h3>
<div class="experience__textblock-text description"><?php echo $experience['votre_mobilite_au_sein_du_groupe']['text'] ?></div>
</div>
<?php
set_query_var('quotes', $experience['votre_mobilite_au_sein_du_groupe']['quotes']);
get_template_part('partials/quotes');
?>
<?php endif; ?>
</div>
</div>
<?php
set_query_var('addclass', 'no-top-padding');
set_query_var('text_block', $experience['formation_des_jeunes_text_block']);
set_query_var('custom_class', 'formation_des_jeunes');
get_template_part('partials/text-block');
?>
<?php endif; ?>
</div>
<div data-anchor="Notre politique Ressources Humaines">
<?php if(!empty($policy)) : ?>
<?php
set_query_var('text_block', $policy['text_block']);
set_query_var('custom_class', 'notre-politique');
get_template_part('partials/text-block');
?>
<?php endif; ?>
</div>
<div data-anchor="Votre bien-être, notre préoccupation">
<?php if(!empty($concern)) : ?>
<?php
set_query_var('text_block', $concern['text_block']);
set_query_var('custom_class', 'votre-bien-etre');
get_template_part('partials/text-block');
?>
<?php if(!empty($concern['events_thumbs'])) : ?>
<?php $thumbs = $concern['events_thumbs']; ?>
<div class="events-thumbs fw fw-container gray-bg no-top-padding">
<div class="events-thumbs__wrapper wrapper">
<?php if(!empty($thumbs['text'])) : ?>
<div class="events-thumbs__text description"><?php echo $thumbs['text'] ?></div>
<?php endif; ?>
<?php if(!empty($thumbs['list'])) : ?>
<div class="events-thumbs__list-wrap events-thumbs-list-wrap">
<div class="events-thumbs-list">
<?php foreach($thumbs['list'] as $t) : ?>
<div class="events-thumbs-list__item">
<div class="events-thumbs-list__item-image image-border-wrap gray-bg">
<img src="<?php echo $t['image'] ?>" alt="<?php echo $t['text'] ?>" />
<?php
set_query_var('borders', $t['image_borders']);
get_template_part('partials/borders');
?>
</div>
<div class="events-thumbs-list__item-text description"><?php echo $t['text'] ?></div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<div data-anchor="Nos évènements forum et job dating">
<?php if(!empty($events)) : ?>
<div class="events fw fw-container">
<div class="events__wrapper wrapper">
<?php if(!empty($events['title']) || !empty($events['subtitle']['text'])) : ?>
<h2 class="events__title textblock__title title">
<?php if(!empty($events['title'])) : ?>
<span class="title-text"><?php echo $events['title']; ?></span>
<?php endif; ?>
<?php if(!empty($events['subtitle'])) : ?>
<span class="events__subtitle subtitle-text textblock__subtitle subtitle subtitle_paint"><?php echo $events['subtitle']; ?></span>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if(!empty($events['text'])) : ?>
<div class="events__text description"><?php echo $events['text'] ?></div>
<?php endif; ?>
<?php if(!empty($events['maps'])) : ?>
<div class="events__maps">
<?php foreach($events['maps'] as $m) : ?>
<div class="events__map events-map">
<h3 class="events-map__title subtitle"><?php echo $m['title'] ?></h3>
<div class="events-map__item gray-bg"><img src="<?php echo $m['image'] ?>" alt="<?php echo $m['title'] ?>" /></div>
<ul class="events-map__cities events-cities">
<?php foreach($m['cities'] as $c) : ?>
<li class="events-cities__item description">
<div class="events-cities__item-name"><?php echo $c['city'] ?></div>
<?php foreach($c['places'] as $p) : ?>
<div class="events-cities__item-place">
<span><?php echo $p['title'] ?></span><?php echo $p['text'] ?>
</div>
<?php endforeach; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="events-prof fw fw-container no-top-padding">
<div class="recent-posts__wrapper wrapper">
<h3 class="events-prof__sutbitle subtitle">Prochains évènements</h3>
<div class="events-list fw-container no-bottom-padding">
<?php get_template_part('partials/list-items', 'events'); ?>
</div>
<?php $lang = ICL_LANGUAGE_CODE; ?>
<?php if($lang == 'en') : ?>
<a class="btn" href="/en/category/news-en/?tag=evenements-en" title="Voir tous nos évènements, forums et job dating">Voir tous nos évènements, forums et job dating <i class="btn__icon btn__icon_arrow-right"></i></a>
<?php else : ?>
<a class="btn" href="/category/news/?tag=evenements,salon" title="Voir tous nos évènements, forums et job dating">Voir tous nos évènements, forums et job dating <i class="btn__icon btn__icon_arrow-right"></i></a>
<?php endif; ?>
</div>
</div>
<div data-anchor="Écoles, visitez-nous">
<?php if(!empty($schools)) : ?>
<?php
set_query_var('addclass', 'no-bottom-padding');
set_query_var('text_block', $schools['text_block']);
set_query_var('custom_class', 'ecoles');
get_template_part('partials/text-block');
?>
<?php endif; ?>
</div>
<?php if(!empty($map_image)) : ?>
<div class="rejoin-map fw fw-container gray-bg">
<div class="rejoin-map__wrapper wrapper">
<div class="rejoin-map__content" style="background-image: url(<?php echo $map_image['image']; ?>)">
<a class="rejoin-map__btn btn" href="<?php echo $map_image['button']['url']; ?>"><?php echo $map_image['button']['title']; ?><i class="btn__icon btn__icon_arrow-right"></i></a>
</div>
</div>
</div>
<?php endif; ?>
<div data-anchor="Éleveurs, rejoignez-nous">
<?php if(!empty($breeders)) : ?>
<div class="breeders fw fw-container">
<div class="breeders__wrapper wrapper">
<?php if(!empty($breeders['title']) || !empty($breeders['subtitle']['text'])) : ?>
<h2 class="breeders__title textblock__title title">
<?php if(!empty($breeders['title'])) : ?>
<span class="title-text"><?php echo $breeders['title']; ?></span>
<?php endif; ?>
<?php if(!empty($breeders['subtitle'])) : ?>
<span class="breeders__subtitle subtitle-text textblock__subtitle subtitle subtitle_paint"><?php echo $breeders['subtitle']; ?></span>
<?php endif; ?>
</h2>
<?php endif; ?>
<div class="textblock__container">
<div class="textblock__block">
<?php if(!empty($breeders['text'])) : ?>
<div class="breeders__text description textblock__info-description"><?php echo $breeders['text'] ?></div>
<?php endif; ?>
<?php if(!empty($breeders['button'])) : ?>
<a class="breeders__btn btn" href="<?php echo $breeders['button']['url'] ?>" title="<?php echo $breeders['button']['title'] ?>"><?php echo $breeders['button']['title'] ?> <i class="btn__icon btn__icon_arrow-right"></i></a>
<?php endif; ?>
</div>
</div>
<?php if(!empty($breeders['videos'])) : ?>
<div class="breeders__videos videos-list">
<?php foreach($breeders['videos'] as $v) : ?>
<div class="video">
<div class="video__wrap">
<div class="play-button"></div>
<?php echo $v['file'] ?>
</div>
<div class="video__title"><?php echo $v['title'] ?></div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
<script>
$(document).find('[data-anchor]').each(function(i){
var anchor_id = 'rejoin_'+i;
var anchor_text = $(this).attr('data-anchor');
$(this).attr('id', anchor_id);
link = '<a class="anchor-scroll" href="#'+anchor_id+'">'+anchor_text+'</a>';
$(document).find('.offer-anchors').append(link);
});
</script>
<?php get_footer(); ?>