refining accessibility — starting on conseils
This commit is contained in:
parent
c048ef2c22
commit
1b6e90856b
13
404.php
13
404.php
|
|
@ -1,24 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?> class="no-js">
|
||||
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta charset="<?php bloginfo('charset'); ?>">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body class="antialiased">
|
||||
<div class="md:flex min-h-screen">
|
||||
<div class="w-full md:w-1/2 flex items-center justify-center">
|
||||
<div class="max-w-sm m-8">
|
||||
<div class="text-5xl md:text-15xl text-gray-800 border-primary border-b">404</div>
|
||||
<div class="w-16 h-1 bg-purple-light my-3 md:my-6"></div>
|
||||
<p class="text-gray-800 text-2xl md:text-3xl font-light mb-8"><?php _e( 'Sorry, the page you are looking for could not be found.', 'tailpress' ); ?></p>
|
||||
<a href="<?php echo get_bloginfo( 'url' ); ?>" class="bg-primary px-4 py-2 rounded text-white">
|
||||
<?php _e( 'Go Home', 'tailpress' ); ?>
|
||||
<p class="text-gray-800 text-2xl md:text-3xl font-light mb-8"><?php _e('Désolé, la page que vous chercheez n\'a pas pu être trouvée', 'homegrade-theme__texte-fonctionnel'); ?></p>
|
||||
<a href="<?php echo get_bloginfo('url'); ?>" class="bg-primary px-4 py-2 rounded text-white">
|
||||
<?php _e('Retour à l\'acceuil', 'homegrade-theme__texte-fonctionnel'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
74
comments.php
74
comments.php
|
|
@ -1,74 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* If the current post is protected by a password and
|
||||
* the visitor has not yet entered the password we will
|
||||
* return early without loading the comments.
|
||||
*/
|
||||
if ( post_password_required() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area my-8">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h2 class="comments-title">
|
||||
<?php
|
||||
printf(
|
||||
_nx( 'One comment', '%1$s comments', get_comments_number(), 'comments title', 'tailpress' ),
|
||||
number_format_i18n( get_comments_number() ),
|
||||
get_the_title()
|
||||
);
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments(
|
||||
array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 56,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</ol>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
|
||||
|
||||
<nav class="comment-navigation" id="comment-nav-above">
|
||||
|
||||
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'tailpress' ); ?></h1>
|
||||
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous">
|
||||
<?php previous_comments_link( __( '← Older Comments', 'tailpress' ) ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next">
|
||||
<?php next_comments_link( __( 'Newer Comments →', 'tailpress' ) ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</nav><!-- #comment-nav-above -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
|
||||
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'tailpress' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
comment_form(
|
||||
array(
|
||||
'class_submit' => 'bg-primary text-white cursor-pointer rounded font-bold py-2 px-4',
|
||||
'comment_field' => '<textarea id="comment" name="comment" class="bg-gray-200 w-full py-2 px-3" aria-required="true"></textarea>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
224
css/app.css
224
css/app.css
|
|
@ -597,6 +597,18 @@ video {
|
|||
}
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.m-8 {
|
||||
margin: 2rem;
|
||||
}
|
||||
|
|
@ -606,16 +618,16 @@ video {
|
|||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.my-8 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.my-8 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
|
@ -668,10 +680,6 @@ video {
|
|||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
@ -780,11 +788,6 @@ video {
|
|||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.px-3 {
|
||||
padding-left: 0.75rem;
|
||||
padding-right: 0.75rem;
|
||||
}
|
||||
|
||||
.py-12 {
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 3rem;
|
||||
|
|
@ -818,10 +821,6 @@ video {
|
|||
font-weight: 300;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.font-extrabold {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
|
@ -1359,55 +1358,6 @@ button:focus {
|
|||
hue-rotate(263deg) brightness(99%) contrast(96%);
|
||||
}
|
||||
|
||||
.card-post {
|
||||
position: relative;
|
||||
border-radius: 1.5rem;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
||||
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
||||
}
|
||||
|
||||
.card-post__thumbnail {
|
||||
height: 190px;
|
||||
border-top-left-radius: 1.5rem;
|
||||
border-top-right-radius: 1.5rem;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.card-post__inner {
|
||||
height: 100%;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card-post__tag {
|
||||
margin-bottom: 1rem;
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
border-radius: 0.75rem;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 237 236 / var(--tw-bg-opacity));
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
padding-top: 0.25rem;
|
||||
padding-bottom: 0.25rem;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(223 30 30 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.card-post__title {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: 2rem;
|
||||
font-weight: 700;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(223 30 30 / var(--tw-text-opacity));
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.card-large-content-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -1654,6 +1604,60 @@ button:focus {
|
|||
text-underline-offset: 4px;
|
||||
}
|
||||
|
||||
.card-news {
|
||||
position: relative;
|
||||
border-radius: 1.5rem;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
||||
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
||||
}
|
||||
|
||||
.card-news__thumbnail {
|
||||
height: 190px;
|
||||
border-top-left-radius: 1.5rem;
|
||||
border-top-right-radius: 1.5rem;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.card-news__inner {
|
||||
height: 100%;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card-news__heading {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.card-news__tag {
|
||||
margin-bottom: 1rem;
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
border-radius: 0.75rem;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 237 236 / var(--tw-bg-opacity));
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
padding-top: 0.25rem;
|
||||
padding-bottom: 0.25rem;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(223 30 30 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.card-news__title {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: 2rem;
|
||||
font-weight: 700;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(223 30 30 / var(--tw-text-opacity));
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.card-frequent-question {
|
||||
position: relative;
|
||||
border-radius: 1.5rem;
|
||||
|
|
@ -2070,6 +2074,13 @@ article > *:not(.entry-content),
|
|||
}
|
||||
}
|
||||
|
||||
.menu-renovateur .website_logo a:focus img {
|
||||
outline: red solid 1px;
|
||||
outline-width: 1px;
|
||||
outline-offset: 8px;
|
||||
outline-radius: 50px;
|
||||
}
|
||||
|
||||
/* &__main-elements {
|
||||
@apply w-full bg-red-200 flex justify-between items-center;
|
||||
} */
|
||||
|
|
@ -2286,20 +2297,20 @@ article > *:not(.entry-content),
|
|||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon {
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon__bar--top {
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon__bar--top {
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon__bar--middle {
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon__bar--middle {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon__bar--bottom {
|
||||
.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon__bar--bottom {
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(-45deg);
|
||||
}
|
||||
|
|
@ -2474,8 +2485,11 @@ article > *:not(.entry-content),
|
|||
|
||||
.menu-homegrade .sub-menu {
|
||||
position: static;
|
||||
bottom: 0px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
--tw-translate-y: 100%;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(47 1 84 / var(--tw-bg-opacity));
|
||||
padding: 1.5rem;
|
||||
|
|
@ -2569,21 +2583,25 @@ article > *:not(.entry-content),
|
|||
}
|
||||
|
||||
.menu-homegrade__navlist li.menu-item:hover,
|
||||
.menu-homegrade__navlist li.menu-item button:focus,
|
||||
.menu-homegrade__navlist li.menu-item a:focus {
|
||||
cursor: pointer;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.menu-homegrade__navlist li.menu-item a:focus {
|
||||
.menu-homegrade__navlist li.menu-item button:focus,
|
||||
.menu-homegrade__navlist li.menu-item a:focus {
|
||||
border-radius: 0.375rem;
|
||||
text-decoration: none;
|
||||
outline: 1px solid rgba(255, 255, 255, 0.8);
|
||||
outline-offset: 8px;
|
||||
}
|
||||
|
||||
/* IF SUBMENU CHILD */
|
||||
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:hover,
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:hover,
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:focus {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(223 30 30 / var(--tw-text-opacity));
|
||||
/* @apply text-secondary; */
|
||||
}
|
||||
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle {
|
||||
|
|
@ -2592,27 +2610,23 @@ article > *:not(.entry-content),
|
|||
}
|
||||
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:after {
|
||||
right: 0px;
|
||||
content: '▼';
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
line-height: 0.5;
|
||||
height: 10px;
|
||||
top: calc(50% - 4px);
|
||||
width: 10px;
|
||||
margin-left: 20px;
|
||||
transform-origin: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
transition: all 0.3s ease-out;
|
||||
border-bottom: 2px solid white;
|
||||
border-right: 2px solid white;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle[aria-expanded='false']:after {
|
||||
transform: rotate(0deg);
|
||||
transform: translateY(-20%) rotate(45deg);
|
||||
}
|
||||
|
||||
.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle[aria-expanded='true']:after {
|
||||
transform: rotate(180deg);
|
||||
/* transform: rotate(225deg); */
|
||||
transform: translateY(40%) rotate(225deg);
|
||||
}
|
||||
|
||||
.menu-homegrade__burger-menu-toggle {
|
||||
|
|
@ -3048,10 +3062,18 @@ article > *:not(.entry-content),
|
|||
|
||||
.swiper-wrapper {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
row-gap: 5rem;
|
||||
padding-top: 6rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.swiper-wrapper {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-slide .card-thematique {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -3061,7 +3083,19 @@ article > *:not(.entry-content),
|
|||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 50;
|
||||
display: none;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.thematique-button-next,
|
||||
.thematique-button-prev {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.thematique-button-next,
|
||||
.thematique-button-prev {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
|
@ -3071,8 +3105,8 @@ article > *:not(.entry-content),
|
|||
.thematique-button-prev:hover,
|
||||
.thematique-button-prev:focus {
|
||||
opacity: 1;
|
||||
filter: invert(13%) sepia(71%) saturate(4425%)
|
||||
hue-rotate(338deg) brightness(109%) contrast(117%);
|
||||
filter: invert(13%) sepia(71%) saturate(4425%) hue-rotate(338deg) brightness(109%)
|
||||
contrast(117%);
|
||||
}
|
||||
|
||||
.thematique-button-next:focus, .thematique-button-prev:focus {
|
||||
|
|
@ -3088,6 +3122,16 @@ article > *:not(.entry-content),
|
|||
left: 0px;
|
||||
}
|
||||
|
||||
.swiper-pagination {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.swiper-pagination {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-pagination-bullet {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0
|
||||
}
|
||||
|
||||
.m-8 {
|
||||
margin: 2rem
|
||||
}
|
||||
|
|
@ -53,16 +65,16 @@
|
|||
margin-bottom: 0.75rem
|
||||
}
|
||||
|
||||
.my-8 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem
|
||||
}
|
||||
|
||||
.mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto
|
||||
}
|
||||
|
||||
.my-8 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 2rem
|
||||
}
|
||||
|
|
@ -115,10 +127,6 @@
|
|||
flex-grow: 1
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column
|
||||
}
|
||||
|
|
@ -227,11 +235,6 @@
|
|||
padding-bottom: 0.5rem
|
||||
}
|
||||
|
||||
.px-3 {
|
||||
padding-left: 0.75rem;
|
||||
padding-right: 0.75rem
|
||||
}
|
||||
|
||||
.py-12 {
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 3rem
|
||||
|
|
@ -265,10 +268,6 @@
|
|||
font-weight: 300
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.font-extrabold {
|
||||
font-weight: 800
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@
|
|||
?>
|
||||
<a class="cta cta--button cta--outline" href="">Plan du site</a>
|
||||
<div class="social-networks">
|
||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Facebook', "homegrade-theme-terminologie") ?>" href="<?php echo $social_networks['facebook_profile_url'] ?>">
|
||||
<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-terminologie") ?>" href="<?php echo $social_networks['youtube_profile_url'] ?>">
|
||||
<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>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ require_once(__DIR__ . '/includes/logos.php');
|
|||
require_once(__DIR__ . '/includes/taxonomy.php');
|
||||
require_once(__DIR__ . '/includes/utilities.php');
|
||||
require_once(__DIR__ . '/includes/navwalker.php');
|
||||
require_once(__DIR__ . '/includes/templates.php');
|
||||
|
||||
// require_once(__DIR__ . '/includes/widget.php');
|
||||
// require_once( __DIR__ . '/includes/logos.php');
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<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') ?>">
|
||||
<a href="#content" class="skiplinks__link"><?php echo __('Aller au contenu', 'homegrade-theme__texte-fonctionnel') ?></a>
|
||||
<a href="#content" class="skiplinks__link"><?php echo __('Contenu', 'homegrade-theme__texte-fonctionnel') ?></a>
|
||||
</div>
|
||||
<ul class="skiplinks">
|
||||
<li></li>
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ function register_theme_settings_option_page()
|
|||
|
||||
// Register options page.
|
||||
$option_page = acf_add_options_page(array(
|
||||
'page_title' => __('Paramètres du site'),
|
||||
'menu_title' => __('Paramètres du site'),
|
||||
'page_title' => __('Paramètres du site', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_title' => __('Paramètres du site', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_slug' => 'theme-general-settings',
|
||||
'capability' => 'activate_plugins',
|
||||
'redirect' => false,
|
||||
|
|
@ -105,3 +105,33 @@ function change_login_logo_url($url)
|
|||
return site_url();
|
||||
}
|
||||
add_filter('login_headerurl', 'change_login_logo_url');
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
GESTION DE LA COLONNE THEMATIQUE DANS LA LISTE DES POSTS CONSEILS
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
// AJOUT D'UNE COLONNE CUSTOM
|
||||
function add_acf_posts_columns($columns)
|
||||
{
|
||||
global $current_screen;
|
||||
$new_admin_col_arrays = array_slice($columns, 0, 2, true) + array('thematiques_taxo' => 'Thématique') + array_slice($columns, 2, count($columns) - 2, true);
|
||||
return array_merge($new_admin_col_arrays);
|
||||
}
|
||||
add_filter('manage_conseils_posts_columns', 'add_acf_posts_columns');
|
||||
|
||||
// CUSTOMISATION DE LA COLONNE POUR AFFICHER : THEMATIQUE PARENT > THEMATIQUE
|
||||
function handle_posts_custom_columns($column, $post_id)
|
||||
{
|
||||
$tax = get_the_terms($post_id, ('thematiques'));
|
||||
$edit_link = esc_url(get_edit_term_link($tax[0]->term_id, 'thematiques', 'conseils'));
|
||||
|
||||
echo '<a href="' . $edit_link . '">';
|
||||
if (isset($tax[0]->parent) && $tax[0]->parent != 0) {
|
||||
$tax_parent = get_term($tax[0]->parent, 'thematiques');
|
||||
echo $tax_parent->name . " — ";
|
||||
}
|
||||
echo $tax[0]->name;
|
||||
echo '</a>';
|
||||
}
|
||||
add_action('manage_conseils_posts_custom_column', 'handle_posts_custom_columns', 10, 2);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
/**
|
||||
* Theme setup.
|
||||
*/
|
||||
|
||||
function tailpress_setup()
|
||||
{
|
||||
|
||||
|
|
@ -10,9 +11,9 @@ function tailpress_setup()
|
|||
|
||||
register_nav_menus(
|
||||
array(
|
||||
'homegrade' => __('Menu Homegrade', 'homegrade-deligraph-theme'),
|
||||
'renovateur' => __('Menu Rénovateur', 'homegrade-deligraph-theme'),
|
||||
'footer' => __('Footer', 'homegrade-deligraph-theme'),
|
||||
'homegrade' => __('Menu Homegrade', 'homegrade-theme__texte-backoffice'),
|
||||
'renovateur' => __('Menu Rénovateur', 'homegrade-theme__texte-backoffice'),
|
||||
'footer' => __('Footer', 'homegrade-theme__texte-backoffice'),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -58,13 +59,27 @@ function tailpress_enqueue_scripts()
|
|||
wp_enqueue_style('tailpress', tailpress_asset('css/app.css'), array(), $theme->get('Version'));
|
||||
wp_enqueue_script('tailpress', tailpress_asset('js/app.js'), array('gsap'), $theme->get('Version'));
|
||||
// wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('swiperjs', 'swipercss'), $theme->get('Version'));
|
||||
wp_enqueue_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('swiperjs'), $theme->get('Version'));
|
||||
|
||||
|
||||
// SHOW THEMATIQUE
|
||||
wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('swiperjs'), $theme->get('Version'));
|
||||
|
||||
$translation_array = array(
|
||||
'previousSlide' => __('Carte précédente', 'homegrade-theme__texte-fonctionnel'),
|
||||
'nextSlide' => __('Carte suivante', 'homegrade-theme__texte-fonctionnel'),
|
||||
'slideLabel' => __('Carte Thématique', 'homegrade-theme__texte-fonctionnel'),
|
||||
);
|
||||
wp_localize_script('showthematiquejs', 'textTranslations', $translation_array);
|
||||
|
||||
wp_enqueue_script('showthematiquejs');
|
||||
|
||||
// wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.js', array('tailpress'), $theme->get('Version'), true);
|
||||
// wp_register_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'tailpress_enqueue_scripts');
|
||||
|
||||
|
||||
|
||||
/* -----------------------------------------------------------
|
||||
Enqueue Theme assets 🡒 Back
|
||||
-----------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function change_menu_icon()
|
|||
|
||||
foreach ($menu as $key => $val) {
|
||||
|
||||
if (__('News', 'plugin-name') == $val[0]) {
|
||||
if (__('News', 'homegrade-theme__texte-backoffice') == $val[0]) {
|
||||
$menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
||||
}
|
||||
}
|
||||
|
|
@ -49,8 +49,8 @@ function create_posttype()
|
|||
'fiche-questions',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Questions'),
|
||||
'singular_name' => __('Question')
|
||||
'name' => __('Questions', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Question', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
|
|
@ -67,15 +67,17 @@ function create_posttype()
|
|||
'conseils',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Conseils'),
|
||||
'singular_name' => __('Conseil')
|
||||
'name' => __('Conseils', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Conseil', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'hierarchical' => true,
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-pressthis',
|
||||
'menu_position' => 4,
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
// 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'),
|
||||
// 'supports' => array('title', 'custom-fields', 'editor'),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -84,8 +86,8 @@ function create_posttype()
|
|||
'vocabulaire',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Vocabulaire'),
|
||||
'singular_name' => __('Vocabulaire')
|
||||
'name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ define('WP_DEBUG_DISPLAY', false);
|
|||
// ##### Syntax
|
||||
|
||||
<?php if ($var) : ?>
|
||||
<p><?php echo $var['title'] ?></p>
|
||||
<p><?php echo $var['title'] ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ($var) { ?>
|
||||
<p><?php echo $var['title'] ?></p>
|
||||
<p><?php echo $var['title'] ?></p>
|
||||
<?php }; ?>
|
||||
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ echo site_url('/admission/', 'https');
|
|||
|
||||
function cc_mime_types($mimes)
|
||||
{
|
||||
$mimes['svg'] = 'image/svg+xml';
|
||||
return $mimes;
|
||||
$mimes['svg'] = 'image/svg+xml';
|
||||
return $mimes;
|
||||
}
|
||||
add_filter('upload_mimes', 'cc_mime_types');
|
||||
|
||||
|
|
@ -132,20 +132,20 @@ INIT WIDGET
|
|||
------------------------------*/
|
||||
|
||||
|
||||
function tailwind_widgets_init()
|
||||
{
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => esc_html__('Discover_next', 'tailwind'),
|
||||
'id' => 'discover_next',
|
||||
'description' => esc_html__('Add widgets here.', 'tailwind'),
|
||||
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</section>',
|
||||
'before_title' => '<h2 class="widget-title">',
|
||||
'after_title' => '</h2>',
|
||||
)
|
||||
);
|
||||
}
|
||||
// function tailwind_widgets_init()
|
||||
// {
|
||||
// register_sidebar(
|
||||
// array(
|
||||
// 'name' => esc_html__('Discover_next', 'tailwind'),
|
||||
// 'id' => 'discover_next',
|
||||
// 'description' => esc_html__('Add widgets here.', 'tailwind'),
|
||||
// 'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
// 'after_widget' => '</section>',
|
||||
// 'before_title' => '<h2 class="widget-title">',
|
||||
// 'after_title' => '</h2>',
|
||||
// )
|
||||
// );
|
||||
// }
|
||||
|
||||
|
||||
/** ------------------------------
|
||||
|
|
@ -156,42 +156,42 @@ POSTS
|
|||
// Change Defaults Posts to "News" in menu bar
|
||||
function cp_change_post_object()
|
||||
{
|
||||
$get_post_type = get_post_type_object('post');
|
||||
$get_post_type = get_post_type_object('post');
|
||||
|
||||
$labels = $get_post_type->labels;
|
||||
$labels->name = 'News';
|
||||
$labels->singular_name = 'News';
|
||||
$labels->add_new = 'Add News';
|
||||
$labels->add_new_item = 'Add News';
|
||||
$labels->edit_item = 'Edit News';
|
||||
$labels->new_item = 'News';
|
||||
$labels->view_item = 'View News';
|
||||
$labels->search_items = 'Search News';
|
||||
$labels->not_found = 'No News found';
|
||||
$labels->not_found_in_trash = 'No News found in Trash';
|
||||
$labels->all_items = 'All News';
|
||||
$labels->menu_name = 'News';
|
||||
$labels->name_admin_bar = 'News';
|
||||
$labels = $get_post_type->labels;
|
||||
$labels->name = 'News';
|
||||
$labels->singular_name = 'News';
|
||||
$labels->add_new = 'Add News';
|
||||
$labels->add_new_item = 'Add News';
|
||||
$labels->edit_item = 'Edit News';
|
||||
$labels->new_item = 'News';
|
||||
$labels->view_item = 'View News';
|
||||
$labels->search_items = 'Search News';
|
||||
$labels->not_found = 'No News found';
|
||||
$labels->not_found_in_trash = 'No News found in Trash';
|
||||
$labels->all_items = 'All News';
|
||||
$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()
|
||||
{
|
||||
// function change_menu_icon()
|
||||
// {
|
||||
|
||||
// Access global variables.
|
||||
global $menu;
|
||||
// // Access global variables.
|
||||
// global $menu;
|
||||
|
||||
foreach ($menu as $key => $val) {
|
||||
// foreach ($menu as $key => $val) {
|
||||
|
||||
if (__('News', 'plugin-name') == $val[0]) {
|
||||
$menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('admin_menu', 'change_menu_icon');
|
||||
// if (__('News', 'plugin-name') == $val[0]) {
|
||||
// $menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// add_action('admin_menu', 'change_menu_icon');
|
||||
|
||||
|
||||
/** ------------------------------
|
||||
|
|
@ -199,11 +199,11 @@ HIDE EDITOR ON SPECIFIC PAGE
|
|||
------------------------------*/
|
||||
function remove_editor_init()
|
||||
{
|
||||
if (isset($_GET['post'])) {
|
||||
$id = $_GET['post'];
|
||||
if ($id == 7) {
|
||||
remove_post_type_support('page', 'editor');
|
||||
if (isset($_GET['post'])) {
|
||||
$id = $_GET['post'];
|
||||
if ($id == 7) {
|
||||
remove_post_type_support('page', 'editor');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('init', 'remove_editor_init');
|
||||
add_action('init', 'remove_editor_init');
|
||||
|
|
|
|||
|
|
@ -40,59 +40,53 @@ function undo_create_term($term_id, $tt_id, $taxonomy)
|
|||
function add_custom_taxonomies()
|
||||
{
|
||||
// ————— Thématiques —————
|
||||
register_taxonomy('thematiques', ['fiche-questions', 'fiche-conseils'], array(
|
||||
register_taxonomy('thematiques', ['fiche-questions', 'conseils'], array(
|
||||
// 'hierarchical' => true,
|
||||
'labels' => array(
|
||||
'name' => _x('Thématiquesssse', 'taxonomy general name'),
|
||||
'singular_name' => _x('Thématique', 'taxonomy singular name'),
|
||||
'search_items' => __('Chercher une Thématique'),
|
||||
'all_items' => __('Toutes les Thématiques'),
|
||||
'parent_item' => __('Thématique Parent'),
|
||||
'parent_item_colon' => __('Thématique Parent:'),
|
||||
'edit_item' => __('Editer la Thématique'),
|
||||
'update_item' => __('Mettre à jour la Thématique'),
|
||||
'add_new_item' => __('Ajouter une Thématique'),
|
||||
'new_item_name' => __('Nom de la nouvelle Thématique'),
|
||||
'menu_name' => __('Thématiques'),
|
||||
'name' => __('Thématiques', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Thématique', 'homegrade-theme__texte-backoffice'),
|
||||
'search_items' => __('Chercher une Thématique', 'homegrade-theme__texte-backoffice'),
|
||||
'all_items' => __('Toutes les Thématiques', 'homegrade-theme__texte-backoffice'),
|
||||
'parent_item' => __('Thématique Parent', 'homegrade-theme__texte-backoffice'),
|
||||
'parent_item_colon' => __('Thématique Parent:', 'homegrade-theme__texte-backoffice'),
|
||||
'edit_item' => __('Editer la Thématique', 'homegrade-theme__texte-backoffice'),
|
||||
'update_item' => __('Mettre à jour la Thématique', 'homegrade-theme__texte-backoffice'),
|
||||
'add_new_item' => __('Ajouter une Thématique', 'homegrade-theme__texte-backoffice'),
|
||||
'new_item_name' => __('Nom de la nouvelle Thématique', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_name' => __('Thématiques', 'homegrade-theme__texte-backoffice'),
|
||||
),
|
||||
'public' => true,
|
||||
// 'show_ui' => true,
|
||||
'show_admin_column' => true,
|
||||
'show_in_rest' => false, // Needed for tax to appear in Gutenberg editor
|
||||
'show_ui' => true,
|
||||
'show_admin_column' => false,
|
||||
'hierarchical' => true, // This will allow URL's like "/locations/boston/cambridge/"
|
||||
'rewrite' => array(
|
||||
'slug' => 'thematiques', // This controls the base slug that will display before each term
|
||||
'hierarchical' => true, // This will allow URL's like "/locations/boston/cambridge/"
|
||||
// 'with_front' => false, // Don't display the category base before "/locations/"
|
||||
),
|
||||
'show_in_quick_edit' => false,
|
||||
'meta_box_cb' => false,
|
||||
));
|
||||
|
||||
|
||||
// ————— —————
|
||||
register_taxonomy('mots-cles', ['fiche-questions', 'fiche-conseils'], array(
|
||||
register_taxonomy('mots-cles', ['fiche-questions', 'conseils'], array(
|
||||
|
||||
// This array of options controls the labels displayed in the WordPress Admin UI
|
||||
'labels' => array(
|
||||
'name' => _x('Mots-Clés', 'taxonomy general name'),
|
||||
'singular_name' => _x('Mots-Clés', 'taxonomy singular name'),
|
||||
'search_items' => __('Chercher un Mots-Clé'),
|
||||
'all_items' => __('Tous les Mots-Clés'),
|
||||
'parent_item' => __('Mots-Clé Parent'),
|
||||
'parent_item_colon' => __('Mots-Clé Parent:'),
|
||||
'edit_item' => __('Editer le Mots-Clé'),
|
||||
'update_item' => __('Mettre à jour le Mots-Clé'),
|
||||
'add_new_item' => __('Ajouter un Mots-Clé'),
|
||||
'new_item_name' => __('Nom du nouveau Mots-Clés'),
|
||||
'menu_name' => __('Mots-Clés'),
|
||||
'name' => __('Mots-Clés', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Mots-Clés', 'homegrade-theme__texte-backoffice'),
|
||||
'search_items' => __('Chercher un Mots-Clé', 'homegrade-theme__texte-backoffice'),
|
||||
'all_items' => __('Tous les Mots-Clés', 'homegrade-theme__texte-backoffice'),
|
||||
'parent_item' => __('Mots-Clé Parent', 'homegrade-theme__texte-backoffice'),
|
||||
'parent_item_colon' => __('Mots-Clé Parent:', 'homegrade-theme__texte-backoffice'),
|
||||
'edit_item' => __('Editer le Mots-Clé', 'homegrade-theme__texte-backoffice'),
|
||||
'update_item' => __('Mettre à jour le Mots-Clé', 'homegrade-theme__texte-backoffice'),
|
||||
'add_new_item' => __('Ajouter un Mots-Clé', 'homegrade-theme__texte-backoffice'),
|
||||
'new_item_name' => __('Nom du nouveau Mots-Clés', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_name' => __('Mots-Clés', 'homegrade-theme__texte-backoffice'),
|
||||
),
|
||||
|
||||
|
||||
'hierarchical' => false,
|
||||
'public' => false,
|
||||
'rewrite' => array(
|
||||
'slug' => 'thematiques', // This controls the base slug that will display before each term
|
||||
// 'with_front' => false, // Don't display the category base before "/locations/"
|
||||
// 'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
|
||||
),
|
||||
|
||||
));
|
||||
}
|
||||
add_action('init', 'add_custom_taxonomies', 0);
|
||||
|
|
|
|||
13
includes/templates.php
Normal file
13
includes/templates.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
function theme_register_template()
|
||||
{
|
||||
$post_type_object = get_post_type_object('post');
|
||||
// $post_type_object->template_lock = 'insert';
|
||||
$post_type_object->template = array(
|
||||
array('core/paragraph', array('content' => 'Some text')),
|
||||
array('core/paragraph', array('content' => 'Some text')),
|
||||
array('core/paragraph', array('content' => 'Some text')),
|
||||
array('core/paragraph', array('content' => 'et un autre')),
|
||||
);
|
||||
}
|
||||
add_action('init', 'theme_register_template');
|
||||
|
|
@ -28,6 +28,8 @@ function getThematiqueFamilySlug($thematique_slug)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Get automatic post used in BLOCK QUESTIONS FREQUENTES
|
||||
function get_automatic_post($post_type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => 'Experts',
|
||||
'id' => 'widget_nos_experts',
|
||||
'description' => 'Add widgets here.',
|
||||
// 'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
// 'after_widget' => '</section>',
|
||||
// 'before_title' => '<h2 class="widget-title">',
|
||||
// 'after_title' => '</h2>',
|
||||
),
|
||||
);
|
||||
// register_sidebar(
|
||||
// array(
|
||||
// 'name' => 'Experts',
|
||||
// 'id' => 'widget_nos_experts',
|
||||
// 'description' => 'Add widgets here.',
|
||||
// // 'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
// // 'after_widget' => '</section>',
|
||||
// // 'before_title' => '<h2 class="widget-title">',
|
||||
// // 'after_title' => '</h2>',
|
||||
// ),
|
||||
// );
|
||||
|
|
|
|||
114
js/app.js
114
js/app.js
|
|
@ -34,8 +34,6 @@
|
|||
}
|
||||
}
|
||||
function closeCurrentSubmenu(buttonClose) {
|
||||
console.log("close submenu");
|
||||
console.log(buttonClose.parentElement);
|
||||
const currentOpenedSubmenu = buttonClose.parentElement;
|
||||
currentOpenedSubmenu.classList.remove("sub-menu--open");
|
||||
currentOpenedSubmenu.classList.add("sub-menu--closed");
|
||||
|
|
@ -94,42 +92,104 @@
|
|||
});
|
||||
const renovateurNavListContainer = header.querySelector(".menu-renovateur__navlist-container");
|
||||
const HomegradeNavListContainer = header.querySelector(".menu-homegrade");
|
||||
function isMobileNavOpened() {
|
||||
console.log("is mobile nav opened");
|
||||
console.log(renovateurNavListContainer.hasAttribute("opened") && mobileMenuToggle.getAttribute("aria-expanded") === "true");
|
||||
return renovateurNavListContainer.hasAttribute("opened") && mobileMenuToggle.getAttribute("aria-expanded") === "true";
|
||||
}
|
||||
function openMenu(menuContainer) {
|
||||
menuContainer.removeAttribute("closed", "");
|
||||
menuContainer.setAttribute("opened", "");
|
||||
menuContainer.removeAttribute("aria-hidden", "");
|
||||
menuContainer.setAttribute("opening", "");
|
||||
menuContainer.addEventListener("animationend", () => {
|
||||
menuContainer.removeAttribute("opening", "");
|
||||
}, { once: true });
|
||||
console.log("open menu");
|
||||
mobileMenuToggle.setAttribute("aria-expanded", "true");
|
||||
const textContent = mobileMenuToggle.querySelector("span.text-content");
|
||||
textContent.textContent = mobileMenuToggle.getAttribute("data-text-open");
|
||||
function openRenovateur() {
|
||||
renovateurNavListContainer.removeAttribute("closed", "");
|
||||
renovateurNavListContainer.setAttribute("opened", "");
|
||||
renovateurNavListContainer.removeAttribute("aria-hidden", "");
|
||||
renovateurNavListContainer.setAttribute("opening", "");
|
||||
renovateurNavListContainer.addEventListener("animationend", () => {
|
||||
renovateurNavListContainer.removeAttribute("opening", "");
|
||||
}, { once: true });
|
||||
console.log("#######");
|
||||
}
|
||||
function openHomegrade() {
|
||||
HomegradeNavListContainer.removeAttribute("closed", "");
|
||||
HomegradeNavListContainer.setAttribute("opened", "");
|
||||
HomegradeNavListContainer.removeAttribute("aria-hidden", "");
|
||||
HomegradeNavListContainer.setAttribute("opening", "");
|
||||
HomegradeNavListContainer.addEventListener("animationend", () => {
|
||||
HomegradeNavListContainer.removeAttribute("opening", "");
|
||||
}, { once: true });
|
||||
}
|
||||
openRenovateur();
|
||||
openHomegrade();
|
||||
}
|
||||
function closeMenu(menuContainer) {
|
||||
menuContainer.removeAttribute("opened");
|
||||
menuContainer.setAttribute("aria-hidden", "");
|
||||
menuContainer.setAttribute("closing", "");
|
||||
menuContainer.addEventListener("animationend", () => {
|
||||
menuContainer.setAttribute("closed", "");
|
||||
menuContainer.removeAttribute("closing", "");
|
||||
mobileMenuToggle.setAttribute("aria-expanded", "false");
|
||||
let textContent = mobileMenuToggle.querySelector("span.text-content");
|
||||
textContent.textContent = mobileMenuToggle.getAttribute("data-text-close");
|
||||
renovateurNavListContainer.removeAttribute("opened");
|
||||
renovateurNavListContainer.setAttribute("aria-hidden", "");
|
||||
renovateurNavListContainer.setAttribute("closing", "");
|
||||
renovateurNavListContainer.addEventListener("animationend", () => {
|
||||
renovateurNavListContainer.setAttribute("closed", "");
|
||||
renovateurNavListContainer.removeAttribute("closing", "");
|
||||
}, { once: true });
|
||||
HomegradeNavListContainer.removeAttribute("opened");
|
||||
HomegradeNavListContainer.setAttribute("aria-hidden", "");
|
||||
HomegradeNavListContainer.setAttribute("closing", "");
|
||||
HomegradeNavListContainer.addEventListener("animationend", () => {
|
||||
HomegradeNavListContainer.setAttribute("closed", "");
|
||||
HomegradeNavListContainer.removeAttribute("closing", "");
|
||||
}, { once: true });
|
||||
}
|
||||
mobileMenuToggle.addEventListener("click", function(e) {
|
||||
const isNavOpened = renovateurNavListContainer.hasAttribute("opened");
|
||||
const textContent = mobileMenuToggle.querySelector("span.text-content");
|
||||
const dataTextOpen = mobileMenuToggle.getAttribute("data-text-open");
|
||||
const dataTextClose = mobileMenuToggle.getAttribute("data-text-close");
|
||||
textContent.textContent = isNavOpened ? dataTextOpen : dataTextClose;
|
||||
mobileMenuToggle.toggleAttribute("aria-expanded");
|
||||
if (isNavOpened) {
|
||||
closeMenu(renovateurNavListContainer);
|
||||
closeMenu(HomegradeNavListContainer);
|
||||
if (isMobileNavOpened() === false) {
|
||||
openMenu();
|
||||
return;
|
||||
}
|
||||
if (!isNavOpened) {
|
||||
openMenu(renovateurNavListContainer);
|
||||
openMenu(HomegradeNavListContainer);
|
||||
if (isMobileNavOpened() === true) {
|
||||
closeMenu();
|
||||
}
|
||||
});
|
||||
function getFirstLink(menuLinks) {
|
||||
return menuLinks[0].querySelector("button") ? menuLinks[0].querySelector("button") : menuLinks[0].querySelector("a");
|
||||
}
|
||||
function getLastLink(menuLinks) {
|
||||
return menuLinks[menuLinks.length - 1].querySelector("button") ? menuLinks[menuLinks.length - 1].querySelector("button") : menuLinks[menuLinks.length - 1].querySelector("a");
|
||||
}
|
||||
const renovateurLinks = header.querySelectorAll(".menu-renovateur__navlist .menu-item");
|
||||
const renovateurFirstLink = getFirstLink(renovateurLinks);
|
||||
const renovateurLastLink = getLastLink(renovateurLinks);
|
||||
const homegradeLinks = header.querySelectorAll(".menu-homegrade__navlist .menu-item");
|
||||
const homegradeFirstLink = getFirstLink(homegradeLinks);
|
||||
const homegradeLastLink = getLastLink(homegradeLinks);
|
||||
mobileMenuToggle.addEventListener("focusout", (e) => {
|
||||
if (isMobileNavOpened()) {
|
||||
renovateurFirstLink.focus();
|
||||
}
|
||||
});
|
||||
renovateurFirstLink.addEventListener("focusout", (e) => {
|
||||
if (e.relatedTarget.id == "website-logo-link" && isMobileNavOpened()) {
|
||||
mobileMenuToggle.focus();
|
||||
}
|
||||
});
|
||||
renovateurLastLink.addEventListener("focusout", (e) => {
|
||||
if (isMobileNavOpened()) {
|
||||
homegradeFirstLink.focus();
|
||||
}
|
||||
});
|
||||
homegradeLastLink.addEventListener("focusout", (e) => {
|
||||
if (isMobileNavOpened()) {
|
||||
mobileMenuToggle.focus();
|
||||
}
|
||||
});
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") {
|
||||
if (isMobileNavOpened()) {
|
||||
closeMenu(renovateurNavListContainer);
|
||||
closeMenu(HomegradeNavListContainer);
|
||||
}
|
||||
if (isSearchOpen() === true) {
|
||||
closeSearch();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@
|
|||
/* ########### COMPONENTS ############ */
|
||||
@import './components/cta.css';
|
||||
@import './components/card.css';
|
||||
@import './components/card-post.css';
|
||||
@import './components/card-large-content.css';
|
||||
@import './components/section-titling.css';
|
||||
@import './components/search-module.css';
|
||||
|
||||
@import '../../template-components/card-news.css';
|
||||
@import '../../template-components/card-frequent_question.css';
|
||||
@import '../../template-components/card-thematique.css';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
body {
|
||||
@apply bg-white antialiased;
|
||||
}
|
||||
|
||||
a:focus,
|
||||
button:focus {
|
||||
outline: red solid 1px;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
mx-auto
|
||||
lg:mx-0
|
||||
static
|
||||
bottom-0
|
||||
translate-y-full
|
||||
lg:absolute;
|
||||
z-index: 999;
|
||||
display: none;
|
||||
|
|
@ -74,42 +76,43 @@
|
|||
rounded-xl;
|
||||
|
||||
&:hover,
|
||||
button:focus,
|
||||
a:focus {
|
||||
@apply cursor-pointer;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
button:focus,
|
||||
a:focus {
|
||||
@apply rounded-md;
|
||||
text-decoration: none;
|
||||
outline: 1px solid rgba(255, 255, 255, 0.8);
|
||||
outline-offset: 8px;
|
||||
}
|
||||
|
||||
/* IF SUBMENU CHILD */
|
||||
.menu-item__submenu-toggle {
|
||||
&:hover,
|
||||
&:focus {
|
||||
@apply text-secondary;
|
||||
/* @apply text-secondary; */
|
||||
}
|
||||
@apply relative pr-4;
|
||||
&:after {
|
||||
@apply absolute right-0;
|
||||
content: '▼';
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
line-height: 0.5;
|
||||
height: 10px;
|
||||
top: calc(50% - 4px);
|
||||
width: 10px;
|
||||
margin-left: 20px;
|
||||
transform-origin: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
transition: all 0.3s ease-out;
|
||||
border-bottom: 2px solid white;
|
||||
border-right: 2px solid white;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.menu-item__submenu-toggle[aria-expanded='false']:after {
|
||||
transform: rotate(0deg);
|
||||
transform: translateY(-20%) rotate(45deg);
|
||||
}
|
||||
.menu-item__submenu-toggle[aria-expanded='true']:after {
|
||||
transform: rotate(180deg);
|
||||
/* transform: rotate(225deg); */
|
||||
transform: translateY(40%) rotate(225deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@
|
|||
mr-12
|
||||
w-[190px]
|
||||
xl:w-[222px];
|
||||
|
||||
a:focus img {
|
||||
outline: red solid 1px;
|
||||
@apply outline-1 outline-offset-8;
|
||||
outline-radius: 50px;
|
||||
}
|
||||
}
|
||||
/* &__main-elements {
|
||||
@apply w-full bg-red-200 flex justify-between items-center;
|
||||
|
|
@ -154,7 +160,7 @@
|
|||
content: url('../resources/images/menu.svg');
|
||||
} */
|
||||
}
|
||||
&__mobile-menu-toggle[aria-expanded] {
|
||||
&__mobile-menu-toggle[aria-expanded='true'] {
|
||||
.toggle-icon {
|
||||
@apply relative;
|
||||
&__bar--top {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16.368" height="14.55" viewBox="0 0 16.368 14.55">
|
||||
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="16.368" height="14.55" viewBox="0 0 16.368 14.55">
|
||||
<path id="Icon_awesome-external-link-alt" data-name="Icon awesome-external-link-alt" d="M16.368.682V4.319A.682.682,0,0,1,15.2,4.8L14.189,3.786l-6.92,6.92a.682.682,0,0,1-.964,0l-.643-.643a.682.682,0,0,1,0-.964l6.92-6.92L11.567,1.164A.683.683,0,0,1,12.049,0h3.637A.682.682,0,0,1,16.368.682ZM11.567,7.7l-.455.455a.682.682,0,0,0-.2.482v4.1H1.819V3.637h7.5a.682.682,0,0,0,.482-.2l.455-.455a.682.682,0,0,0-.482-1.164H1.364A1.364,1.364,0,0,0,0,3.183v10a1.364,1.364,0,0,0,1.364,1.364h10a1.364,1.364,0,0,0,1.364-1.364V8.177A.682.682,0,0,0,11.567,7.7Z" fill="#df1e1e"/>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 687 B |
|
|
@ -49,8 +49,8 @@ export default function menuInit() {
|
|||
}
|
||||
|
||||
function closeCurrentSubmenu(buttonClose) {
|
||||
console.log('close submenu');
|
||||
console.log(buttonClose.parentElement);
|
||||
// console.log('close submenu');
|
||||
// console.log(buttonClose.parentElement);
|
||||
const currentOpenedSubmenu = buttonClose.parentElement;
|
||||
|
||||
currentOpenedSubmenu.classList.remove('sub-menu--open');
|
||||
|
|
@ -152,76 +152,172 @@ export default function menuInit() {
|
|||
-----------------------------------------------------------*/
|
||||
const renovateurNavListContainer = header.querySelector('.menu-renovateur__navlist-container');
|
||||
const HomegradeNavListContainer = header.querySelector('.menu-homegrade');
|
||||
function isMobileNavOpened() {
|
||||
console.log('is mobile nav opened');
|
||||
console.log(
|
||||
renovateurNavListContainer.hasAttribute('opened') &&
|
||||
mobileMenuToggle.getAttribute('aria-expanded') === 'true'
|
||||
);
|
||||
return (
|
||||
renovateurNavListContainer.hasAttribute('opened') &&
|
||||
mobileMenuToggle.getAttribute('aria-expanded') === 'true'
|
||||
);
|
||||
}
|
||||
|
||||
function openMenu(menuContainer) {
|
||||
// header.removeAttribute('closed', '');
|
||||
// header.setAttribute('opened', '');
|
||||
// header.removeAttribute('aria-hidden', '');
|
||||
// header.setAttribute('opening', '');
|
||||
console.log('open menu');
|
||||
// Change Toggle expanded
|
||||
mobileMenuToggle.setAttribute('aria-expanded', 'true');
|
||||
|
||||
// RENOVATEUR
|
||||
menuContainer.removeAttribute('closed', '');
|
||||
menuContainer.setAttribute('opened', '');
|
||||
menuContainer.removeAttribute('aria-hidden', '');
|
||||
menuContainer.setAttribute('opening', '');
|
||||
// Change Text button
|
||||
const textContent = mobileMenuToggle.querySelector('span.text-content');
|
||||
textContent.textContent = mobileMenuToggle.getAttribute('data-text-open');
|
||||
|
||||
menuContainer.addEventListener(
|
||||
function openRenovateur() {
|
||||
renovateurNavListContainer.removeAttribute('closed', '');
|
||||
renovateurNavListContainer.setAttribute('opened', '');
|
||||
renovateurNavListContainer.removeAttribute('aria-hidden', '');
|
||||
renovateurNavListContainer.setAttribute('opening', '');
|
||||
|
||||
renovateurNavListContainer.addEventListener(
|
||||
'animationend',
|
||||
() => {
|
||||
renovateurNavListContainer.removeAttribute('opening', '');
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
||||
console.log('#######');
|
||||
}
|
||||
|
||||
function openHomegrade() {
|
||||
HomegradeNavListContainer.removeAttribute('closed', '');
|
||||
HomegradeNavListContainer.setAttribute('opened', '');
|
||||
HomegradeNavListContainer.removeAttribute('aria-hidden', '');
|
||||
HomegradeNavListContainer.setAttribute('opening', '');
|
||||
|
||||
HomegradeNavListContainer.addEventListener(
|
||||
'animationend',
|
||||
() => {
|
||||
HomegradeNavListContainer.removeAttribute('opening', '');
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
openRenovateur();
|
||||
openHomegrade();
|
||||
}
|
||||
function closeMenu(menuContainer) {
|
||||
// Change Toggle expanded
|
||||
mobileMenuToggle.setAttribute('aria-expanded', 'false');
|
||||
|
||||
// Button Text Content
|
||||
let textContent = mobileMenuToggle.querySelector('span.text-content');
|
||||
textContent.textContent = mobileMenuToggle.getAttribute('data-text-close');
|
||||
// console.log(test.textContent);
|
||||
|
||||
// CLOSING #RENOVATEUR
|
||||
renovateurNavListContainer.removeAttribute('opened');
|
||||
renovateurNavListContainer.setAttribute('aria-hidden', '');
|
||||
renovateurNavListContainer.setAttribute('closing', '');
|
||||
|
||||
renovateurNavListContainer.addEventListener(
|
||||
'animationend',
|
||||
() => {
|
||||
menuContainer.removeAttribute('opening', '');
|
||||
renovateurNavListContainer.setAttribute('closed', '');
|
||||
renovateurNavListContainer.removeAttribute('closing', '');
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
function closeMenu(menuContainer) {
|
||||
// header.removeAttribute('opened');
|
||||
// header.setAttribute('aria-hidden', '');
|
||||
// header.setAttribute('closing', '');
|
||||
|
||||
menuContainer.removeAttribute('opened');
|
||||
menuContainer.setAttribute('aria-hidden', '');
|
||||
menuContainer.setAttribute('closing', '');
|
||||
// CLOSING #HOMEGRADE
|
||||
HomegradeNavListContainer.removeAttribute('opened');
|
||||
HomegradeNavListContainer.setAttribute('aria-hidden', '');
|
||||
HomegradeNavListContainer.setAttribute('closing', '');
|
||||
|
||||
menuContainer.addEventListener(
|
||||
HomegradeNavListContainer.addEventListener(
|
||||
'animationend',
|
||||
() => {
|
||||
menuContainer.setAttribute('closed', '');
|
||||
menuContainer.removeAttribute('closing', '');
|
||||
HomegradeNavListContainer.setAttribute('closed', '');
|
||||
HomegradeNavListContainer.removeAttribute('closing', '');
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
mobileMenuToggle.addEventListener('click', function (e) {
|
||||
const isNavOpened = renovateurNavListContainer.hasAttribute('opened');
|
||||
|
||||
// Button Text Content
|
||||
const textContent = mobileMenuToggle.querySelector('span.text-content');
|
||||
const dataTextOpen = mobileMenuToggle.getAttribute('data-text-open');
|
||||
const dataTextClose = mobileMenuToggle.getAttribute('data-text-close');
|
||||
|
||||
// Change Text button
|
||||
textContent.textContent = isNavOpened ? dataTextOpen : dataTextClose;
|
||||
|
||||
// Toggle Aria-expanded
|
||||
mobileMenuToggle.toggleAttribute('aria-expanded');
|
||||
|
||||
// Handle Visibility
|
||||
if (isNavOpened) {
|
||||
closeMenu(renovateurNavListContainer);
|
||||
closeMenu(HomegradeNavListContainer);
|
||||
if (isMobileNavOpened() === false) {
|
||||
openMenu();
|
||||
return;
|
||||
}
|
||||
if (!isNavOpened) {
|
||||
openMenu(renovateurNavListContainer);
|
||||
openMenu(HomegradeNavListContainer);
|
||||
if (isMobileNavOpened() === true) {
|
||||
closeMenu();
|
||||
}
|
||||
});
|
||||
|
||||
/* -----------------------------------------------------------
|
||||
HANDLE FOCUS CHANGE
|
||||
-----------------------------------------------------------*/
|
||||
function getFirstLink(menuLinks) {
|
||||
return menuLinks[0].querySelector('button')
|
||||
? menuLinks[0].querySelector('button')
|
||||
: menuLinks[0].querySelector('a');
|
||||
}
|
||||
function getLastLink(menuLinks) {
|
||||
return menuLinks[menuLinks.length - 1].querySelector('button')
|
||||
? menuLinks[menuLinks.length - 1].querySelector('button')
|
||||
: menuLinks[menuLinks.length - 1].querySelector('a');
|
||||
}
|
||||
|
||||
// Menu Renovateur elements
|
||||
const renovateurLinks = header.querySelectorAll('.menu-renovateur__navlist .menu-item');
|
||||
const renovateurFirstLink = getFirstLink(renovateurLinks);
|
||||
const renovateurLastLink = getLastLink(renovateurLinks);
|
||||
|
||||
// Menu homegrade elements
|
||||
const homegradeLinks = header.querySelectorAll('.menu-homegrade__navlist .menu-item');
|
||||
const homegradeFirstLink = getFirstLink(homegradeLinks);
|
||||
const homegradeLastLink = getLastLink(homegradeLinks);
|
||||
|
||||
// Leaving the mobile menu Toggle --> Focus on Menu Homegrade
|
||||
mobileMenuToggle.addEventListener('focusout', (e) => {
|
||||
if (isMobileNavOpened()) {
|
||||
renovateurFirstLink.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// Si shift tab pour retour --> Focuser correctement sur le mobile menu toggle
|
||||
renovateurFirstLink.addEventListener('focusout', (e) => {
|
||||
if (e.relatedTarget.id == 'website-logo-link' && isMobileNavOpened()) {
|
||||
mobileMenuToggle.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// Leaving the Menu Rénovateur --> Focus on Menu Homegrade
|
||||
renovateurLastLink.addEventListener('focusout', (e) => {
|
||||
if (isMobileNavOpened()) {
|
||||
homegradeFirstLink.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// Leaving the Menu Homegrade --> Focus on the toggle
|
||||
homegradeLastLink.addEventListener('focusout', (e) => {
|
||||
if (isMobileNavOpened()) {
|
||||
mobileMenuToggle.focus();
|
||||
}
|
||||
});
|
||||
|
||||
/* -----------------------------------------------------------
|
||||
HANDLE ESCAPE KEY
|
||||
-----------------------------------------------------------*/
|
||||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
if (isMobileNavOpened()) {
|
||||
closeMenu(renovateurNavListContainer);
|
||||
closeMenu(HomegradeNavListContainer);
|
||||
}
|
||||
if (isSearchOpen() === true) {
|
||||
closeSearch();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<form action="/" method="get" class="search-module__search-form">
|
||||
<label class="search-module__search-form__title" for="search"><?php echo __('Vous cherchez quelque chose en particulier ?', 'homegrade-theme-texte-fonctionnel') ?></label>
|
||||
<label class="search-module__search-form__title" for="search"><?php echo __('Vous cherchez quelque chose en particulier ?', 'homegrade-theme__texte-fonctionnel') ?></label>
|
||||
<hr class="search-module__search-form__separator separator">
|
||||
<!-- <label class="search-module__label" for="search">Rechercher</label> -->
|
||||
|
||||
<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') ?>" />
|
||||
<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') ?>" />
|
||||
<!-- <input class="search-module__search-form__submit" type="image" alt="Search" src="<?php get_template_directory_uri() . "/resources/img/search-icon.svg" ?>" /> -->
|
||||
|
||||
|
||||
|
|
|
|||
19
single.php
19
single.php
|
|
@ -1,28 +1,27 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<div class="container my-8 mx-auto">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="container my-8 mx-auto">
|
||||
<?php if (have_posts()) : ?>
|
||||
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
while (have_posts()) :
|
||||
the_post();
|
||||
?>
|
||||
the_content()
|
||||
?>
|
||||
|
||||
<?php get_template_part( 'template-parts/content', 'single' ); ?>
|
||||
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
comments_template();
|
||||
endif;
|
||||
// if ( comments_open() || get_comments_number() ) :
|
||||
// comments_template();
|
||||
// endif;
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ $renolution_datas = get_field('renolution_datas');
|
|||
<section id="block-aides-financieres" class="card-large-content-container">
|
||||
|
||||
<div class="section_titling">
|
||||
<h2 class="section_titling__title">Aides financières</h2>
|
||||
<h3 class="section_titling__subtitle"><?php echo $subtitle ?></h3>
|
||||
<h2 class="section_titling__title"><?php echo __("Aides financières", 'homegrade-theme__texte-fonctionnel') ?></h2>
|
||||
<p class="section_titling__subtitle"><?php echo $subtitle ?></p>
|
||||
</div>
|
||||
<div class="card-large-content">
|
||||
<div class="card-large-content__renolution-details">
|
||||
|
|
@ -16,7 +16,7 @@ $renolution_datas = get_field('renolution_datas');
|
|||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/logos/logo-renolution-monochrome.svg' alt=''>
|
||||
</div>
|
||||
|
||||
<h4 class="renolution__title"><?php echo $renolution_datas['title'] ?></h4>
|
||||
<h3 class="renolution__title"><?php echo $renolution_datas['title'] ?></h3>
|
||||
<p><?php echo $renolution_datas['description'] ?></p>
|
||||
<a class="cta cta--primary cta--button" href="<?php echo $renolution_datas['button']['url'] ?>" target="<?php echo $renolution_datas['button']['target'] ?>"><?php echo $renolution_datas['button']['title'] ?></a>
|
||||
<div class="renolution__guide-external-links">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $demarches_administratives_links = get_field('demarches_administratives_links');
|
|||
<img class="card-large-content__top-illustration" src='<?php echo get_template_directory_uri() ?>/resources/img/illustrations/illustration-que-fait-homegrade-pour-vous.svg' alt=''>
|
||||
<div class="section_titling">
|
||||
<h2 class="section_titling__title"><?php echo $block_titling['title'] ?></h2>
|
||||
<h3 class="section_titling__subtitle"><?php echo $block_titling['subtitle'] ?></h3>
|
||||
<p class="section_titling__subtitle"><?php echo $block_titling['subtitle'] ?></p>
|
||||
<p class="section_titling__description"><?php echo $block_titling['description'] ?></p>
|
||||
</div>
|
||||
<div class="card-large-content__links-container">
|
||||
|
|
@ -34,7 +34,7 @@ $demarches_administratives_links = get_field('demarches_administratives_links');
|
|||
// echo '</pre>';
|
||||
?>
|
||||
<img class="card-large-content__link__page_icon" src="<?php echo $page_icon['url'] ?>" alt="">
|
||||
<h4 class="card-large-content__link__title"><?php echo $linked_page->post_title ?></h4>
|
||||
<h3 class="card-large-content__link__title"><?php echo $linked_page->post_title ?></h3>
|
||||
<p class="card-large-content__link__excerpt"><?php echo $linked_page->post_excerpt ?></p>
|
||||
|
||||
<a class="cta cta--button cta--shadowed" href="<?php echo get_permalink($linked_page->ID) ?>"><?php echo $link_datas['button_text'] ?></a>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ $block_titling_datas = get_field('block_titling_datas');
|
|||
<section class="section_latest_news">
|
||||
<div class="section_titling">
|
||||
<h2 class="section_titling__title"><?php echo $block_titling_datas['title'] ?></h2>
|
||||
<h3 class="section_titling__subtitle"><?php echo $block_titling_datas['subtitle'] ?></h3>
|
||||
<p class="section_titling__subtitle"><?php echo $block_titling_datas['subtitle'] ?></p>
|
||||
</div>
|
||||
|
||||
<div class="articles_container">
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ $block_titling = get_field('block_titling_description_datas');
|
|||
|
||||
<section id="block-questions-frequentes">
|
||||
<div class="section_titling">
|
||||
<h2 class="section_titling__title">Les questions les plus fréquentes </h2>
|
||||
<h3 class="section_titling__subtitle">Simplifions votre recherche !</h3>
|
||||
<h2 class="section_titling__title"><?php echo __("Les questions les plus fréquentes", 'homegrade-theme__texte-fonctionnel') ?></h2>
|
||||
<p class="section_titling__subtitle"><?php echo __("Simplifions votre recherche !", 'homegrade-theme__texte-fonctionnel') ?></p>
|
||||
</div>
|
||||
<div class="questions-frequentes-grid">
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
"Thématiques"
|
||||
],
|
||||
"script": [
|
||||
"showthematiquejs",
|
||||
"testjs"
|
||||
"showthematiquejs"
|
||||
],
|
||||
"viewScript": "show-thematique-js",
|
||||
"acf": {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
}
|
||||
|
||||
.swiper-wrapper {
|
||||
@apply pt-24 pb-16 w-full;
|
||||
@apply pt-24 pb-16 w-full flex-col lg:flex-row gap-y-20;
|
||||
}
|
||||
|
||||
.swiper-slide .card-thematique {
|
||||
|
|
@ -18,14 +18,14 @@
|
|||
|
||||
.thematique-button-next,
|
||||
.thematique-button-prev {
|
||||
@apply absolute top-1/2 z-50 opacity-80;
|
||||
@apply absolute top-1/2 z-50 opacity-80 hidden lg:block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
&:hover,
|
||||
&:focus {
|
||||
@apply opacity-100;
|
||||
filter: invert(13%) sepia(71%) saturate(4425%)
|
||||
hue-rotate(338deg) brightness(109%) contrast(117%);
|
||||
filter: invert(13%) sepia(71%) saturate(4425%) hue-rotate(338deg) brightness(109%)
|
||||
contrast(117%);
|
||||
}
|
||||
&:focus {
|
||||
@apply rounded-full;
|
||||
|
|
@ -37,7 +37,9 @@
|
|||
.thematique-button-prev {
|
||||
@apply left-0;
|
||||
}
|
||||
|
||||
.swiper-pagination {
|
||||
@apply hidden lg:block;
|
||||
}
|
||||
.swiper-pagination-bullet {
|
||||
@apply w-3 h-3 mx-2 opacity-100 bg-white !border-2 !border-solid border-black opacity-80;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,65 @@
|
|||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
const cardThematiques = document.querySelectorAll('.swiper-slide .card-thematique');
|
||||
|
||||
mySwiper = new Swiper('.swiper-container', {
|
||||
grabCursor: false,
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 30,
|
||||
loop: true,
|
||||
// centeredSlides: true,
|
||||
keyboard: {
|
||||
enabled: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.thematique-button-next',
|
||||
prevEl: '.thematique-button-prev',
|
||||
},
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
renderBullet: function (index, className) {
|
||||
const ariaLabel = cardThematiques[index].getAttribute('data-taxonomy');
|
||||
function swiperCheckBreakpoints() {
|
||||
const hasSwiper = thematiquesSwiper.__swiper__ === true;
|
||||
|
||||
return `<button class="${className}" aria-label="${ariaLabel}"></button>`;
|
||||
if (window.innerWidth < 960 && hasSwiper) {
|
||||
thematiquesSwiper.destroy(true, true);
|
||||
}
|
||||
if (window.innerWidth >= 960 && !hasSwiper) {
|
||||
initiateSwiper();
|
||||
}
|
||||
}
|
||||
|
||||
function initiateSwiper() {
|
||||
thematiquesSwiper = new Swiper('.swiper-container', {
|
||||
grabCursor: false,
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 30,
|
||||
a11y: {
|
||||
enabled: true,
|
||||
prevSlideMessage: textTranslations.previousSlide,
|
||||
nextSlideMessage: textTranslations.nextSlide,
|
||||
slideRole: '',
|
||||
slideLabelMessage: textTranslations.slideLabel,
|
||||
},
|
||||
},
|
||||
a11y: false,
|
||||
});
|
||||
// loop: true,
|
||||
// centeredSlides: true,
|
||||
keyboard: {
|
||||
enabled: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.thematique-button-next',
|
||||
prevEl: '.thematique-button-prev',
|
||||
},
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
renderBullet: function (index, className) {
|
||||
const ariaLabel = cardThematiques[index].getAttribute('data-taxonomy');
|
||||
|
||||
// return `<button class="${className}" aria-label="${ariaLabel}"></button>`;
|
||||
return `<div class="${className}" test tabindex="-1" aria-label="Aller à la slide ${index}"></div>`;
|
||||
},
|
||||
},
|
||||
breakpoints: {
|
||||
// when window width is >= 320px
|
||||
|
||||
// when window width is >= 480px
|
||||
320: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
// when window width is >= 640px
|
||||
1100: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
},
|
||||
// a11y: false,
|
||||
});
|
||||
}
|
||||
initiateSwiper();
|
||||
swiperCheckBreakpoints();
|
||||
|
||||
window.addEventListener('resize', swiperCheckBreakpoints);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,26 +12,23 @@ $terms = get_terms(array(
|
|||
?>
|
||||
|
||||
|
||||
|
||||
<section class="section-show-thematiques">
|
||||
|
||||
<div class="section_titling">
|
||||
<h2 class="section_titling__title"><?php echo $block_titling_datas['title'] ?></h2>
|
||||
<h3 class="section_titling__subtitle"><?php echo $block_titling_datas['subtitle'] ?></h3>
|
||||
<p class="section_titling__subtitle"><?php echo $block_titling_datas['subtitle'] ?></p>
|
||||
</div>
|
||||
|
||||
<div class="swiper-content">
|
||||
<button class="thematique-button-prev" aria-label="Thématique précédente">
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/slider-next-left.svg' alt=''>
|
||||
</button>
|
||||
<button class="thematique-button-next" aria-label="Thématique suivante">
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/slider-next-right.svg' alt=''>
|
||||
</button>
|
||||
|
||||
|
||||
<!-- Slider main container -->
|
||||
<div class="swiper-container">
|
||||
<!-- If we need pagination -->
|
||||
<div class="swiper-pagination"></div>
|
||||
|
||||
|
||||
<!-- Additional required wrapper -->
|
||||
<div class="swiper-wrapper">
|
||||
|
|
@ -41,11 +38,8 @@ $terms = get_terms(array(
|
|||
<div class="swiper-slide">Slide 3</div> -->
|
||||
|
||||
<?php foreach ($terms as $term) : ?>
|
||||
<div class="swiper-slide">
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
<div class="swiper-slide">
|
||||
<?php
|
||||
get_template_part(
|
||||
'template-components/card-thematique',
|
||||
null,
|
||||
|
|
@ -57,10 +51,14 @@ $terms = get_terms(array(
|
|||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
<button class="thematique-button-next" aria-label="Thématique suivante">
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/slider-next-right.svg' alt=''>
|
||||
</button>
|
||||
<div class="swiper-pagination" tabindex="-1"></div>
|
||||
|
||||
|
||||
<!-- scrollbar -->
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -11,15 +11,15 @@ $thematique_icon = get_field('taxonomy_pictures', $args['thematique'])['icon'];
|
|||
|
||||
<div class="card-frequent-question card-<?php echo $args['thematique']->slug ?>">
|
||||
<img class="card-frequent-question__icon" src="<?php echo $thematique_icon['url'] ?>" alt="">
|
||||
<h4 class="card-frequent-question__title text-<?php echo getThematiqueFamilySlug($args['thematique']->slug) ?>"><?php echo $args['thematique']->name ?></h4>
|
||||
<h3 class="card-frequent-question__title text-<?php echo getThematiqueFamilySlug($args['thematique']->slug) ?>"><?php echo $args['thematique']->name ?></h3>
|
||||
<p class=""><?php echo $args['post_title'] ?></p>
|
||||
|
||||
<div class="card-frequent-question__details-container">
|
||||
<ul class="card-frequent-question__tags_container">
|
||||
<?php if (!empty($mots_cles)) : ?>
|
||||
<?php foreach ($mots_cles as $mot_cle) : ?>
|
||||
<li class="tag bg-<?php echo getThematiqueFamilySlug($args['thematique']->slug) ?>-light text-<?php echo getThematiqueFamilySlug($args['thematique']->slug) ?>"><?php echo $mot_cle->name ?></li>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($mots_cles as $mot_cle) : ?>
|
||||
<li class="tag bg-<?php echo getThematiqueFamilySlug($args['thematique']->slug) ?>-light text-<?php echo getThematiqueFamilySlug($args['thematique']->slug) ?>"><?php echo $mot_cle->name ?></li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.card-post {
|
||||
.card-news {
|
||||
@apply bg-white shadow-lg rounded-3xl relative;
|
||||
|
||||
&__thumbnail {
|
||||
|
|
@ -9,6 +9,9 @@
|
|||
&__inner {
|
||||
@apply p-8 h-full;
|
||||
}
|
||||
&__heading {
|
||||
@apply flex flex-col-reverse;
|
||||
}
|
||||
|
||||
&__tag {
|
||||
@apply bg-secondary-light
|
||||
|
|
@ -8,15 +8,19 @@ $post_tags = $args['post_tags'];
|
|||
|
||||
|
||||
|
||||
<div class="card-post <?php echo $card_variant ? 'card-post--' . $card_variant : '' ?> ">
|
||||
<div class="card-news <?php echo $card_variant ? 'card-news--' . $card_variant : '' ?> ">
|
||||
|
||||
<?php echo $post_thumbnail ?>
|
||||
<div class="card-post__inner">
|
||||
<p class="card-post__tag"><?php echo $post_tags[0]->name ?></p>
|
||||
<h3 class="card-post__title"><?php echo $post_title ?></h3>
|
||||
<div class="card-news__inner">
|
||||
<div class="card-news__heading">
|
||||
<h3 class="card-news__title"><?php echo $post_title ?></h3>
|
||||
<p class="card-news__tag"><?php echo $post_tags[0]->name ?></p>
|
||||
</div>
|
||||
|
||||
<a href="#" class="cta cta--read-more cta--with-arrow-button cta--streched ">
|
||||
<!-- cta-read-more -->
|
||||
<span><?php echo __("Lire l'article", 'deligraph-theme') ?></span>
|
||||
<span><?php echo __("Lire l'article", 'homegrade-theme__texte-fonctionnel') ?></span>
|
||||
<span class="sr-only"><?php echo $post_title ?></span>
|
||||
<img class="cta_arrow_button" src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/arrow-right-circle.svg' alt=''>
|
||||
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ $color = getThematiqueFamilySlug($thematique->slug);
|
|||
?>
|
||||
<div class="card-thematique card-<?php echo $thematique->slug ?>" data-taxonomy="<?php echo $thematique->slug ?>">
|
||||
<img class="card-thematique__thumbnail" src="<?php echo $taxonomy_picture['illustration_s']['sizes']['medium'] ?>" alt="">
|
||||
<h4 class="card-thematique__title text-<?php echo getThematiqueFamilySlug($thematique->slug) ?>"><?php echo $thematique->name ?></h4>
|
||||
<h3 class="card-thematique__title text-<?php echo getThematiqueFamilySlug($thematique->slug) ?>"><?php echo $thematique->name ?></h3>
|
||||
<p class="card-thematique__description"><?php echo $thematique->description ?></p>
|
||||
|
||||
<a class="card-thematique__cta hover:text-<?php echo getThematiqueFamilySlug($thematique->slug) ?>" href="<?php echo get_term_link($thematique) ?> ">
|
||||
En savoir plus
|
||||
<span class="sr-only">sur <?php echo $thematique->slug ?></span>
|
||||
<div class="cta_arrow_button">
|
||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/arrow-right-circle.svg' alt=''>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<header class="entry-header mb-4">
|
||||
<?php the_title( sprintf( '<h1 class="entry-title text-2xl lg:text-5xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
|
||||
<time datetime="<?php echo get_the_date( 'c' ); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
|
||||
<?php the_title(sprintf('<h1 class="entry-title text-2xl lg:text-5xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h1>'); ?>
|
||||
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'tailpress' ) . '</span>',
|
||||
'after' => '</div>',
|
||||
'link_before' => '<span>',
|
||||
'link_after' => '</span>',
|
||||
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'tailpress' ) . ' </span>%',
|
||||
'separator' => '<span class="screen-reader-text">, </span>',
|
||||
)
|
||||
);
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'homegrade-theme__texte-backoffice') . '</span>',
|
||||
'after' => '</div>',
|
||||
'link_before' => '<span>',
|
||||
'link_after' => '</span>',
|
||||
'pagelink' => '<span class="screen-reader-text">' . __('Page', 'homegrade-theme__texte-backoffice') . ' </span>%',
|
||||
'separator' => '<span class="screen-reader-text">, </span>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</article>
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'mb-12' ); ?>>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class('mb-12'); ?>>
|
||||
|
||||
<header class="entry-header mb-4">
|
||||
<?php the_title( sprintf( '<h2 class="entry-title text-2xl md:text-3xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
<time datetime="<?php echo get_the_date( 'c' ); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
|
||||
<?php the_title(sprintf('<h2 class="entry-title text-2xl md:text-3xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); ?>
|
||||
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
|
||||
</header>
|
||||
|
||||
<?php if ( is_search() || is_archive() ) : ?>
|
||||
<?php if (is_search() || is_archive()) : ?>
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt(); ?>
|
||||
|
|
@ -18,18 +18,18 @@
|
|||
/* translators: %s: Name of current post */
|
||||
the_content(
|
||||
sprintf(
|
||||
__( 'Continue reading %s', 'tailpress' ),
|
||||
the_title( '<span class="screen-reader-text">"', '"</span>', false )
|
||||
__('Continuer à lire', 'homegrade-theme__texte-backoffice'),
|
||||
the_title('<span class="screen-reader-text">"', '"</span>', false)
|
||||
)
|
||||
);
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'tailpress' ) . '</span>',
|
||||
'before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'homegrade-theme__texte-backoffice') . '</span>',
|
||||
'after' => '</div>',
|
||||
'link_before' => '<span>',
|
||||
'link_after' => '</span>',
|
||||
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'tailpress' ) . ' </span>%',
|
||||
'pagelink' => '<span class="screen-reader-text">' . __('Page', 'homegrade-theme__texte-backoffice') . ' </span>%',
|
||||
'separator' => '<span class="screen-reader-text">, </span>',
|
||||
)
|
||||
);
|
||||
|
|
@ -38,4 +38,4 @@
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
</article>
|
||||
</article>
|
||||
|
|
@ -16,8 +16,8 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
|
||||
<div class="website_logo">
|
||||
<?php if (has_custom_logo()) { ?>
|
||||
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil Homegrade.brussels", "homegrade-theme__texte-fonctionnel") ?>" aria-label="<?php echo __("Accueil Homegrade.brussels", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
<img src="<?php echo $logoSRC[0] ?>" alt="">
|
||||
<a id="website-logo-link" href="<?php echo home_url() ?>" tabindex="0">
|
||||
<img src="<?php echo $logoSRC[0] ?>" alt="alt=" <?php echo __("Accueil Homegrade.brussels", "homegrade-theme__texte-fonctionnel") ?>" ">
|
||||
</a>
|
||||
<!-- <?php the_custom_logo(); ?> -->
|
||||
<?php } else { ?>
|
||||
|
|
@ -28,22 +28,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
|
||||
|
||||
</div>
|
||||
<div class="menu-renovateur__interaction_toggles">
|
||||
<button id="search-module-toggle" class="menu-renovateur__search-module-toggle cta cta--circular cta--outline cta--outline-secondary !border border-secondary " title="<?php echo __("Ouvrir la recherche", "homegrade-theme__texte-fonctionnel") ?>" aria-label="<?php echo __("Ouvrir la recherche", "homegrade-theme__texte-fonctionnel") ?>" aria-expanded="false">
|
||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/search-icon.svg' ?>" alt="">
|
||||
</button>
|
||||
<button id="mobile-menu-toggle" class="menu-renovateur__mobile-menu-toggle cta cta--outline cta--button" data-text-open="<?php echo __("Menu", 'homegrade-theme__texte-fonctionnel') ?>" data-text-close="<?php echo __("Fermer", 'homegrade-theme__texte-fonctionnel') ?>" aria-label="<?php echo __("Ouvrir le menu", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
<span class="text-content">
|
||||
<?php echo __("Menu", 'homegrade-theme__texte-fonctionnel') ?>
|
||||
</span>
|
||||
<div class="toggle-icon">
|
||||
<div class="toggle-icon__bar toggle-icon__bar--top"></div>
|
||||
<div class="toggle-icon__bar toggle-icon__bar--middle"></div>
|
||||
<div class="toggle-icon__bar toggle-icon__bar--bottom"></div>
|
||||
</div>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
<div id="menu-renovateur-navlist-container" class="menu-renovateur__navlist-container" closed>
|
||||
|
||||
<ul id="menu-menu-renovateur" class="menu-renovateur__navlist mobile-navlist">
|
||||
|
|
@ -163,7 +148,22 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
</div>
|
||||
|
||||
|
||||
<div class="menu-renovateur__interaction_toggles">
|
||||
<button id="search-module-toggle" class="menu-renovateur__search-module-toggle cta cta--circular cta--outline cta--outline-secondary !border border-secondary" aria-expanded="false">
|
||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/search-icon.svg' ?>" alt="<?php echo __("Recherche", "homegrade-theme__texte-fonctionnel") ?>">
|
||||
</button>
|
||||
<button id="mobile-menu-toggle" class="menu-renovateur__mobile-menu-toggle cta cta--outline cta--button" data-text-open="<?php echo __("Menu", 'homegrade-theme__texte-fonctionnel') ?>" data-text-close="<?php echo __("Fermer", 'homegrade-theme__texte-fonctionnel') ?>" aria-label="<?php echo __("Menu", "homegrade-theme__texte-fonctionnel") ?>" aria-expanded="false">
|
||||
<span class="text-content">
|
||||
<?php echo __("Menu", 'homegrade-theme__texte-fonctionnel') ?>
|
||||
</span>
|
||||
<div class="toggle-icon">
|
||||
<div class="toggle-icon__bar toggle-icon__bar--top"></div>
|
||||
<div class="toggle-icon__bar toggle-icon__bar--middle"></div>
|
||||
<div class="toggle-icon__bar toggle-icon__bar--bottom"></div>
|
||||
</div>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- SEARCH MODULE -->
|
||||
<?php get_template_part('template-components/header/search-module'); ?>
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
<?php
|
||||
$menu_name = 'renovateur';
|
||||
$locations = get_nav_menu_locations();
|
||||
$menu = wp_get_nav_menu_object($locations[$menu_name]);
|
||||
$menuitems = wp_get_nav_menu_items($menu->term_id, array('order' => 'DESC'));
|
||||
// echo '<pre>';
|
||||
// print_r($menuitems);
|
||||
// echo '</pre>';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- MENU RENOV ANCIEN -->
|
||||
|
||||
<div class="menu-renovateur">
|
||||
|
||||
<div class="website_logo">
|
||||
<?php if (has_custom_logo()) { ?>
|
||||
<?php the_custom_logo(); ?>
|
||||
<?php } else { ?>
|
||||
<a href=" <?php echo get_bloginfo('url'); ?>" class="font-extrabold text-lg uppercase">
|
||||
<?php echo get_bloginfo('name'); ?>
|
||||
</a>
|
||||
|
||||
<p class="text-sm font-light text-gray-600">
|
||||
<?php echo get_bloginfo('description'); ?>
|
||||
</p>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'container' => 'false',
|
||||
'theme_location' => 'renovateur',
|
||||
'li_class' => 'menu-navlink',
|
||||
'fallback_cb' => false,
|
||||
'show_parent' => true,
|
||||
'menu_class' => "menu-renovateur__navlist",
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<button id="search-module-toggle" class="menu-renovateur__search-module-toggle cta cta--circular cta--outline cta--outline-secondary !border border-secondary " title="<?php echo __('Facebook', "homegrade-theme-terminologie") ?>" href="<?php echo $social_networks['facebook_profile_url'] ?>">
|
||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/search-icon.svg' ?>" alt="">
|
||||
</button>
|
||||
<button id="mobile-menu-toggle" class="menu-renovateur__mobile-menu-toggle cta cta--outline cta--button">
|
||||
Menu
|
||||
</button>
|
||||
|
||||
|
||||
<!-- SEARCH MODULE -->
|
||||
<?php get_template_part('template-components/header/search-module'); ?>
|
||||
</div>
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
?>
|
||||
|
||||
<div id="search-module" class="search-module" mobile-closed aria-hidden role="search">
|
||||
<div class="search-module__wrapper-container">
|
||||
<?php get_search_form(); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user