stashing
This commit is contained in:
parent
2a75dd5d00
commit
1a1f1c6e9b
33
footer.php
33
footer.php
|
|
@ -1,3 +1,7 @@
|
|||
<?php
|
||||
switch_to_blog(1);
|
||||
?>
|
||||
|
||||
<?php get_template_part('template-components/footer/page-scroller'); ?>
|
||||
</main>
|
||||
|
||||
|
|
@ -50,6 +54,7 @@
|
|||
<div class="menu-renovateur--footer menu-renovateur">
|
||||
<?php get_template_part('template-components/footer/menu-renovateur-footer'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
|
|
@ -67,8 +72,14 @@
|
|||
$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" href="<?php echo get_the_permalink($localizedSiteMapPage) ?>">
|
||||
<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">
|
||||
|
|
@ -83,10 +94,11 @@
|
|||
|
||||
</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>
|
||||
|
|
@ -97,13 +109,6 @@
|
|||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<div class="site-footer__metiers-patrimoine">
|
||||
<?php $metiers_patrimoine = get_field('footer_metiers_du_patirmoine', 'term_' . $footer_locale_location_ID); ?>
|
||||
|
||||
<h4 class="content-intertitle"><?php echo $metiers_patrimoine['title'] ?> </h4>
|
||||
<p><?php echo $metiers_patrimoine['text'] ?> </p>
|
||||
<a class="cta cta cta--primary cta--button" href="<?php echo $metiers_patrimoine['cta_url'] ?> " target="_blank"><?php echo $metiers_patrimoine['cta_text'] ?></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -124,7 +129,7 @@
|
|||
<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>
|
||||
</span> by<a href="https://deligraph.com/" target="_blank">Deligraph</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -135,7 +140,6 @@
|
|||
$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">
|
||||
|
|
@ -153,16 +157,15 @@
|
|||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
restore_current_blog();
|
||||
?>
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -16,3 +16,4 @@ 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');
|
||||
|
|
|
|||
18
header.php
18
header.php
|
|
@ -8,17 +8,17 @@
|
|||
<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)
|
||||
?>
|
||||
|
||||
<body <?php body_class("homegrade-frontend-page ") ?> current-language="<?php echo $currentLanguage ?? "" ?>">
|
||||
<?php
|
||||
do_action('tailpress_site_before');
|
||||
global $post;
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div id="page-<?php echo $post->post_name ?? "" ?>" class="min-h-screen flex flex-col ">
|
||||
|
||||
<div class="skiplinks" aria-label="<?php echo __('Accès rapide', 'homegrade-theme__texte-fonctionnel') ?>">
|
||||
|
|
@ -31,13 +31,11 @@
|
|||
<?php do_action('tailpress_header'); ?>
|
||||
|
||||
<header id="main-header">
|
||||
|
||||
<!-- MENU MOBILE -->
|
||||
<?php
|
||||
get_template_part('template-components/header/mobile-brand');
|
||||
?>
|
||||
<?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'); ?>
|
||||
|
||||
|
|
@ -47,5 +45,7 @@
|
|||
|
||||
<?php do_action('tailpress_content_start'); ?>
|
||||
|
||||
|
||||
<main id="content" class="site-content flex-grow">
|
||||
<?php
|
||||
restore_current_blog();
|
||||
?>
|
||||
|
|
@ -7,15 +7,14 @@
|
|||
|
||||
function register_theme_settings_option_page()
|
||||
{
|
||||
$current_blog_id = get_current_blog_id();
|
||||
|
||||
// Check function exists.
|
||||
if (function_exists('acf_add_options_page')) {
|
||||
if (function_exists('acf_add_options_page') && $current_blog_id === 1) {
|
||||
|
||||
// Register options page.
|
||||
$homegrade_option_page = acf_add_options_page(array(
|
||||
'page_title' => __('Paramètres & Outils', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_title' => __('Paramètres', 'homegrade-theme__texte-backoffice'),
|
||||
|
||||
'menu_slug' => 'theme-general-settings',
|
||||
'capability' => 'activate_plugins',
|
||||
'redirect' => false,
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ function add_menu_item($menu_items)
|
|||
return $menu_items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function homegrade_stats_option_page()
|
||||
{
|
||||
?>
|
||||
|
|
@ -90,9 +88,6 @@ 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;
|
||||
}
|
||||
|
|
@ -108,7 +103,6 @@ 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);
|
||||
}
|
||||
|
|
@ -125,7 +119,6 @@ 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);
|
||||
}
|
||||
|
|
@ -143,7 +136,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', 'Date de la commande']);
|
||||
fputcsv($file, ['Publication', 'Quantité', 'Langue de la publication', 'Thématique', 'ID de la brochure', 'Type d\'organisme', 'Code Postal', 'Langue de l\'utilisateur']);
|
||||
|
||||
// Boucler sur chaque entrée formatée et l'écrire dans le CSV
|
||||
foreach ($output_formatted_entries as $entry) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Theme setup.
|
||||
*/
|
||||
|
||||
|
||||
function tailpress_setup()
|
||||
{
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ function homegrade_enqueue_scripts()
|
|||
wp_enqueue_script('gsap', get_template_directory_uri() . '/assets/gsap/gsap.min.js', array(), $theme->get('Version'));
|
||||
wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle_11.min.js', array(), $theme->get('Version'));
|
||||
wp_enqueue_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
||||
wp_enqueue_style('tailpress', tailpress_asset('css/app.css'), array(), $theme->get('Version'));
|
||||
wp_enqueue_style('homegrade-main-css', get_template_directory_uri() . '/css/app.css', array(), $theme->get('Version'));
|
||||
|
||||
// #PASSING TRANSLATIONS
|
||||
wp_register_script('main-app-js', get_template_directory_uri() . '/js/app.js', array('gsap', 'jquery'), $theme->get('Version'));
|
||||
|
|
@ -89,6 +90,15 @@ add_action('wp_enqueue_scripts', 'homegrade_enqueue_scripts');
|
|||
Enqueue Theme assets 🡒 Back
|
||||
-----------------------------------------------------------*/
|
||||
add_action('enqueue_block_editor_assets', 'homegrade_enqueue_scripts');
|
||||
|
||||
function homegrade_enqueue_back_scripts()
|
||||
{
|
||||
wp_enqueue_script('metiers-theme-editor-js', get_stylesheet_directory_uri() . '/js/editor.js', array(), $theme->get('Version'));
|
||||
}
|
||||
|
||||
add_action('enqueue_block_editor_assets', 'homegrade_enqueue_scripts');
|
||||
|
||||
|
||||
// ALSO SEE add_editor_style('css/editor-style.css') line 41
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,38 +16,85 @@ function wrap_parent_menu_item_buttons($output, $item, $depth, $args)
|
|||
$output = '<h6 class="page-group-title">' . $item->title . '</h6>';
|
||||
}
|
||||
|
||||
|
||||
// #### MENU RENOVATEUR
|
||||
// if ($args->theme_location === "renovateur") {
|
||||
// $page_icon = get_field('page_icon', $item->object_id);
|
||||
|
||||
// if (in_array('menu-item-has-children', $item->classes, true)) {
|
||||
// $output = '<button type="button" class="footer__submenu-toggle" aria-expanded="false" aria-controls="sub-menu-' . $item->ID . '">' . $item->title . '</button>';
|
||||
// }
|
||||
|
||||
// // #### ICONE DE PAGE FOR TOP LEVEL MENU ITEMS
|
||||
// if (isset($page_icon['url'])) {
|
||||
// $icon = '<img class="page_icon" src="' . $page_icon['url'] . '" alt=""/>';
|
||||
// $link = $output;
|
||||
// $output = $icon . $link;
|
||||
// }
|
||||
|
||||
|
||||
// // #### TAXONOMY : GET ICON & INFOS ABOUT TAX
|
||||
|
||||
// if ($item->type === "taxonomy") {
|
||||
// $term = get_term_by('id', $item->object_id, 'thematiques');
|
||||
// $cover = get_field('taxonomy_pictures', "thematiques_" . $item->object_id);
|
||||
|
||||
// $output = '<a class="lol" href="' . $item->url . '">';
|
||||
// $output .= '<img class="thematique-icon" src="' . $cover['icon']['url'] . '"/>';
|
||||
// $output .= '<h6>' . $item->title . "</h6>";
|
||||
// $output .= '<p>' . $term->description . "</p>";
|
||||
// $output .= "</a>";
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
return $output;
|
||||
}
|
||||
add_filter('walker_nav_menu_start_el', 'wrap_parent_menu_item_buttons', 10, 4);
|
||||
|
||||
|
||||
|
||||
|
||||
/* -----------------------------------------------------------
|
||||
Hide Page presse from homegrade top-menu but not footer
|
||||
-----------------------------------------------------------*/
|
||||
|
||||
|
||||
function metiers_patrimoine_filter_menu_items($items, $args)
|
||||
{
|
||||
|
||||
// ID de l'élément de menu à masquer
|
||||
$isMenuHomegradeInFooter = $args->menu_class === 'menu-homegrade--footer';
|
||||
|
||||
foreach ($items as $key => $item) {
|
||||
$isPagePresse = $item->object_id == "2784" || $item->object_id == "4973";
|
||||
|
||||
if ($isPagePresse && !$isMenuHomegradeInFooter) {
|
||||
unset($items[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
add_filter('wp_nav_menu_objects', 'metiers_patrimoine_filter_menu_items', 10, 2);
|
||||
|
||||
|
||||
|
||||
/* -----------------------------------------------------------
|
||||
PASS CUSTOM WPML NAV SWITCHER TO MENU
|
||||
-----------------------------------------------------------*/
|
||||
|
||||
add_filter('wp_nav_menu_items', 'add_custom_item_to_menu', 10, 2);
|
||||
function add_custom_item_to_menu($items, $args)
|
||||
{
|
||||
|
||||
$isMenuHomegradeInFooter = $args->menu_class === 'menu-homegrade--footer';
|
||||
|
||||
// restore_current_blog();
|
||||
|
||||
|
||||
|
||||
if ($args->theme_location === 'homegrade' && !$isMenuHomegradeInFooter) {
|
||||
/* BOUTON METIERS DU PATRIMOINE */
|
||||
|
||||
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');
|
||||
|
||||
switch_to_blog(1);
|
||||
$wpmlnav = ob_get_clean();
|
||||
|
||||
$items .= '<li class="menu-item menu-item-type-post_type menu-item-object-page menu-navlink">';
|
||||
$items .= $wpmlnav;
|
||||
$items .= '</li>';
|
||||
}
|
||||
|
||||
|
||||
// switch_to_blog(1);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
|
||||
|
||||
// Change Defaults Posts to "News" in menu bar
|
||||
function cp_change_post_object()
|
||||
{
|
||||
|
|
@ -44,6 +42,10 @@ add_action('admin_menu', 'change_menu_icon');
|
|||
// #### POST TYPES
|
||||
function create_posttype()
|
||||
{
|
||||
|
||||
if (get_current_blog_id() != 1) {
|
||||
return;
|
||||
}
|
||||
// **** CONSEILS
|
||||
register_post_type(
|
||||
'conseils',
|
||||
|
|
|
|||
|
|
@ -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' => "#" . strip_tags($block['attrs']['idName']),
|
||||
'title' => strip_tags($block['attrs']['title']),
|
||||
'anchor' => "#" . esc_html($block['attrs']['idName']),
|
||||
'title' => esc_html($block['attrs']['title']),
|
||||
]);
|
||||
}
|
||||
if ($block['blockName'] == 'homegrade-content-blocks/chapitrage-thematique') {
|
||||
|
|
|
|||
15
package.json
15
package.json
|
|
@ -1,15 +1,10 @@
|
|||
{
|
||||
"name": "tailpress",
|
||||
"name": "Homegrade_Theme",
|
||||
"version": "3.0.0",
|
||||
"description": "Boilerplate WordPress theme with Tailwind CSS.",
|
||||
"author": "Jeffrey van Rossum",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jeffreyvr/tailpress"
|
||||
},
|
||||
"theme_uri": "https://github.com/jeffreyvr/tailpress",
|
||||
"author_uri": "https://vanrossum.dev",
|
||||
"text_domain": "tailpress",
|
||||
"description": "Homegrade Theme",
|
||||
"author": "Deligraph — Antoine Martinon",
|
||||
"author_uri": "https://deligraph.be/",
|
||||
"text_domain": "homegrade-theme",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"production:css-app": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --minify",
|
||||
|
|
|
|||
|
|
@ -224,22 +224,3 @@
|
|||
@apply bg-patrimoine-sante-securite;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,10 @@
|
|||
@import './components/thematiques-faq-filters.css';
|
||||
@import './components/checkboxes.css';
|
||||
@import './components/search-results.css';
|
||||
@import './components/side-card.css';
|
||||
@import './components/accordeons.css';
|
||||
@import './components/page-scroller.css';
|
||||
@import './components/informative-message.css';
|
||||
@import './components/previous-next-posts.css';
|
||||
@import './components/forms/field-order-publications.css';
|
||||
@import './components/forms/field-homegrade-rating.css';
|
||||
|
|
@ -121,6 +123,7 @@
|
|||
@import './blocks/page-card.css';
|
||||
@import './blocks/lightbox-gallery.css';
|
||||
@import './blocks/explainer-screen.css';
|
||||
@import './blocks/cta-slim.css';
|
||||
|
||||
/* Home */
|
||||
@import './blocks/home-header.css';
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ main
|
|||
a[target='_blank']:not([href*='homegrade\.local']):not([href*='homegrade\.brussels']):not(
|
||||
:has(img)
|
||||
) {
|
||||
&:not(.cta--primary, .cta--secondary, .cta--button, .wp-block-button__link) {
|
||||
&:not(.cta--primary, .cta--secondary, .cta--button, .share-link, .wp-block-button__link) {
|
||||
@apply inline items-center;
|
||||
@apply px-2 py-1 first-letter:text-primary underline font-bold relative rounded-md;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,3 +44,9 @@
|
|||
margin-bottom: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.block-content-page-header {
|
||||
.homegrade-blocks-cta-slim + .homegrade-blocks-shortcuts {
|
||||
@apply mt-12;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
resources/css/blocks/cta-slim.css
Normal file
14
resources/css/blocks/cta-slim.css
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.homegrade-blocks-cta-slim {
|
||||
@apply flex items-center font-bold pt-2 w-fit rounded-md;
|
||||
&:after {
|
||||
@apply ml-2;
|
||||
transition: transform 0.2s ease-in-out;
|
||||
/* @apply content-[''] w-4 h-4 bg-green-400 inline-block; */
|
||||
content: url('../resources/img/graphic-assets/chevron-next.svg');
|
||||
}
|
||||
&:hover:after {
|
||||
@apply translate-x-1;
|
||||
transition: transform 0.2s ease-in-out;
|
||||
/* @apply translate-x-2; */
|
||||
}
|
||||
}
|
||||
|
|
@ -81,3 +81,87 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
@apply bg-primary text-white
|
||||
hover:bg-primary-hover;
|
||||
}
|
||||
&--patrimoine {
|
||||
@apply !bg-patrimoine-sante-securite !text-white;
|
||||
}
|
||||
&--white {
|
||||
@apply bg-white text-secondary
|
||||
hover:bg-primary-hover;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
form:not(.metabox-location-side):not(.metabox-location-normal):not(
|
||||
.metabox-location-advanced,
|
||||
.search-module__search-form
|
||||
.search-module__search-form,
|
||||
.metier-patrimoine-searchform
|
||||
) {
|
||||
--secondary: #df1e1e;
|
||||
--secondary-darker: #bd1515;
|
||||
|
|
|
|||
|
|
@ -38,15 +38,32 @@
|
|||
}
|
||||
|
||||
.extra_details {
|
||||
@apply flex flex-wrap items-center justify-between;
|
||||
@apply flex flex-wrap items-center justify-between gap-4;
|
||||
|
||||
.sitemap-btn,
|
||||
.metiers-patrimoine-btn {
|
||||
@apply !py-3 !px-5;
|
||||
}
|
||||
|
||||
.metiers-patrimoine-btn {
|
||||
@apply flex items-center justify-center;
|
||||
|
||||
&::before {
|
||||
@apply w-6 h-6 mr-2 block bg-contain bg-center bg-no-repeat content-[''];
|
||||
background-image: url('../resources/img/pictogrammes/Homegrade_artisans-patrimoine.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.social-networks {
|
||||
@apply flex gap-4;
|
||||
@apply flex gap-4 ml-auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
&__partenaires {
|
||||
@apply flex flex-wrap col-span-4 md:col-span-2 justify-center items-center gap-12;
|
||||
@apply flex flex-wrap col-span-4 justify-center items-center gap-x-12;
|
||||
.content-intertitle {
|
||||
@apply w-full text-center;
|
||||
}
|
||||
a img {
|
||||
@apply inline-block;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,11 +182,64 @@
|
|||
@apply hidden;
|
||||
}
|
||||
}
|
||||
.wpml-ls-item-nl {
|
||||
@apply xl:ml-8;
|
||||
/* .wpml-ls-legacy-list-horizontal {
|
||||
@apply p-0;
|
||||
} */
|
||||
.wpml-ls {
|
||||
@apply !p-0;
|
||||
}
|
||||
/* .wpml-ls-item-nl {
|
||||
@apply xl:ml-8;
|
||||
} */
|
||||
|
||||
.wpml-ls-legacy-dropdown-click {
|
||||
@apply !w-fit mt-4 lg:mt-0;
|
||||
/* margin-left: -10px !important; */
|
||||
|
||||
ul {
|
||||
@apply border-none lg:!px-2;
|
||||
}
|
||||
ul.wpml-ls-sub-menu {
|
||||
@apply !pb-2 bg-primary static lg:absolute;
|
||||
|
||||
@media screen and (max-width: 960px) {
|
||||
@apply !visible;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
@apply !bg-transparent !text-white border-none;
|
||||
}
|
||||
a:hover {
|
||||
@apply rounded-lg font-bold;
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
a.wpml-ls-item-toggle {
|
||||
@apply lg:!px-5;
|
||||
}
|
||||
a.wpml-ls-item-toggle:after {
|
||||
@apply !content-none lg:!content-[''];
|
||||
right: 0px;
|
||||
display: inline-block;
|
||||
transition: all 0.3s ease-out;
|
||||
border: unset;
|
||||
border-bottom: 2px solid white;
|
||||
border-right: 2px solid white;
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
/* margin-left: 10px;
|
||||
margin-left: 20px; */
|
||||
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
|
||||
.wpml-ls-item {
|
||||
@apply px-1 inline-block mb-3 lg:mb-0;
|
||||
@apply bg-transparent text-white;
|
||||
}
|
||||
/* OLD LANGUAGE SELECTOR LOOK */
|
||||
/* .wpml-ls-item {
|
||||
@apply !px-1 inline-block mb-3 lg:mb-0;
|
||||
|
||||
a {
|
||||
@apply !rounded-full h-10 w-10 border-2 border-white p-0 !flex justify-center items-center font-semibold text-sm;
|
||||
|
|
@ -197,15 +250,15 @@
|
|||
a:hover {
|
||||
@apply !bg-white text-primary font-bold;
|
||||
}
|
||||
}
|
||||
.wpml-ls-current-language {
|
||||
} */
|
||||
/* .wpml-ls-current-language {
|
||||
a {
|
||||
@apply bg-white text-primary font-bold;
|
||||
}
|
||||
a:focus-visible {
|
||||
@apply !bg-white text-primary font-bold;
|
||||
}
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
.menu-homegrade--footer {
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ export default function menuInit() {
|
|||
HANDLE SEARCH
|
||||
-----------------------------------------------------------*/
|
||||
function isSearchOpen() {
|
||||
if (!searchModule) return null;
|
||||
// IF CLOSED
|
||||
if (
|
||||
searchModule.getAttribute('mobile-closed') != null &&
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
<input class="search-module__search-form__input" type="text" name="s" id="search" value="<?php the_search_query(); ?>" placeholder="<?php echo __('Rechercher dans le site. Taper vos mots-clés ici', 'homegrade-theme__texte-fonctionnel') ?>" />
|
||||
|
||||
|
||||
<button type="submit">
|
||||
<span><?php echo __('Rechercher', 'homegrade-theme__texte-fonctionnel') ?></span>
|
||||
<img class="search_icon" src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/search-icon.svg' alt=''>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ get_header();
|
|||
$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');
|
||||
|
||||
|
|
@ -82,27 +81,30 @@ get_header();
|
|||
'ctaUrl' => $relatedDocumentUrl,
|
||||
'ctaTitle' => $relatedDocumentCtaTitle,
|
||||
'hasInfoCapsule' => true,
|
||||
)); ?>
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php /* -------
|
||||
CONSEIL
|
||||
---------------*/ ?>
|
||||
<div class=" conseils_wrapper">
|
||||
<!-- CHAPTER INDEX -->
|
||||
<aside class="chapter_index">
|
||||
<?php if ($chapterBlockIndex) : ?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
<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 -->
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ module.exports = {
|
|||
md: '782px',
|
||||
lg: tailpress.theme('settings.layout.contentSize', theme),
|
||||
xl: tailpress.theme('settings.layout.wideSize', theme),
|
||||
'2xl': '1440px',
|
||||
'2xl': '1441px',
|
||||
},
|
||||
},
|
||||
plugins: [tailpress.tailwind],
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $thematiqueColorSlug = $mainThematique->slug;
|
|||
<?php
|
||||
$currentPage = get_post();
|
||||
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
|
||||
$grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
||||
$grandParentPage = $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
||||
|
||||
?>
|
||||
<ol>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
<?php
|
||||
|
||||
// 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');
|
||||
|
|
@ -153,7 +158,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
</div>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo get_permalink($taxonomyRelatedPost->ID) ?>">
|
||||
<a href="<?php echo "#" ?>">
|
||||
<?php if ($cover) : ?>
|
||||
<img class="sub-menu__navlist__thematique-icon" src="<?php echo $cover['icon']['url'] ?>" alt="">
|
||||
<?php endif; ?>
|
||||
|
|
@ -217,3 +222,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// restore_current_blog();
|
||||
?>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
// switch_to_blog(1);
|
||||
$logoID = get_theme_mod('custom_logo');
|
||||
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||
?>
|
||||
|
|
@ -37,3 +38,8 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
// get_template_part('template-components/header/search-module');
|
||||
?>
|
||||
</nav>
|
||||
|
||||
|
||||
<?php
|
||||
// restore_current_blog();
|
||||
?>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
|
||||
switch_to_blog(1);
|
||||
?>
|
||||
<div id="search-module" class="search-module" mobile-closed aria-hidden role="search">
|
||||
<div class="search-module__wrapper-container">
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
$suggestions_posts = new WP_Query($args);
|
||||
?>
|
||||
<ul class="search-module__suggestions__navlist">
|
||||
|
||||
<?php foreach ($suggestions_posts->posts as $post) : ?>
|
||||
<li class="suggestion-item">
|
||||
<a href="<?php echo get_the_permalink($post->ID) ?>"><?php echo $post->post_title ?></a>
|
||||
|
|
@ -27,3 +26,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
restore_current_blog();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,12 @@ $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",
|
||||
),
|
||||
));
|
||||
?>
|
||||
|
||||
|
|
@ -233,42 +239,15 @@ $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