FINAL MERGE V2 (from antoine-merge branch)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
b64b82ab9f
commit
1886840c70
342
footer.php
342
footer.php
|
|
@ -1,171 +1,173 @@
|
|||
<?php
|
||||
switch_to_blog(1);
|
||||
?>
|
||||
|
||||
<?php get_template_part('template-components/footer/page-scroller'); ?>
|
||||
</main>
|
||||
|
||||
<?php do_action('tailpress_content_end'); ?>
|
||||
|
||||
|
||||
<?php do_action('tailpress_content_after'); ?>
|
||||
|
||||
<footer id="main_footer" class="site-footer bg-gray-50 py-12" role="contentinfo">
|
||||
<div class="site-footer-grid-container">
|
||||
|
||||
<div class="site-footer__informative-message">
|
||||
<?php
|
||||
$theme_locations = get_nav_menu_locations();
|
||||
$footer_location_ID = $theme_locations['footer'];
|
||||
$footer_locale_location_ID = apply_filters('wpml_object_id', $footer_location_ID, 'nav_menu', TRUE,);
|
||||
$theme_locations = get_nav_menu_locations();
|
||||
|
||||
?>
|
||||
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
||||
<?php
|
||||
?>
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/pictogrammes/icone-info.svg' alt=''>
|
||||
<p class=""><?php echo $footer_superior_info_message['message'] ?></p>
|
||||
</div>
|
||||
|
||||
<div class="site-footer__infos-contact">
|
||||
<?php $infos_contact = get_field('footer_infos_contact_datagroup', 'term_' . $footer_locale_location_ID); ?>
|
||||
<div class="point-info">
|
||||
<h4 class="content-intertitle"><?php echo $infos_contact['point_info']['title'] ?></h4>
|
||||
<p><?php echo $infos_contact['point_info']['text'] ?></p>
|
||||
</div>
|
||||
<div class="permanenc-telephonique">
|
||||
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
||||
|
||||
<h4 class="content-intertitle"><?php echo $infos_contact['permanence_telephonique']['title'] ?></h4>
|
||||
<p><?php echo $infos_contact['permanence_telephonique']['text'] ?></p>
|
||||
</div>
|
||||
<div class="en-ligne">
|
||||
<h4 class="content-intertitle"><?php echo $infos_contact['en_ligne']['title'] ?></h4>
|
||||
<p><?php echo $infos_contact['en_ligne']['text'] ?></p>
|
||||
<a class="external-link" href="<?php echo $infos_contact['en_ligne']['form_url'] ?>" target="blank"><?php echo $infos_contact['en_ligne']['form_btn_text'] ?></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="site-footer__navigation-menu">
|
||||
|
||||
<div class="menu-renovateur--footer menu-renovateur">
|
||||
<?php get_template_part('template-components/footer/menu-renovateur-footer'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'container' => 'false',
|
||||
'theme_location' => 'homegrade',
|
||||
'li_class' => 'menu-navlink',
|
||||
'fallback_cb' => false,
|
||||
'menu_class' => 'menu-homegrade--footer',
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div class="extra_details">
|
||||
<?php
|
||||
$social_networks = get_field('social_networks_profiles', "option");
|
||||
$localizedSiteMapPage = apply_filters('wpml_object_id', 5699, 'page', TRUE);
|
||||
?>
|
||||
|
||||
<?php
|
||||
switch_to_blog(2);
|
||||
$home_url_metiers_patrimoine = get_home_url();
|
||||
restore_current_blog();
|
||||
?>
|
||||
<a class="cta cta--button cta--outline metiers-patrimoine-btn" href="<?php echo $home_url_metiers_patrimoine ?>"><?php echo __('Artisans du patrimoine', 'homegrade') ?></a>
|
||||
|
||||
<a class="cta cta--button cta--outline sitemap-btn" href="<?php echo get_the_permalink($localizedSiteMapPage) ?>">
|
||||
<?php echo get_the_title($localizedSiteMapPage) ?>
|
||||
</a>
|
||||
<div class="social-networks">
|
||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Facebook', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['facebook_profile_url'] ?>">
|
||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-facebook.svg' ?>" alt="">
|
||||
</a>
|
||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Youtube', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['youtube_profile_url'] ?>">
|
||||
<img src=" <?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-youtube.svg' ?>" alt="">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="site-footer__partenaires">
|
||||
<h4 class="content-intertitle"><?php echo __('Nos partenaires', 'metiers-patrimoine-theme') ?></h4>
|
||||
|
||||
<?php $partenaires = get_field('footer_partenaires', 'term_' . $footer_locale_location_ID)['partenaires']; ?>
|
||||
<?php foreach ($partenaires as $partenaire) : ?>
|
||||
<li>
|
||||
<a href=" <?php echo $partenaire['url'] ?>" target="_blank">
|
||||
<img src='<?php echo $partenaire['logo']['url'] ?>' alt='<?php echo $partenaire['name'] ?>'>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php do_action('tailpress_footer'); ?>
|
||||
</div>
|
||||
|
||||
<div class="footer-credits">
|
||||
<div class="website-credits">
|
||||
<img class="homegrade-sigle-icon" src="<?php echo get_template_directory_uri() . '/resources/img/logos/logo-homegrade-sigle.svg' ?>" alt="">
|
||||
<div>
|
||||
© <?php echo date_i18n('Y'); ?> - <?php echo get_bloginfo('name'); ?>
|
||||
<p class="made-by" lang="en">Made with
|
||||
<span class="sr-only">love</span>
|
||||
<span>
|
||||
<svg viewBox="0 0 825.22 700.44">
|
||||
<g>
|
||||
<path class="cls-1" d="m804.05,123.44c-25.5-54.3-74.5-96-131.6-113.7-56.2-17.5-118.7-11-170.3,17.2-35,19.2-61.9,49.6-89.7,77.6-6.6-6.6-13.2-13.2-19.8-19.8-12-12-23.7-24.7-36.9-35.4C301.75,5.54,229.25-10.56,161.75,6.94,98.25,23.44,43.75,69.54,17.85,129.94c-24,56-23.7,119.1.3,175,12.7,29.7,32.5,54.3,55.1,76.9l52.8,52.8c26.8,26.8,53.6,53.5,80.3,80.3,28.1,28.1,56.2,56.2,84.3,84.3,21.5,21.5,43.1,43.1,64.7,64.7,12.7,12.7,26.3,30.2,44.4,34.9,17,4.4,34.7-.5,47.4-12.3l.6-.6.5-.5,26.9-26.9,67.2-67.2,84.2-84.2,78.4-78.4,49.9-49.9c2.8-2.8,5.7-5.6,8.5-8.5,21.3-21.7,37.5-47.6,48.2-76,20.9-55.2,17.4-117.8-7.5-170.9Z" />
|
||||
</g>
|
||||
</svg>
|
||||
</span> by<a href="https://deligraph.com/" target="_blank">Deligraph</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="legal-credits">
|
||||
<?php
|
||||
$localizedCookiePage = apply_filters('wpml_object_id', 3502, 'page', TRUE);
|
||||
$localizedConditionsGenerales = apply_filters('wpml_object_id', 3504, 'page', TRUE);
|
||||
$localizedPolitiqueConfidentialite = apply_filters('wpml_object_id', 3, 'page', TRUE);
|
||||
$localizedDeclarationAccessibilite = apply_filters('wpml_object_id', 3506, 'page', TRUE);
|
||||
?>
|
||||
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedConditionsGenerales) ?>"><?php echo get_the_title($localizedConditionsGenerales) ?></a>
|
||||
</li>
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedCookiePage) ?>"><?php echo get_the_title($localizedCookiePage) ?></a>
|
||||
</li>
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedPolitiqueConfidentialite) ?>"><?php echo get_the_title($localizedPolitiqueConfidentialite) ?></a>
|
||||
</li>
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedDeclarationAccessibilite) ?>"><?php echo get_the_title($localizedDeclarationAccessibilite) ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
restore_current_blog();
|
||||
?>
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
<?php
|
||||
switch_to_blog(1);
|
||||
?>
|
||||
<?php get_template_part('template-components/footer/page-scroller'); ?>
|
||||
</main>
|
||||
|
||||
<?php do_action('tailpress_content_end'); ?>
|
||||
|
||||
|
||||
<?php do_action('tailpress_content_after'); ?>
|
||||
|
||||
<footer id="main_footer" class="site-footer bg-gray-50 py-12" role="contentinfo">
|
||||
<div class="site-footer-grid-container">
|
||||
|
||||
<div class="site-footer__informative-message">
|
||||
<?php
|
||||
$theme_locations = get_nav_menu_locations();
|
||||
$footer_location_ID = $theme_locations['footer'];
|
||||
$footer_locale_location_ID = apply_filters('wpml_object_id', $footer_location_ID, 'nav_menu', TRUE,);
|
||||
$theme_locations = get_nav_menu_locations();
|
||||
|
||||
?>
|
||||
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
||||
<?php
|
||||
?>
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/pictogrammes/icone-info.svg' alt=''>
|
||||
<p class=""><?php echo $footer_superior_info_message['message'] ?></p>
|
||||
</div>
|
||||
|
||||
<div class="site-footer__infos-contact">
|
||||
<?php $infos_contact = get_field('footer_infos_contact_datagroup', 'term_' . $footer_locale_location_ID); ?>
|
||||
<div class="point-info">
|
||||
<h4 class="content-intertitle"><?php echo $infos_contact['point_info']['title'] ?></h4>
|
||||
<p><?php echo $infos_contact['point_info']['text'] ?></p>
|
||||
</div>
|
||||
<div class="permanenc-telephonique">
|
||||
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
||||
|
||||
<h4 class="content-intertitle"><?php echo $infos_contact['permanence_telephonique']['title'] ?></h4>
|
||||
<p><?php echo $infos_contact['permanence_telephonique']['text'] ?></p>
|
||||
</div>
|
||||
<div class="en-ligne">
|
||||
<h4 class="content-intertitle"><?php echo $infos_contact['en_ligne']['title'] ?></h4>
|
||||
<p><?php echo $infos_contact['en_ligne']['text'] ?></p>
|
||||
<a class="external-link" href="<?php echo $infos_contact['en_ligne']['form_url'] ?>" target="blank"><?php echo $infos_contact['en_ligne']['form_btn_text'] ?></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="site-footer__navigation-menu">
|
||||
|
||||
<div class="menu-renovateur--footer menu-renovateur">
|
||||
<?php get_template_part('template-components/footer/menu-renovateur-footer'); ?>
|
||||
</div>
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'container' => 'false',
|
||||
'theme_location' => 'homegrade',
|
||||
'li_class' => 'menu-navlink',
|
||||
'fallback_cb' => false,
|
||||
'menu_class' => 'menu-homegrade--footer',
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div class="extra_details">
|
||||
<?php
|
||||
$social_networks = get_field('social_networks_profiles', "option");
|
||||
$localizedSiteMapPage = apply_filters('wpml_object_id', 5699, 'page', TRUE);
|
||||
?>
|
||||
|
||||
<?php
|
||||
switch_to_blog(2);
|
||||
$home_url_metiers_patrimoine = get_home_url();
|
||||
restore_current_blog();
|
||||
?>
|
||||
<a class="cta cta--button cta--outline metiers-patrimoine-btn" href="<?php echo $home_url_metiers_patrimoine ?>"><?php echo __('Artisans du patrimoine', 'homegrade') ?></a>
|
||||
|
||||
<a class="cta cta--button cta--outline sitemap-btn" href="<?php echo get_the_permalink($localizedSiteMapPage) ?>">
|
||||
<?php echo get_the_title($localizedSiteMapPage) ?>
|
||||
</a>
|
||||
<div class="social-networks">
|
||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Facebook', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['facebook_profile_url'] ?>">
|
||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-facebook.svg' ?>" alt="">
|
||||
</a>
|
||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Youtube', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['youtube_profile_url'] ?>">
|
||||
<img src=" <?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-youtube.svg' ?>" alt="">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="site-footer__partenaires">
|
||||
<h4 class="content-intertitle"><?php echo __('Nos partenaires', 'metiers-patrimoine-theme') ?></h4>
|
||||
|
||||
<?php $partenaires = get_field('footer_partenaires', 'term_' . $footer_locale_location_ID)['partenaires']; ?>
|
||||
<?php foreach ($partenaires as $partenaire) : ?>
|
||||
<li>
|
||||
<a href=" <?php echo $partenaire['url'] ?>" target="_blank">
|
||||
<img src='<?php echo $partenaire['logo']['url'] ?>' alt='<?php echo $partenaire['name'] ?>'>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php do_action('tailpress_footer'); ?>
|
||||
</div>
|
||||
|
||||
<div class="footer-credits">
|
||||
<div class="website-credits">
|
||||
<img class="homegrade-sigle-icon" src="<?php echo get_template_directory_uri() . '/resources/img/logos/logo-homegrade-sigle.svg' ?>" alt="">
|
||||
<div>
|
||||
© <?php echo date_i18n('Y'); ?> - <?php echo get_bloginfo('name'); ?>
|
||||
<p class="made-by" lang="en">Made with
|
||||
<span class="sr-only">love</span>
|
||||
<span>
|
||||
<svg viewBox="0 0 825.22 700.44">
|
||||
<g>
|
||||
<path class="cls-1" d="m804.05,123.44c-25.5-54.3-74.5-96-131.6-113.7-56.2-17.5-118.7-11-170.3,17.2-35,19.2-61.9,49.6-89.7,77.6-6.6-6.6-13.2-13.2-19.8-19.8-12-12-23.7-24.7-36.9-35.4C301.75,5.54,229.25-10.56,161.75,6.94,98.25,23.44,43.75,69.54,17.85,129.94c-24,56-23.7,119.1.3,175,12.7,29.7,32.5,54.3,55.1,76.9l52.8,52.8c26.8,26.8,53.6,53.5,80.3,80.3,28.1,28.1,56.2,56.2,84.3,84.3,21.5,21.5,43.1,43.1,64.7,64.7,12.7,12.7,26.3,30.2,44.4,34.9,17,4.4,34.7-.5,47.4-12.3l.6-.6.5-.5,26.9-26.9,67.2-67.2,84.2-84.2,78.4-78.4,49.9-49.9c2.8-2.8,5.7-5.6,8.5-8.5,21.3-21.7,37.5-47.6,48.2-76,20.9-55.2,17.4-117.8-7.5-170.9Z" />
|
||||
</g>
|
||||
</svg>
|
||||
</span> by<a href="https://deligraph.com/" target="_blank">Deligraph</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="legal-credits">
|
||||
<?php
|
||||
$localizedCookiePage = apply_filters('wpml_object_id', 3502, 'page', TRUE);
|
||||
$localizedConditionsGenerales = apply_filters('wpml_object_id', 3504, 'page', TRUE);
|
||||
$localizedPolitiqueConfidentialite = apply_filters('wpml_object_id', 3, 'page', TRUE);
|
||||
$localizedDeclarationAccessibilite = apply_filters('wpml_object_id', 3506, 'page', TRUE);
|
||||
?>
|
||||
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedConditionsGenerales) ?>"><?php echo get_the_title($localizedConditionsGenerales) ?></a>
|
||||
</li>
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedCookiePage) ?>"><?php echo get_the_title($localizedCookiePage) ?></a>
|
||||
</li>
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedPolitiqueConfidentialite) ?>"><?php echo get_the_title($localizedPolitiqueConfidentialite) ?></a>
|
||||
</li>
|
||||
<li class="legal-credits__legal-page-link">
|
||||
<a href="<?php echo get_the_permalink($localizedDeclarationAccessibilite) ?>"><?php echo get_the_title($localizedDeclarationAccessibilite) ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
restore_current_blog();
|
||||
?>
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
0
front-page.php
Executable file → Normal file
0
front-page.php
Executable file → Normal file
|
|
@ -16,4 +16,3 @@ require_once(__DIR__ . '/includes/wysiwyg.php');
|
|||
require_once(__DIR__ . '/includes/search.php');
|
||||
require_once(__DIR__ . '/includes/rooting.php');
|
||||
require_once(__DIR__ . '/includes/forms.php');
|
||||
require_once(__DIR__ . '/includes/wpml.php');
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<?php $currentLanguage = apply_filters('wpml_current_language', null); ?>
|
||||
|
||||
<?php
|
||||
$currentLanguage = apply_filters('wpml_current_language', null);
|
||||
switch_to_blog(1)
|
||||
switch_to_blog(1);
|
||||
?>
|
||||
|
||||
<body <?php body_class("homegrade-frontend-page ") ?> current-language="<?php echo $currentLanguage ?? "" ?>">
|
||||
|
|
@ -35,10 +35,10 @@ switch_to_blog(1)
|
|||
<?php get_template_part('template-components/header/mobile-brand'); ?>
|
||||
|
||||
<!-- MENU HOMEGRADE -->
|
||||
|
||||
<?php get_template_part('template-components/header/menu-homegrade'); ?>
|
||||
<?php get_template_part('template-components/header/menu-renovateur'); ?>
|
||||
|
||||
|
||||
<!-- SEARCH MODULE -->
|
||||
<?php get_template_part('template-components/header/search-module'); ?>
|
||||
</header>
|
||||
|
|
|
|||
0
includes/errorlog.php
Executable file → Normal file
0
includes/errorlog.php
Executable file → Normal file
|
|
@ -7,6 +7,8 @@ function add_menu_item($menu_items)
|
|||
return $menu_items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function homegrade_stats_option_page()
|
||||
{
|
||||
?>
|
||||
|
|
@ -88,6 +90,9 @@ function generate_order_datas_to_csv()
|
|||
$document_id_nl = $document['id_nl'] ?? null;
|
||||
$document_quantity_nl = $document['quantity_nl'] ?? null;
|
||||
|
||||
$dateCreatedRaw = $entry['date_created'] ?? '';
|
||||
$dateCreated = $dateCreatedRaw ? date('d / m / Y', strtotime($dateCreatedRaw)) : '';
|
||||
|
||||
if (!$document_quantity_fr && !$document_quantity_nl) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -103,6 +108,7 @@ function generate_order_datas_to_csv()
|
|||
'company_type' => $companyType,
|
||||
'zipCode' => $zipCode,
|
||||
'userLanguage' => $userLanguage,
|
||||
'order_date' => $dateCreated,
|
||||
];
|
||||
array_push($output_formatted_entries, $document_formatted_order_nl);
|
||||
}
|
||||
|
|
@ -119,6 +125,7 @@ function generate_order_datas_to_csv()
|
|||
'company_type' => $companyType,
|
||||
'zipCode' => $zipCode,
|
||||
'userLanguage' => $userLanguage,
|
||||
'order_date' => $dateCreated,
|
||||
];
|
||||
array_push($output_formatted_entries, $document_formatted_order_fr);
|
||||
}
|
||||
|
|
@ -136,7 +143,7 @@ function generate_order_datas_to_csv()
|
|||
}
|
||||
|
||||
// Ajouter les en-têtes du CSV
|
||||
fputcsv($file, ['Publication', 'Quantité', 'Langue de la publication', 'Thématique', 'ID de la brochure', 'Type d\'organisme', 'Code Postal', 'Langue de l\'utilisateur']);
|
||||
fputcsv($file, ['Publication', 'Quantité', 'Langue de la publication', 'Thématique', 'ID de la brochure', 'Type d\'organisme', 'Code Postal', 'Langue de l\'utilisateur', 'Date de la commande']);
|
||||
|
||||
// Boucler sur chaque entrée formatée et l'écrire dans le CSV
|
||||
foreach ($output_formatted_entries as $entry) {
|
||||
|
|
|
|||
0
includes/logos.php
Executable file → Normal file
0
includes/logos.php
Executable file → Normal file
|
|
@ -68,19 +68,17 @@ function add_custom_item_to_menu($items, $args)
|
|||
switch_to_blog(2);
|
||||
// $home_url_metiers_patrimoine = get_home_url();
|
||||
$home_url_metiers_patrimoine = get_the_permalink(43);
|
||||
// switch_to_blog(1);
|
||||
restore_current_blog();
|
||||
|
||||
|
||||
$items .= '<li id="menu-item-artisan-du-patrimoine" class="menu-item menu-item-type-post_type menu-item-object-page menu-navlink ">';
|
||||
$items .= '<a href="' . $home_url_metiers_patrimoine . '">';
|
||||
$items .= __('Artisans du patrimoine', 'homegrade');
|
||||
$items .= '</a>';
|
||||
$items .= '</li>';
|
||||
|
||||
|
||||
|
||||
|
||||
/* WPML NAV SWITCHER */
|
||||
ob_start();
|
||||
// switch_to_blog(1);
|
||||
restore_current_blog();
|
||||
// do_action('wpml_language_switcher', array('flags' => false, 'translated' => false, 'link_current' => true));
|
||||
do_action('wpml_add_language_selector');
|
||||
|
|
|
|||
|
|
@ -1,204 +1,204 @@
|
|||
<?php
|
||||
// Change Defaults Posts to "News" in menu bar
|
||||
function cp_change_post_object()
|
||||
{
|
||||
$get_post_type = get_post_type_object('post');
|
||||
|
||||
$labels = $get_post_type->labels;
|
||||
$labels->name = 'News';
|
||||
$labels->singular_name = 'News';
|
||||
$labels->add_new = 'Ajouter une Actu';
|
||||
$labels->add_new_item = 'Ajouter une Actu';
|
||||
$labels->edit_item = 'Editer l\'actualité';
|
||||
$labels->new_item = 'News';
|
||||
$labels->view_item = 'Voir l\'actualité';
|
||||
$labels->search_items = 'Chercher une Actualité';
|
||||
$labels->not_found = 'Pas de News trouvée';
|
||||
$labels->not_found_in_trash = 'Pas de News trouvée dans la corbeille';
|
||||
$labels->all_items = 'Toutes les Actus';
|
||||
$labels->menu_name = 'News';
|
||||
$labels->name_admin_bar = 'News';
|
||||
}
|
||||
add_action('init', 'cp_change_post_object');
|
||||
|
||||
|
||||
// Change Defaults Posts Icon in menu bar
|
||||
|
||||
function change_menu_icon()
|
||||
{
|
||||
|
||||
// Access global variables.
|
||||
global $menu;
|
||||
|
||||
foreach ($menu as $key => $val) {
|
||||
|
||||
if (__('News', 'homegrade-theme__texte-backoffice') == $val[0]) {
|
||||
$menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('admin_menu', 'change_menu_icon');
|
||||
|
||||
// #### POST TYPES
|
||||
function create_posttype()
|
||||
{
|
||||
|
||||
if (get_current_blog_id() != 1) {
|
||||
return;
|
||||
}
|
||||
// **** CONSEILS
|
||||
register_post_type(
|
||||
'conseils',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Conseils', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Conseil', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'template' => [
|
||||
array('homegrade-content-blocks/chapter-header'),
|
||||
array('core/paragraph', ['placeholder' => 'Add truc Description…',]),
|
||||
],
|
||||
'hierarchical' => true,
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-pressthis',
|
||||
'menu_position' => 2,
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||
|
||||
// 'supports' => array('title', 'custom-fields', 'editor'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** BROCHURES
|
||||
register_post_type(
|
||||
'brochures',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Brochures', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Brochure', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'hierarchical' => true,
|
||||
'show_in_rest' => true,
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'menu_icon' => 'dashicons-book',
|
||||
'menu_position' => 2,
|
||||
'position' => 2,
|
||||
'supports' => array('custom-fields', 'page-attributes', 'title'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** QUESTIONS
|
||||
register_post_type(
|
||||
'questions',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Questions', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Question', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-editor-help',
|
||||
'menu_position' => 2.1,
|
||||
'supports' => array('title', 'custom-fields', 'editor', 'excerpt', 'revisions'),
|
||||
|
||||
// 'rewrite' => array('slug' => 'questions'),
|
||||
// 'rewrite' => array('slug' => 'questions/%thematiques%'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** FICHES-INFOS
|
||||
register_post_type(
|
||||
'fiches-infos',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Fiches info', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Fiches Info', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-info-outline',
|
||||
'menu_position' => 2.1,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** VOCABULAIRE
|
||||
register_post_type(
|
||||
'vocabulaire',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-testimonial',
|
||||
'menu_position' => 5.1,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** JOBS
|
||||
register_post_type(
|
||||
'jobs',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Jobs', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Job', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'rewrite' => array('slug' => 'job'),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-id-alt',
|
||||
'menu_position' => 5.1,
|
||||
'supports' => array('title', 'editor', 'custom-fields', 'page-attributes'),
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
// **** VIDEOS / WEBINAIRES
|
||||
register_post_type(
|
||||
'videos-webinaires',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Webinaires', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Webinaire', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-video-alt2',
|
||||
'menu_position' => 5.1,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
'supports' => array('title', 'custom-fields', 'excerpt', 'thumbnail'),
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
// **** VIDEOS / WEBINAIRES
|
||||
register_post_type(
|
||||
'parcours',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Parcours', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Parcours', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'hierarchical' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-forms',
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_action('init', 'create_posttype');
|
||||
<?php
|
||||
// Change Defaults Posts to "News" in menu bar
|
||||
function cp_change_post_object()
|
||||
{
|
||||
$get_post_type = get_post_type_object('post');
|
||||
|
||||
$labels = $get_post_type->labels;
|
||||
$labels->name = 'News';
|
||||
$labels->singular_name = 'News';
|
||||
$labels->add_new = 'Ajouter une Actu';
|
||||
$labels->add_new_item = 'Ajouter une Actu';
|
||||
$labels->edit_item = 'Editer l\'actualité';
|
||||
$labels->new_item = 'News';
|
||||
$labels->view_item = 'Voir l\'actualité';
|
||||
$labels->search_items = 'Chercher une Actualité';
|
||||
$labels->not_found = 'Pas de News trouvée';
|
||||
$labels->not_found_in_trash = 'Pas de News trouvée dans la corbeille';
|
||||
$labels->all_items = 'Toutes les Actus';
|
||||
$labels->menu_name = 'News';
|
||||
$labels->name_admin_bar = 'News';
|
||||
}
|
||||
add_action('init', 'cp_change_post_object');
|
||||
|
||||
|
||||
// Change Defaults Posts Icon in menu bar
|
||||
|
||||
function change_menu_icon()
|
||||
{
|
||||
|
||||
// Access global variables.
|
||||
global $menu;
|
||||
|
||||
foreach ($menu as $key => $val) {
|
||||
|
||||
if (__('News', 'homegrade-theme__texte-backoffice') == $val[0]) {
|
||||
$menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('admin_menu', 'change_menu_icon');
|
||||
|
||||
// #### POST TYPES
|
||||
function create_posttype()
|
||||
{
|
||||
|
||||
if (get_current_blog_id() != 1) {
|
||||
return;
|
||||
}
|
||||
// **** CONSEILS
|
||||
register_post_type(
|
||||
'conseils',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Conseils', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Conseil', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'template' => [
|
||||
array('homegrade-content-blocks/chapter-header'),
|
||||
array('core/paragraph', ['placeholder' => 'Add truc Description…',]),
|
||||
],
|
||||
'hierarchical' => true,
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-pressthis',
|
||||
'menu_position' => 2,
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||
|
||||
// 'supports' => array('title', 'custom-fields', 'editor'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** BROCHURES
|
||||
register_post_type(
|
||||
'brochures',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Brochures', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Brochure', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'hierarchical' => true,
|
||||
'show_in_rest' => true,
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'menu_icon' => 'dashicons-book',
|
||||
'menu_position' => 2,
|
||||
'position' => 2,
|
||||
'supports' => array('custom-fields', 'page-attributes', 'title'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** QUESTIONS
|
||||
register_post_type(
|
||||
'questions',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Questions', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Question', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-editor-help',
|
||||
'menu_position' => 2.1,
|
||||
'supports' => array('title', 'custom-fields', 'editor', 'excerpt', 'revisions'),
|
||||
|
||||
// 'rewrite' => array('slug' => 'questions'),
|
||||
// 'rewrite' => array('slug' => 'questions/%thematiques%'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** FICHES-INFOS
|
||||
register_post_type(
|
||||
'fiches-infos',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Fiches info', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Fiches Info', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-info-outline',
|
||||
'menu_position' => 2.1,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** VOCABULAIRE
|
||||
register_post_type(
|
||||
'vocabulaire',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-testimonial',
|
||||
'menu_position' => 5.1,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** JOBS
|
||||
register_post_type(
|
||||
'jobs',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Jobs', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Job', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'rewrite' => array('slug' => 'job'),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-id-alt',
|
||||
'menu_position' => 5.1,
|
||||
'supports' => array('title', 'editor', 'custom-fields', 'page-attributes'),
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
// **** VIDEOS / WEBINAIRES
|
||||
register_post_type(
|
||||
'videos-webinaires',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Webinaires', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Webinaire', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-video-alt2',
|
||||
'menu_position' => 5.1,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
'supports' => array('title', 'custom-fields', 'excerpt', 'thumbnail'),
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
// **** VIDEOS / WEBINAIRES
|
||||
register_post_type(
|
||||
'parcours',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Parcours', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Parcours', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'hierarchical' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-forms',
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_action('init', 'create_posttype');
|
||||
|
|
|
|||
|
|
@ -42,9 +42,14 @@ function undo_create_term($term_id, $tt_id, $taxonomy)
|
|||
REGISTER TAXONOMIES
|
||||
--------------------*/
|
||||
|
||||
function homegrade_add_custom_taxonomies()
|
||||
function homegrade_add_homegrade_custom_taxonomies()
|
||||
{
|
||||
|
||||
$current_blog_id = get_current_blog_id();
|
||||
// write_log("Current blog ID: " . $current_blog_id);
|
||||
// if ($current_blog_id !== 1) {
|
||||
// return; // Skip if not on the main site
|
||||
// }
|
||||
|
||||
// ————— Thématiques —————
|
||||
register_taxonomy('thematiques', ['questions', 'conseils', 'brochures', 'fiches-infos', 'videos-webinaires'], array(
|
||||
|
|
@ -104,7 +109,6 @@ function homegrade_add_custom_taxonomies()
|
|||
'name' => ' Général',
|
||||
'slug' => 'general',
|
||||
],
|
||||
|
||||
));
|
||||
|
||||
// ————— mots-clés —————
|
||||
|
|
@ -131,7 +135,7 @@ function homegrade_add_custom_taxonomies()
|
|||
|
||||
));
|
||||
}
|
||||
add_action('init', 'homegrade_add_custom_taxonomies', 0);
|
||||
add_action('init', 'homegrade_add_homegrade_custom_taxonomies', 0);
|
||||
|
||||
/* -----------------------
|
||||
HIDE THEMATIQUE METABOX
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ function build_page_chapter_index($blocks)
|
|||
if ($block['blockName'] == 'homegrade-content-blocks/content-heading' && isset($block['attrs']['title']) && isset($block['attrs']['headingLevel']) && $block['attrs']['headingLevel'] == "h2") {
|
||||
array_push($chapterBlockIndex, [
|
||||
'block-type' => $block['blockName'],
|
||||
'anchor' => "#" . esc_html($block['attrs']['idName']),
|
||||
'title' => esc_html($block['attrs']['title']),
|
||||
'anchor' => "#" . strip_tags($block['attrs']['idName']),
|
||||
'title' => strip_tags($block['attrs']['title']),
|
||||
]);
|
||||
}
|
||||
if ($block['blockName'] == 'homegrade-content-blocks/chapitrage-thematique') {
|
||||
|
|
|
|||
0
includes/wysiwyg.php
Executable file → Normal file
0
includes/wysiwyg.php
Executable file → Normal file
|
|
@ -224,3 +224,23 @@
|
|||
@apply bg-patrimoine-sante-securite;
|
||||
}
|
||||
}
|
||||
|
||||
// Maybe Refactor ?
|
||||
ol {
|
||||
@apply list-decimal list-inside;
|
||||
|
||||
/* font-family: 'Railway', sans-serif; */
|
||||
li {
|
||||
list-style-type: decimal !important;
|
||||
list-style-position: inside !important;
|
||||
position: relative !important;
|
||||
padding-left: 1.5em !important;
|
||||
}
|
||||
li:marker {
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
.block-editor-rich-text__editable {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
0
resources/css/blocks/aides-financieres.css
Executable file → Normal file
0
resources/css/blocks/aides-financieres.css
Executable file → Normal file
|
|
@ -1,5 +1,5 @@
|
|||
.block-content-page-header {
|
||||
@apply py-8 md:py-16 flex gap-12 justify-between mx-auto;
|
||||
@apply py-8 md:py-16 lg:flex gap-12 justify-between mx-auto;
|
||||
|
||||
.section_titling {
|
||||
@apply px-0 !mb-1;
|
||||
|
|
|
|||
0
resources/css/blocks/demarches-administratives.css
Executable file → Normal file
0
resources/css/blocks/demarches-administratives.css
Executable file → Normal file
0
resources/css/blocks/home-header.css
Executable file → Normal file
0
resources/css/blocks/home-header.css
Executable file → Normal file
|
|
@ -1,11 +1,31 @@
|
|||
.lightbox-gallery {
|
||||
@apply grid sm:grid-cols-2 lg:grid-cols-3 gap-6;
|
||||
img {
|
||||
@apply h-full w-full object-cover max-h-80;
|
||||
@apply h-full w-full object-cover max-h-80 rounded-lg;
|
||||
}
|
||||
&__picture {
|
||||
@apply pointer-events-none;
|
||||
}
|
||||
&__trigger {
|
||||
@apply block relative;
|
||||
cursor: zoom-in;
|
||||
/* content: url('../resources/img/graphic-assets/icone-external-link-purple.svg'); */
|
||||
|
||||
&:after {
|
||||
transition: all 0.3s ease;
|
||||
content: '';
|
||||
@apply bg-contain bg-center w-16 h-16 top-1/2 right-1/2 absolute z-40 content-[''];
|
||||
@apply opacity-0;
|
||||
transform: translateY(10px);
|
||||
translate: 50% -50%;
|
||||
background-image: url('../resources/img/graphic-assets/icone-focus-galerie.svg');
|
||||
}
|
||||
|
||||
&:hover:after {
|
||||
transform: translateY(0px);
|
||||
@apply opacity-100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lightbox {
|
||||
|
|
@ -56,20 +76,22 @@
|
|||
}
|
||||
}
|
||||
&__container {
|
||||
@apply relative flex justify-center items-center bg-white;
|
||||
@apply relative flex justify-center items-center bg-white rounded-xl;
|
||||
width: 90%;
|
||||
height: fit-content;
|
||||
min-height: 90vh;
|
||||
@apply my-4 mx-auto;
|
||||
}
|
||||
|
||||
&__current-picture {
|
||||
img {
|
||||
@apply h-full w-full max-w-xl;
|
||||
@apply h-full w-full max-w-xl rounded-lg;
|
||||
|
||||
max-height: 60vh;
|
||||
}
|
||||
}
|
||||
&__current-picture-description {
|
||||
@apply text-center text-neutral-800 pt-2;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes lightboxIn {
|
||||
|
|
|
|||
84
resources/css/blocks/show-thematiques.css
Executable file → Normal file
84
resources/css/blocks/show-thematiques.css
Executable file → Normal file
|
|
@ -81,87 +81,3 @@
|
|||
pt-16;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-content {
|
||||
@apply lg:px-24 relative max-w-screen-2xl mx-auto;
|
||||
/* @apply bg-fuchsia-100; */
|
||||
}
|
||||
.swiper-container {
|
||||
height: auto;
|
||||
@apply px-3 overflow-hidden;
|
||||
/* @apply bg-yellow-50; */
|
||||
}
|
||||
|
||||
.swiper-wrapper {
|
||||
@apply pt-24 pb-16 w-full flex-col lg:flex-row gap-y-20;
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
@apply h-auto;
|
||||
.card-thematique {
|
||||
@apply h-full;
|
||||
}
|
||||
}
|
||||
|
||||
.thematique-button-next,
|
||||
.thematique-button-prev {
|
||||
@apply absolute top-1/2 z-50 opacity-80 hidden lg:block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
&:hover,
|
||||
&:focus-visible {
|
||||
@apply opacity-100;
|
||||
filter: invert(13%) sepia(71%) saturate(4425%) hue-rotate(338deg) brightness(109%)
|
||||
contrast(117%);
|
||||
}
|
||||
&:focus-visible {
|
||||
@apply rounded-full;
|
||||
}
|
||||
}
|
||||
.thematique-button-next {
|
||||
@apply right-0 transform;
|
||||
}
|
||||
.thematique-button-prev {
|
||||
@apply left-0;
|
||||
}
|
||||
.swiper-pagination {
|
||||
@apply hidden lg:block;
|
||||
}
|
||||
.swiper-pagination-bullet {
|
||||
@apply w-5 h-5 !mx-2 opacity-100 bg-white !border-2 !border-solid border-black;
|
||||
}
|
||||
.swiper-pagination-bullet:focus-visible {
|
||||
outline-offset: 4px;
|
||||
}
|
||||
.swiper-pagination-bullet-active {
|
||||
@apply bg-secondary !border-secondary opacity-100;
|
||||
}
|
||||
|
||||
/* .swiper-slide {
|
||||
background-color: red !important;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swiper-slide img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
} */
|
||||
.section-show-thematiques {
|
||||
@apply pt-8 pb-8 px-8 md:px-16;
|
||||
.thematiques-container {
|
||||
@apply grid
|
||||
grid-cols-3
|
||||
gap-8
|
||||
gap-y-32
|
||||
max-w-screen-xl
|
||||
mx-auto
|
||||
pt-16;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
resources/css/components/informative-message.css
Normal file
6
resources/css/components/informative-message.css
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.informative-message {
|
||||
@apply bg-primary text-white p-8 col-span-4 rounded-3xl flex justify-center;
|
||||
img {
|
||||
@apply mr-2;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
.previous-next-parcours,
|
||||
.previous-next-questions {
|
||||
@apply grid md:grid-cols-2 gap-x-6 gap-y-3 mx-auto max-w-screen-xl !px-6 xl:px-24 my-16;
|
||||
|
||||
&__previous,
|
||||
&__next {
|
||||
@apply flex gap-4 bg-white rounded-lg shadowed !py-4 px-6 items-center;
|
||||
|
|
@ -12,6 +13,10 @@
|
|||
@apply -translate-y-1 !bg-white;
|
||||
}
|
||||
}
|
||||
|
||||
&__post-thumbnail {
|
||||
@apply w-20 h-20 object-cover rounded-lg;
|
||||
}
|
||||
&__previous {
|
||||
@apply text-left justify-end;
|
||||
&:after {
|
||||
|
|
|
|||
22
resources/css/components/side-card.css
Normal file
22
resources/css/components/side-card.css
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
.side-card {
|
||||
@apply py-4 px-6 w-fit bg-white shadowed text-neutral-900
|
||||
font-bold rounded-2xl flex items-center justify-center my-5 gap-6;
|
||||
|
||||
transition: transform 0.3s;
|
||||
&__title {
|
||||
@apply leading-snug;
|
||||
}
|
||||
&__icon {
|
||||
@apply w-16 h-16;
|
||||
}
|
||||
|
||||
&:after {
|
||||
@apply content-[''] w-3 h-3 block bg-no-repeat bg-center bg-contain mt-1 ml-4;
|
||||
background-image: url('../resources/img/pictogrammes/Homegrade_back_icon.svg');
|
||||
rotate: 180deg;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@apply translate-x-2;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
/* Handling background page scroll */
|
||||
body:has(header .menu-renovateur .sub-menu--open) {
|
||||
@apply overflow-hidden;
|
||||
@media screen and (max-width: 960px) {
|
||||
@apply overflow-hidden;
|
||||
|
||||
/* FIXING BUG ON SAFARI */
|
||||
.menu-renovateur__mobile-menu-toggle,
|
||||
main {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
h-fit
|
||||
py-2
|
||||
px-4
|
||||
pl-10
|
||||
md:pl-24
|
||||
lg:pl-0
|
||||
xl:pl-24
|
||||
xl:px-8
|
||||
2xl:px-32
|
||||
my-0;
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
&__navlist {
|
||||
@apply w-full
|
||||
max-w-screen-2xl mx-auto lg:flex justify-center pr-0;
|
||||
max-w-screen-2xl mx-auto lg:flex justify-center items-center pr-0;
|
||||
|
||||
/* Highlight using list element */
|
||||
li.current-page-parent > a,
|
||||
|
|
@ -74,6 +74,7 @@
|
|||
text-center
|
||||
rounded-xl;
|
||||
@apply w-fit lg:mx-0;
|
||||
line-height: 1;
|
||||
|
||||
button,
|
||||
a {
|
||||
|
|
@ -96,6 +97,23 @@
|
|||
outline-offset: 8px;
|
||||
}
|
||||
|
||||
&#menu-item-artisan-du-patrimoine {
|
||||
@apply bg-white text-sm text-neutral-900 font-bold rounded-full mr-1
|
||||
2xl:mr-8 mt-4 lg:mt-0;
|
||||
transition: all 0.3s ease-out;
|
||||
&:focus-within,
|
||||
&:hover {
|
||||
@apply text-primary translate-x-1;
|
||||
}
|
||||
a {
|
||||
@apply flex items-center justify-center !py-1;
|
||||
}
|
||||
a:before {
|
||||
@apply w-6 h-6 mr-2 bg-contain bg-center bg-no-repeat content-[''];
|
||||
background-image: url('../resources/img/pictogrammes/Homegrade_artisans-patrimoine.svg');
|
||||
}
|
||||
}
|
||||
|
||||
/* IF SUBMENU CHILD */
|
||||
.menu-item__submenu-toggle {
|
||||
@apply pr-4;
|
||||
|
|
@ -118,6 +136,12 @@
|
|||
transform: translateY(20%) rotate(225deg);
|
||||
}
|
||||
}
|
||||
/* .wpml-ls-legacy-list-horizontal {
|
||||
@apply p-0;
|
||||
}
|
||||
.wpml-ls {
|
||||
@apply !p-0;
|
||||
} */
|
||||
}
|
||||
/* &__burger-menu-toggle {
|
||||
@apply lg:hidden
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ header#main-header {
|
|||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
@media screen and (max-width: 960px) {
|
||||
.menu-renovateur:not([opened]) {
|
||||
@apply h-0 opacity-0;
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
px-4
|
||||
xl:px-8
|
||||
relative
|
||||
flex
|
||||
flex-wrap
|
||||
lg:flex
|
||||
flex-nowrap
|
||||
xl:flex-wrap
|
||||
items-center
|
||||
justify-between
|
||||
lg:justify-center
|
||||
|
|
@ -23,6 +24,7 @@
|
|||
@apply order-1
|
||||
mr-2
|
||||
md:mr-12
|
||||
lg:mr-0
|
||||
xl:mr-auto
|
||||
w-[140px]
|
||||
md:w-[190px]
|
||||
|
|
@ -35,13 +37,10 @@
|
|||
@apply !opacity-90 rounded-md;
|
||||
}
|
||||
}
|
||||
/* &__main-elements {
|
||||
@apply w-full bg-red-200 flex justify-between items-center;
|
||||
} */
|
||||
|
||||
&__navlist {
|
||||
@apply w-fit
|
||||
md:pl-14
|
||||
xl:pl-14
|
||||
lg:mx-auto
|
||||
lg:flex
|
||||
justify-center;
|
||||
|
|
@ -169,7 +168,7 @@
|
|||
}
|
||||
&__submenu-toggle,
|
||||
> a {
|
||||
@apply p-6 rounded-3xl
|
||||
@apply lg:p-4 xl:p-6 rounded-3xl
|
||||
flex
|
||||
items-center;
|
||||
}
|
||||
|
|
@ -305,7 +304,7 @@
|
|||
.menu-item {
|
||||
&__submenu-toggle,
|
||||
> a {
|
||||
@apply p-3;
|
||||
@apply p-1 xl:p-3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,20 @@
|
|||
.conseils_wrapper {
|
||||
@apply lg:flex gap-x-8 max-w-screen-2xl mx-auto pb-12;
|
||||
|
||||
aside {
|
||||
@apply lg:sticky
|
||||
left-0
|
||||
h-fit
|
||||
lg:max-w-md
|
||||
top-4;
|
||||
}
|
||||
.chapter_index {
|
||||
@apply bg-gray
|
||||
w-full
|
||||
lg:max-w-md
|
||||
p-8
|
||||
h-fit
|
||||
lg:sticky
|
||||
left-0
|
||||
top-4
|
||||
|
||||
mb-4
|
||||
/* lg:sticky */
|
||||
rounded-2xl;
|
||||
|
||||
&__title {
|
||||
|
|
|
|||
0
resources/img/demo-img/chauffage.jpg
Executable file → Normal file
0
resources/img/demo-img/chauffage.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
|
@ -1,75 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="renolution-primes" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 247.37 335.2">
|
||||
<svg id="renolution-primes" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 223.89 323.88">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: url(#Dégradé_sans_nom_11-3);
|
||||
}
|
||||
|
||||
.cls-1, .cls-2, .cls-3, .cls-4 {
|
||||
.cls-1, .cls-2 {
|
||||
stroke-width: 0px;
|
||||
}
|
||||
|
||||
.cls-5 {
|
||||
.cls-3 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.cls-5, .cls-6 {
|
||||
.cls-3, .cls-4 {
|
||||
stroke: #000;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 2px;
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: url(#Dégradé_sans_nom_11-2);
|
||||
}
|
||||
|
||||
.cls-4 {
|
||||
.cls-2 {
|
||||
fill: url(#Dégradé_sans_nom_11);
|
||||
}
|
||||
|
||||
.cls-6 {
|
||||
.cls-4 {
|
||||
fill: none;
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="Dégradé_sans_nom_11" data-name="Dégradé sans nom 11" x1="-5717.86" y1="-104.98" x2="-5716.78" y2="-106.12" gradientTransform="translate(-85206.48 -17519.94) rotate(-169.4) scale(15.26 15.2)" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="Dégradé_sans_nom_11" data-name="Dégradé sans nom 11" x1="156.55" y1="6.44" x2="96.61" y2="49.84" gradientTransform="translate(34.23 119.5) rotate(-30) skewX(-30)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#f3281d"/>
|
||||
<stop offset="1" stop-color="#fe766f"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="Dégradé_sans_nom_11-2" data-name="Dégradé sans nom 11" x1="-5712.77" y1="-100.18" x2="-5711.22" y2="-101.81" gradientTransform="translate(-86319.6 -10446.66) rotate(-174.12) scale(15.26 15.2)" xlink:href="#Dégradé_sans_nom_11"/>
|
||||
<linearGradient id="Dégradé_sans_nom_11-3" data-name="Dégradé sans nom 11" x1="156.55" y1="17.77" x2="96.61" y2="61.16" gradientTransform="translate(34.23 117.75) rotate(-30) skewX(-30)" xlink:href="#Dégradé_sans_nom_11"/>
|
||||
</defs>
|
||||
<g id="Groupe_5560" data-name="Groupe 5560">
|
||||
<g id="Groupe_5557" data-name="Groupe 5557">
|
||||
<path id="Tracé_23834" data-name="Tracé 23834" class="cls-4" d="m233.24,96.7l-1.82.35c-.23.04-.38.27-.34.5.02.12.09.22.19.28l1.57.98c2.17,1.36,3.68,3.55,4.17,6.06l.35,1.82c.05.23.27.38.5.34.11-.02.22-.09.28-.19l.99-1.57c1.36-2.16,3.57-3.66,6.08-4.14l1.82-.35c.23-.04.38-.27.34-.5-.02-.12-.09-.22-.19-.28l-1.57-.99c-2.17-1.36-3.68-3.55-4.17-6.06l-.35-1.82c-.05-.23-.27-.38-.5-.34-.11.02-.22.09-.28.19l-.99,1.57c-1.36,2.16-3.56,3.66-6.07,4.14Z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon class="cls-3" points="8.06 262.47 112.64 322.88 112.64 204.34 60.35 108.7 8.06 143.97 8.06 262.47"/>
|
||||
<polygon class="cls-3" points="112.64 322.88 217.22 263.31 217.22 143.97 112.64 204.34 112.64 322.88"/>
|
||||
<polygon class="cls-3" points="222.89 145.24 166.82 42.68 54.67 107.43 110.75 209.99 222.89 145.24"/>
|
||||
<polygon class="cls-3" points="54.67 107.43 1 143.97 8.06 143.97 56.71 111.15 54.67 107.43"/>
|
||||
</g>
|
||||
<g id="Groupe_5560-2" data-name="Groupe 5560">
|
||||
<g id="Groupe_5557-2" data-name="Groupe 5557">
|
||||
<path id="Tracé_23834-2" data-name="Tracé 23834" class="cls-3" d="m203.36,9.3l-2.56.71c-.32.09-.51.42-.42.75.05.16.16.3.31.38l2.36,1.22c3.25,1.68,5.66,4.63,6.65,8.15l.72,2.55c.09.32.43.51.75.42.16-.05.3-.16.37-.3l1.22-2.35c1.69-3.24,4.65-5.64,8.18-6.62l2.55-.71c.32-.09.51-.42.42-.75-.05-.16-.16-.3-.31-.38l-2.36-1.22c-3.25-1.68-5.66-4.63-6.65-8.15l-.71-2.55c-.09-.32-.43-.51-.75-.42-.16.05-.3.16-.37.3l-1.22,2.35c-1.69,3.24-4.65,5.64-8.17,6.62Z"/>
|
||||
</g>
|
||||
<polygon class="cls-1" points="99.81 144.19 107.72 156.63 183.15 116.01 175.13 103.23 99.81 144.19"/>
|
||||
<g>
|
||||
<polygon class="cls-3" points="161.61 29.38 161.61 76.8 105.87 104.49 105.87 61.48 161.61 29.38"/>
|
||||
<path class="cls-3" d="m159.06,33.87l6.29,3.9-47.27,28.3c-1.26-.14-3.57-.45-5.99-1.05-.89-.22-1.98-.53-2.92-1.46-.34-.34-.57-.67-.71-.9,16.87-9.6,33.73-19.19,50.6-28.79Z"/>
|
||||
<path class="cls-3" d="m105.37,62.89v76.11c.99,1.92,3,5.04,6.52,6.23,3.5,1.18,7.01.14,8.97-1,17.61-10.24,35.21-20.48,52.82-30.73V36.11l-53.65,31.06c-.66.32-5.06,2.35-9.7.24-2.89-1.32-4.39-3.56-4.95-4.51Z"/>
|
||||
<line class="cls-4" x1="120.86" y1="144.23" x2="120.86" y2="67.17"/>
|
||||
<path class="cls-3" d="m173.67,36.11l-2.53-1.81c-17.45,10.18-34.91,20.36-52.36,30.54-1.62.5-4.42,1.05-7.31-.08-1.18-.46-2.94-1.15-3.16-2.57-.19-1.27.89-2.74,2.7-3.61,16.86-9.73,33.73-19.46,50.59-29.19-.75-.48-1.49-.95-2.24-1.43-17.09,9.83-34.17,19.66-51.26,29.48-.78.49-2.81,1.88-2.99,3.96-.28,3.22,4.06,5.73,6.87,6.52,3.64,1.04,6.82-.2,8.04-.75,17.88-10.35,35.76-20.71,53.65-31.06Z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon class="cls-5" points="8.06 273.8 112.64 334.2 112.64 215.67 60.35 120.03 8.06 155.29 8.06 273.8"/>
|
||||
<polygon class="cls-5" points="112.64 334.2 217.22 274.64 217.22 155.29 112.64 215.67 112.64 334.2"/>
|
||||
<polygon class="cls-5" points="222.89 156.57 166.82 54.01 54.67 118.75 110.75 221.31 222.89 156.57"/>
|
||||
<polygon class="cls-5" points="54.67 118.75 1 155.29 8.06 155.29 56.71 122.48 54.67 118.75"/>
|
||||
<polygon class="cls-3" points="118.39 60.39 155.9 38.74 155.9 1 118.39 22.66 118.39 60.39"/>
|
||||
<line class="cls-4" x1="150.32" y1="12.79" x2="123.97" y2="28"/>
|
||||
<line class="cls-4" x1="150.32" y1="21.04" x2="123.97" y2="36.26"/>
|
||||
<line class="cls-4" x1="150.32" y1="29.3" x2="123.97" y2="44.51"/>
|
||||
<line class="cls-4" x1="150.32" y1="37.56" x2="123.97" y2="52.77"/>
|
||||
</g>
|
||||
<polygon class="cls-2" points="99.81 155.52 107.72 167.96 183.15 127.34 175.13 114.56 99.81 155.52"/>
|
||||
<g>
|
||||
<polygon class="cls-5" points="161.61 40.71 161.61 88.13 105.87 115.82 105.87 72.8 161.61 40.71"/>
|
||||
<path class="cls-5" d="m159.06,45.2l6.29,3.9-47.27,28.3c-1.26-.14-3.57-.45-5.99-1.05-.89-.22-1.98-.53-2.92-1.46-.34-.34-.57-.67-.71-.9,16.87-9.6,33.73-19.19,50.6-28.79Z"/>
|
||||
<path class="cls-5" d="m105.37,74.22v76.11c.99,1.92,3,5.04,6.52,6.23,3.5,1.18,7.01.14,8.97-1,17.61-10.24,35.21-20.48,52.82-30.73V47.44l-53.65,31.06c-.66.32-5.06,2.35-9.7.24-2.89-1.32-4.39-3.56-4.95-4.51Z"/>
|
||||
<line class="cls-6" x1="120.86" y1="155.56" x2="120.86" y2="78.5"/>
|
||||
<path class="cls-5" d="m173.67,47.44l-2.53-1.81c-17.45,10.18-34.91,20.36-52.36,30.54-1.62.5-4.42,1.05-7.31-.08-1.18-.46-2.94-1.15-3.16-2.57-.19-1.27.89-2.74,2.7-3.61,16.86-9.73,33.73-19.46,50.59-29.19-.75-.48-1.49-.95-2.24-1.43-17.09,9.83-34.17,19.66-51.26,29.48-.78.49-2.81,1.88-2.99,3.96-.28,3.22,4.06,5.73,6.87,6.52,3.64,1.04,6.82-.2,8.04-.75,17.88-10.35,35.76-20.71,53.65-31.06Z"/>
|
||||
</g>
|
||||
<g>
|
||||
<polygon class="cls-5" points="118.39 71.72 155.9 50.07 155.9 12.33 118.39 33.98 118.39 71.72"/>
|
||||
<line class="cls-6" x1="150.32" y1="24.11" x2="123.97" y2="39.33"/>
|
||||
<line class="cls-6" x1="150.32" y1="32.37" x2="123.97" y2="47.58"/>
|
||||
<line class="cls-6" x1="150.32" y1="40.63" x2="123.97" y2="55.84"/>
|
||||
<line class="cls-6" x1="150.32" y1="48.88" x2="123.97" y2="64.1"/>
|
||||
</g>
|
||||
<polygon class="cls-1" points="165.6 88.63 131.03 108.58 131.03 97.66 165.6 77.7 165.6 88.63"/>
|
||||
<polygon class="cls-2" points="165.6 77.3 131.03 97.26 131.03 86.33 165.6 66.37 165.6 77.3"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
|
@ -1,4 +1,4 @@
|
|||
import editorInit from './editor';
|
||||
import editorInit from './editor-shortcode';
|
||||
import menuInit from './menus';
|
||||
import SchemaBulletPointsInit from './schema-bullet-points';
|
||||
import taxonomyThematiqueFaqInit from './taxonomy-thematique-(faq)';
|
||||
|
|
@ -29,5 +29,4 @@ window.addEventListener('DOMContentLoaded', (event) => {
|
|||
// NOTIFICATIONS
|
||||
notificationsInit();
|
||||
LightBoxSingle.init();
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,127 +1,119 @@
|
|||
<?php
|
||||
get_header();
|
||||
|
||||
?>
|
||||
<?php if (have_posts()) : ?>
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
<?php
|
||||
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
$mainThematique = getMainThematique($currentThematique);
|
||||
$thematiqueColorSlug = $mainThematique->slug;
|
||||
?>
|
||||
|
||||
<div class="post-conseil-page-container <?php echo $thematiqueColorSlug ? "post-conseil-page--" . $thematiqueColorSlug : "" ?>">
|
||||
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
<?php
|
||||
$archiveConseils = get_page_by_template('template-archive-conseils.php')[0];
|
||||
?>
|
||||
<ol>
|
||||
<li>
|
||||
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="<?php echo get_post_permalink($archiveConseils) ?>"><?php echo $archiveConseils->post_title ?></a></li>
|
||||
<?php if ($mainThematique != $currentThematique) : ?>
|
||||
<?php
|
||||
$args = array(
|
||||
'post_type' => 'conseils', // the post type
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'thematiques', // the custom vocabulary
|
||||
'field' => 'term_id', // term_id, slug or name
|
||||
'terms' => array($mainThematique->term_id),
|
||||
'include_children' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
$mainThematiqueRelatedConseil = get_posts($args)[0] ?? null;
|
||||
?>
|
||||
<li><a href="<?php echo get_post_permalink($mainThematiqueRelatedConseil) ?>"><?php echo $mainThematique->name ?></a></li>
|
||||
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php echo the_permalink() ?>" aria-current="location" aria-disabled="true"><?php echo $currentThematique->name ?></a></li>
|
||||
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
|
||||
<?php /* -------
|
||||
CHAPTER HEADER
|
||||
---------------*/ ?>
|
||||
<?php
|
||||
$blocks = parse_blocks($post->post_content);
|
||||
$chapterBlockIndex = build_page_chapter_index($blocks); // see utilities.php
|
||||
$queryArgs = array(
|
||||
'post_type' => 'brochures',
|
||||
'posts_per_page' => 1,
|
||||
'status' => 'publish',
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'thematiques',
|
||||
'field' => 'term_id',
|
||||
'terms' => $currentThematique->term_id,
|
||||
'include_children' => false,
|
||||
)
|
||||
)
|
||||
);
|
||||
$relatedBrochuresPosts = get_posts($queryArgs);
|
||||
$relatedBrochure = get_field('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null;
|
||||
|
||||
$hasManualDocument = get_field('manual_source_document') ?? null;
|
||||
$manualSrcDocument = get_field('manual_document_link');
|
||||
|
||||
$relatedDocumentUrl = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['source_document']) ? $manualSrcDocument['source_document']['url'] : $relatedBrochure['url'] ?? null;
|
||||
$relatedDocumentCtaTitle = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['button_title']) ? $manualSrcDocument['button_title'] : __("Télécharger la brochure ", "homegrade-theme__texte-fonctionnel");
|
||||
|
||||
get_template_part('template-components/post-conseils/chapter-header', null, array(
|
||||
'postID' => get_the_ID(),
|
||||
'subtitle' => __("Les conseillers Homegrade vous guident", "homegrade-theme__texte-fonctionnel"),
|
||||
'title' => get_the_title(get_the_ID()),
|
||||
'ctaUrl' => $relatedDocumentUrl,
|
||||
'ctaTitle' => $relatedDocumentCtaTitle,
|
||||
'hasInfoCapsule' => true,
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php /* -------
|
||||
CONSEIL
|
||||
---------------*/ ?>
|
||||
<div class=" conseils_wrapper">
|
||||
<!-- CHAPTER INDEX -->
|
||||
<aside>
|
||||
<?php if ($chapterBlockIndex) {
|
||||
get_template_part('template-components/post-conseils/chapter-index', null, array(
|
||||
'chapterBlockIndex' => $chapterBlockIndex,
|
||||
));
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
if ($mainThematique->term_id == 59 || $mainThematique->term_id == 32) {
|
||||
get_template_part('template-components/post-conseils/find-artisan', null, array());
|
||||
}
|
||||
?>
|
||||
|
||||
</aside>
|
||||
|
||||
<!-- ARTICLE -->
|
||||
<article class="entry-content single-editor-content <?php echo $thematiqueColorSlug ? "entry-content--" . $thematiqueColorSlug : "" ?>">
|
||||
<?php the_content() ?>
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
<?php
|
||||
get_header();
|
||||
|
||||
?>
|
||||
<?php if (have_posts()) : ?>
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
<?php
|
||||
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
$mainThematique = getMainThematique($currentThematique);
|
||||
$thematiqueColorSlug = $mainThematique->slug;
|
||||
?>
|
||||
|
||||
<div class="post-conseil-page-container <?php echo $thematiqueColorSlug ? "post-conseil-page--" . $thematiqueColorSlug : "" ?>">
|
||||
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
<?php
|
||||
$archiveConseils = get_page_by_template('template-archive-conseils.php')[0];
|
||||
?>
|
||||
<ol>
|
||||
<li>
|
||||
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="<?php echo get_post_permalink($archiveConseils) ?>"><?php echo $archiveConseils->post_title ?></a></li>
|
||||
<?php if ($mainThematique != $currentThematique) : ?>
|
||||
<?php
|
||||
$args = array(
|
||||
'post_type' => 'conseils', // the post type
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'thematiques', // the custom vocabulary
|
||||
'field' => 'term_id', // term_id, slug or name
|
||||
'terms' => array($mainThematique->term_id),
|
||||
'include_children' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
$mainThematiqueRelatedConseil = get_posts($args)[0] ?? null;
|
||||
?>
|
||||
<li><a href="<?php echo get_post_permalink($mainThematiqueRelatedConseil) ?>"><?php echo $mainThematique->name ?></a></li>
|
||||
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php echo the_permalink() ?>" aria-current="location" aria-disabled="true"><?php echo $currentThematique->name ?></a></li>
|
||||
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
|
||||
<?php /* -------
|
||||
CHAPTER HEADER
|
||||
---------------*/ ?>
|
||||
<?php
|
||||
$blocks = parse_blocks($post->post_content);
|
||||
$chapterBlockIndex = build_page_chapter_index($blocks); // see utilities.php
|
||||
$queryArgs = array(
|
||||
'post_type' => 'brochures',
|
||||
'posts_per_page' => 1,
|
||||
'status' => 'publish',
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'thematiques',
|
||||
'field' => 'term_id',
|
||||
'terms' => $currentThematique->term_id,
|
||||
'include_children' => false,
|
||||
)
|
||||
)
|
||||
);
|
||||
$relatedBrochuresPosts = get_posts($queryArgs);
|
||||
$relatedBrochure = get_field('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null;
|
||||
|
||||
$hasManualDocument = get_field('manual_source_document') ?? null;
|
||||
$manualSrcDocument = get_field('manual_document_link');
|
||||
|
||||
$relatedDocumentUrl = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['source_document']) ? $manualSrcDocument['source_document']['url'] : $relatedBrochure['url'] ?? null;
|
||||
$relatedDocumentCtaTitle = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['button_title']) ? $manualSrcDocument['button_title'] : __("Télécharger la brochure ", "homegrade-theme__texte-fonctionnel");
|
||||
|
||||
get_template_part('template-components/post-conseils/chapter-header', null, array(
|
||||
'postID' => get_the_ID(),
|
||||
'subtitle' => __("Les conseillers Homegrade vous guident", "homegrade-theme__texte-fonctionnel"),
|
||||
'title' => get_the_title(get_the_ID()),
|
||||
'ctaUrl' => $relatedDocumentUrl,
|
||||
'ctaTitle' => $relatedDocumentCtaTitle,
|
||||
'hasInfoCapsule' => true,
|
||||
));
|
||||
?>
|
||||
|
||||
<?php /* -------
|
||||
CONSEIL
|
||||
---------------*/ ?>
|
||||
<div class=" conseils_wrapper">
|
||||
<!-- CHAPTER INDEX -->
|
||||
<aside>
|
||||
<?php if ($chapterBlockIndex) {
|
||||
get_template_part('template-components/post-conseils/chapter-index', null, array(
|
||||
'chapterBlockIndex' => $chapterBlockIndex,
|
||||
));
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
if ($mainThematique->term_id == 59 || $mainThematique->term_id == 32) {
|
||||
get_template_part('template-components/post-conseils/find-artisan', null, array());
|
||||
}
|
||||
?>
|
||||
|
||||
</aside>
|
||||
|
||||
<!-- ARTICLE -->
|
||||
<article class="entry-content single-editor-content <?php echo $thematiqueColorSlug ? "entry-content--" . $thematiqueColorSlug : "" ?>">
|
||||
<?php the_content() ?>
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
|
|
|||
0
style-login.css
Executable file → Normal file
0
style-login.css
Executable file → Normal file
|
|
@ -3,7 +3,7 @@ Theme Name: Homegrade_Theme
|
|||
Author: Deligraph
|
||||
Author URI: https://deligraph.com/
|
||||
Version: 1.0.0
|
||||
Text Domain: homegrade-theme__texte-fonctionnel
|
||||
Text Domain: metiers-du-patrimoine
|
||||
Language: French
|
||||
Test
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $thematiqueColorSlug = $mainThematique->slug;
|
|||
<?php
|
||||
$currentPage = get_post();
|
||||
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
|
||||
$grandParentPage = $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
||||
$grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
||||
|
||||
?>
|
||||
<ol>
|
||||
|
|
|
|||
|
|
@ -3,18 +3,17 @@
|
|||
?>
|
||||
|
||||
<nav class="menu-homegrade menu-homegrade--header" closed>
|
||||
<!-- <div class="menu-homegrade__wrapper-container"> -->
|
||||
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'container' => 'false',
|
||||
'theme_location' => 'homegrade',
|
||||
'li_class' => 'menu-navlink',
|
||||
'fallback_cb' => false,
|
||||
'menu_class' => 'menu-homegrade-header menu-homegrade__navlist',
|
||||
'menu_id' => 'menu-homegrade-navlist',
|
||||
$args = array(
|
||||
'container' => 'false',
|
||||
'theme_location' => 'homegrade',
|
||||
'li_class' => 'menu-navlink',
|
||||
'fallback_cb' => false,
|
||||
'menu_class' => 'menu-homegrade-header menu-homegrade__navlist',
|
||||
'menu_id' => 'menu-homegrade-navlist',
|
||||
);
|
||||
wp_nav_menu($args);
|
||||
?>
|
||||
|
||||
)
|
||||
); ?>
|
||||
</nav>
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
<?php
|
||||
|
||||
// switch_to_blog(1);
|
||||
switch_to_blog(1);
|
||||
$menu_name = 'renovateur';
|
||||
$locations = get_nav_menu_locations();
|
||||
$menu = wp_get_nav_menu_object($locations[$menu_name]);
|
||||
if ($menu->taxonomy !== 'nav_menu') die();
|
||||
|
||||
|
||||
$menuitems = wp_get_nav_menu_items($menu->term_id, array('order' => 'DESC'));
|
||||
$logoID = get_theme_mod('custom_logo');
|
||||
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||
|
|
@ -224,5 +221,5 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
</div>
|
||||
|
||||
<?php
|
||||
// restore_current_blog();
|
||||
restore_current_blog();
|
||||
?>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
// switch_to_blog(1);
|
||||
switch_to_blog(1);
|
||||
$logoID = get_theme_mod('custom_logo');
|
||||
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||
?>
|
||||
|
|
@ -41,5 +41,5 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
|
||||
|
||||
<?php
|
||||
// restore_current_blog();
|
||||
restore_current_blog();
|
||||
?>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
switch_to_blog(1);
|
||||
// switch_to_blog(1);
|
||||
?>
|
||||
<div id="search-module" class="search-module" mobile-closed aria-hidden role="search">
|
||||
<div class="search-module__wrapper-container">
|
||||
|
|
@ -28,5 +28,5 @@ switch_to_blog(1);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
restore_current_blog();
|
||||
// restore_current_blog();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
mt-8
|
||||
relative;
|
||||
&__title {
|
||||
@apply font-bold text-4xl pt-4 max-w-3xl;
|
||||
@apply font-bold text-4xl pt-4 max-w-3xl;
|
||||
line-height: 1.2;
|
||||
}
|
||||
&__subtitle {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
$message = $args['message'];
|
||||
if (!$message) return;
|
||||
?>
|
||||
|
||||
<div class="informative-message">
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/pictogrammes/icone-info.svg' alt=''>
|
||||
<p><?php echo $message ?></p>
|
||||
</div>
|
||||
0
template-components/post-conseils/chapter-index.css
Normal file
0
template-components/post-conseils/chapter-index.css
Normal file
18
template-components/post-conseils/chapter-index.php
Normal file
18
template-components/post-conseils/chapter-index.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
$chapterBlockIndex = $args["chapterBlockIndex"];
|
||||
?>
|
||||
|
||||
<div class="chapter_index">
|
||||
<div class="chapter_index__titling">
|
||||
<div class="icon">
|
||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icon-feather-menu.svg' ?>" alt="">
|
||||
</div>
|
||||
<h2 class="chapter_index__title"> <?php echo __("Dans ce conseil", "homegrade-theme__texte-fonctionnel") ?> </h2>
|
||||
</div>
|
||||
<ul class="chapter_index__list">
|
||||
<div class="chapter_index__position-indicator"></div>
|
||||
<?php foreach ($chapterBlockIndex as $chapter) : ?>
|
||||
<li class="chapter_index__link"><a href="<?php echo $chapter['anchor'] ?>"><?php echo $chapter['title'] ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
10
template-components/post-conseils/find-artisan.php
Normal file
10
template-components/post-conseils/find-artisan.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
// get network site 2 home url
|
||||
$networkArtisan = get_blog_details(2);
|
||||
$networkArtisanHomeUrl = isset($networkArtisan->home) ? $networkArtisan->home : '';
|
||||
?>
|
||||
|
||||
<a href="<?php echo $networkArtisanHomeUrl ?>" class="side-card">
|
||||
<img class="side-card__icon" src="<?php echo get_template_directory_uri() . '/resources/img/pictogrammes/Homegrade_chercher-entreprise.svg' ?>" alt=''>
|
||||
<p class="side-card__title"> <?php echo __("Trouver un artisan du patrimoine pour réaliser vos rénovations", "metiers-patrimoine-theme") ?></p>
|
||||
</a>
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
.share-button a {
|
||||
@apply bg-primary !block w-8 h-8 rounded-full p-4 relative;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
|
||||
&:before {
|
||||
@apply absolute w-3 h-3 bg-contain bg-center bg-no-repeat;
|
||||
width: 25px;
|
||||
|
|
|
|||
|
|
@ -75,12 +75,6 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
|
|||
"pageIcon" => $pageIcon,
|
||||
"title" => get_the_title(get_queried_object_id()),
|
||||
"description" => __("Découvrez toutes nos publications et outils en ligne", "homegrade-theme__texte-fonctionnel"),
|
||||
"ctaSecondary" => array(
|
||||
"title" => $receivePrintedPublicationsDatas['cta_title'] ?? null,
|
||||
"url" => $receivePrintedPublicationsDatas['order_form_url'] ?? null,
|
||||
"target" => "_blank",
|
||||
"custom-class" => "paper-button",
|
||||
),
|
||||
));
|
||||
?>
|
||||
|
||||
|
|
@ -239,15 +233,42 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
|
|||
<!-- LOAD MORE -->
|
||||
<button id="load-more-brochures" class="cta cta--button cta--outline cta--button cta--centered cta--load-more" data-publication-type="brochures"><?php echo __("Consulter plus de brochures", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></button>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php /* ---------
|
||||
DISTRIBUEZ PUBLICATIONS
|
||||
-----------------*/ ?>
|
||||
|
||||
<?php
|
||||
$sharePublications = get_field('section_share_publications', $current_page_id);
|
||||
?>
|
||||
</section>
|
||||
|
||||
|
||||
<?php
|
||||
/* -------------------------
|
||||
DISTRIBUEZ PUBLICATIONS
|
||||
-----------------------------*/
|
||||
?>
|
||||
<?php
|
||||
$receivePrintedPublicationsDatas['order_form_url'] ?? null
|
||||
?>
|
||||
<section class="distribuez-publications wp-block-homegrade-content-blocks-highlight homegrade-blocks-highlight homegrade-blocks-highlight--classic homegrade-blocks-highlight--has-illustration">
|
||||
|
||||
<div class="homegrade-blocks-highlight--has-illustration__content">
|
||||
<div class="homegrade-blocks-highlight__titling ">
|
||||
<div class="icon"><img decoding="async" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNi4wMTIiIGhlaWdodD0iMTUuOTk5IiB2aWV3Qm94PSIwIDAgMTYuMDEyIDE1Ljk5OSI+CiAgPGcgaWQ9Ikljb25fZmVhdGhlci1saW5rIiBkYXRhLW5hbWU9Ikljb24gZmVhdGhlci1saW5rIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMS45OTMgLTIuMDA3KSI+CiAgICA8cGF0aCBpZD0iVHJhY8OpXzE4NTU5IiBkYXRhLW5hbWU9IlRyYWPDqSAxODU1OSIgZD0iTTE1LDEwLjcwN2EzLjUsMy41LDAsMCwwLDUuMjguMzc4bDIuMS0yLjFBMy41LDMuNSwwLDEsMCwxNy40Myw0LjAzM2wtMS4yLDEuMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTYuNDAyIDApIiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBpZD0iVHJhY8OpXzE4NTYwIiBkYXRhLW5hbWU9IlRyYWPDqSAxODU2MCIgZD0iTTExLjQsMTQuOWEzLjUsMy41LDAsMCwwLTUuMjgtLjM3OGwtMi4xLDIuMUEzLjUsMy41LDAsMSwwLDguOTcsMjEuNTdsMS4yLTEuMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtNS41OSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8L2c+Cjwvc3ZnPgo=" alt=""></div>
|
||||
<h3 class="homegrade-blocks-highlight__block-title"><?php echo $receivePrintedPublicationsDatas['title'] ?></h3>
|
||||
</div>
|
||||
|
||||
<div class="homegrade-blocks-highlight__content__innerblocks">
|
||||
<p><?php echo $receivePrintedPublicationsDatas['description'] ?></p>
|
||||
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="<?php echo $receivePrintedPublicationsDatas['order_form_url'] ?>" target="_blank" rel="noreferrer noopener"><?php echo $receivePrintedPublicationsDatas['cta_title'] ?></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img class="homegrade-blocks-highlight--has-illustration__illustration" decoding="async" src="<?php echo get_template_directory_uri() . "/resources/img/illustrations/homegrade_brochure-impression-domicile.svg" ?>" alt="">
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<?php /* -----------
|
||||
FICHES INFOS
|
||||
------------------*/ ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user