ldc-groupe/content/themes/ldc/page-aboutus.php
2020-10-14 08:38:07 +02:00

153 lines
6 KiB
PHP

<?php
/*
Template Name: Page About us
*/
?>
<?php
global $tp;
get_header();
$text = get_field('history_text');
$engagements = get_field('engagements');
$organization = get_field('organization');
$accordeon = get_field('history_accordeon');
$poultry = get_field('poultry');
$poultry_accordeon = get_field('poultry_accordeon');
$catering = get_field('catering');
$catering_accordeon = get_field('traiteur_accordeon');
$location = get_field('our_locations');
$export = get_field('our_export');
$export_accordeon = get_field('export_accordeon');
$history_slider = get_field('history_slider');
$history_slider2 = get_field('history_slider_2');
$add_block = get_field('additional_video_text');
?>
<div class="page-aboutus">
<?php get_template_part('partials/hero'); ?>
<?php get_template_part('partials/breadcrumbs'); ?>
<div id="nos-chiffres-cles">
<?php get_template_part('partials/key-figures'); ?>
<?php
if ($add_block['text_block'] !== NULL) {
set_query_var('text_block', $add_block['text_block']);
set_query_var('addclass', 'no-bottom-padding');
get_template_part('partials/text-block');
}
?>
</div>
<div id="notre-histoire-familiale">
<div class="history fw fw-container gray-bg">
<div class="history__wrapper wrapper">
<h2 class="history__title title"><span class="title-text">Notre histoire familiale</span></h2>
<?php set_query_var('addid', 'history_slider_1'); ?>
<?php set_query_var('history_slider', $history_slider2); ?>
<?php get_template_part('partials/history-slider'); ?>
<?php if(!empty($text)) : ?>
<div class="history__text description">
<?php foreach($text as $ht) : ?>
<div class="history__text-block">
<h3 class="history__text-block-title subtitle"><?php echo $ht['title'] ?></h3>
<div class="history__text-block-description description"><?php echo $ht['text'] ?></div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php set_query_var('addclass', 'no-bottom-margin'); ?>
<?php set_query_var('addid', 'history_slider_2'); ?>
<?php set_query_var('history_slider', $history_slider); ?>
<?php get_template_part('partials/history-slider'); ?>
</div>
</div>
</div>
<div id="notre-projet">
<?php get_template_part('partials/engagements'); ?>
</div>
<div id="nos-valeurs">
<div id="values-block"></div>
<?php set_query_var('addclass', 'gray-bg'); ?>
<?php get_template_part('partials/values'); ?>
</div>
<div id="notre-gouvernance-d-entreprise">
<?php set_query_var('addclass', 'one-group'); ?>
<?php set_query_var('custom_class', 'aboutus-gouvernance'); ?>
<?php get_template_part('partials/text-block'); ?>
</div>
<div id="notre-organisation-et-nos-activites">
<?php set_query_var('text_block', $organization['text_block']); ?>
<?php set_query_var('custom_class', 'notre-organisation'); ?>
<?php get_template_part('partials/text-block'); ?>
<div class="gray-bg">
<?php set_query_var('accordeon', $accordeon['accordeon']); ?>
<?php get_template_part('partials/accordeon'); ?>
</div>
<?php set_query_var('addclass', 'no-top-padding'); ?>
<?php set_query_var('text_block', $poultry['text_block']); ?>
<?php set_query_var('custom_class', 'notre-pole-volaille'); ?>
<?php get_template_part('partials/text-block'); ?>
<div class="gray-bg">
<?php set_query_var('accordeon', $poultry_accordeon['accordeon']); ?>
<?php get_template_part('partials/accordeon'); ?>
</div>
<?php set_query_var('addclass', 'no-top-padding'); ?>
<?php set_query_var('text_block', $export['text_block']); ?>
<?php set_query_var('custom_class', 'notre-pole-export'); ?>
<?php get_template_part('partials/text-block'); ?>
<div class="gray-bg">
<?php set_query_var('accordeon', $export_accordeon['accordeon']); ?>
<?php get_template_part('partials/accordeon'); ?>
</div>
<?php set_query_var('addclass', 'no-top-padding'); ?>
<?php set_query_var('text_block', $catering['text_block']); ?>
<?php set_query_var('custom_class', 'notre-pole-traiteur'); ?>
<?php get_template_part('partials/text-block'); ?>
<div class="gray-bg">
<?php set_query_var('accordeon', $catering_accordeon['accordeon']); ?>
<?php get_template_part('partials/accordeon'); ?>
</div>
</div>
<?php if(!empty($location)) : ?>
<div class="location fw fw-container" id="nos-implantations">
<div class="location__wrapper wrapper">
<?php if(!empty($location['title'])) : ?>
<h2 class="location__title title"><span class="title-text"><?php echo $location['title'] ?></span></h2>
<?php endif;?>
<?php if(!empty($location['text'])) : ?>
<div class="location__text description"><?php echo $location['text'] ?></div>
<?php endif;?>
<div class="location__map">
<?php get_template_part('partials/map'); ?>
</div>
<?php if(!empty($location['button'])) : ?>
<div class="location__btn-wrap">
<a class="location__btn btn" href="<?php echo $location['button']['url'] ?>" title="<?php echo $location['button']['title'] ?>"><?php echo $location['button']['title'] ?> <i class="btn__icon btn__icon_arrow-right"></i></a>
</div>
<?php endif;?>
</div>
</div>
<?php endif;?>
</div>
<?php get_footer(); ?>