Compare commits

..

No commits in common. "388a2e6701d3789d07b04b03f5e16208677d8def" and "e11c2881fbd754091aa8f0eb05dc4804a52dcf59" have entirely different histories.

10 changed files with 13 additions and 153 deletions

View File

@ -72,8 +72,6 @@ function carhop_enqueue_scripts()
wp_enqueue_script('gsap-js', 'https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js', array(), false, true); wp_enqueue_script('gsap-js', 'https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js', array(), false, true);
wp_enqueue_script('gsap-st', 'https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/ScrollTrigger.min.js', array('gsap-js'), false, true); wp_enqueue_script('gsap-st', 'https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/ScrollTrigger.min.js', array('gsap-js'), false, true);
wp_enqueue_script('gsap-split-text', 'https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/SplitText.min.js', array('gsap-js'), false, true);
} }
add_action('wp_enqueue_scripts', 'carhop_enqueue_scripts'); add_action('wp_enqueue_scripts', 'carhop_enqueue_scripts');

View File

@ -79,7 +79,6 @@
@import './pages/single-actualites.css'; @import './pages/single-actualites.css';
@import './pages/page-formulaire-de-depot.css'; @import './pages/page-formulaire-de-depot.css';
@import './pages/archive-fonds-archives.css'; @import './pages/archive-fonds-archives.css';
@import './pages/home.css';
/* ########### BLOCKS ############ */ /* ########### BLOCKS ############ */
@import './blocks/blocks-spacing.css'; @import './blocks/blocks-spacing.css';

View File

@ -1,12 +1,4 @@
.sitemap { .sitemap {
a:hover {
filter: none !important;
}
a[target='_blank']:after,
a[target='_blank']:after {
content: none;
display: hidden;
}
h1.sitemap__title, h1.sitemap__title,
h2, h2,
h3 { h3 {
@ -22,68 +14,23 @@
@apply font-normal uppercase tracking-widest text-4xl; @apply font-normal uppercase tracking-widest text-4xl;
} }
ul,
li {
@apply !list-none;
}
ul { ul {
@apply mt-12 grid md:grid-cols-2 lg:grid-cols-3 gap-12; @apply mt-12 grid md:grid-cols-2 lg:grid-cols-3 gap-12;
li { li {
@apply list-none; @apply list-none text-center;
/* @apply text-center; */
a { a {
@apply flex flex-col justify-center no-underline hover:underline underline-offset-4; @apply flex flex-col items-center justify-center underline underline-offset-4;
/* @apply items-center; */
} }
} }
} }
.item-catalogue a,
.has-page-icon a,
.menu-item__submenu-toggle {
@apply flex flex-col justify-center gap-3 font-medium tracking-wide text-xl;
@apply items-start;
}
.menu-item__submenu-toggle {
@apply items-center;
}
.item-catalogue,
.has-page-icon {
a img,
.menu-item__submenu-toggle img {
transition: transform 0.4s ease-out;
}
a:hover img {
transform: scale(1.3);
}
&:hover {
.menu-item__submenu-toggle img {
transform: scale(1.3);
}
}
}
.sub-menu {
@apply !mt-4 block;
.menu-item__icon-img,
.page_icon,
.page_subtitle {
@apply hidden;
}
.menu-item__title {
@apply pb-0 !mb-0;
}
}
.website-menu-list { .website-menu-list {
@apply mb-32; @apply mb-32;
} }
} }
.sitemap__inner { .sitemap__inner {
@apply container px-0; @apply container;
} }
.sitemap__title { .sitemap__title {

View File

@ -1,12 +0,0 @@
body.home {
h1 {
@screen lg {
font-size: 3.4rem !important;
}
@screen 2xl {
font-size: 3.8rem !important;
}
line-height: 1.2;
@apply max-w-screen-lg mx-auto;
}
}

View File

@ -1,38 +0,0 @@
const tl = gsap.timeline({
defaults: {
duration: 1,
y: -14,
opacity: 0,
ease: 'power4.out',
},
});
function pageHeaderAnimationInit() {
const contentElements = document.querySelectorAll(
'.page-header .page-header__content *',
);
const cover = document.querySelector('.page-header__image');
if (contentElements.length > 0) {
tl.from(contentElements, {}, '<');
}
if (cover) {
tl.from(cover, { delay: 0.2 }, '<');
}
}
function chapterSectionAnimationInit() {
const contentElements = document.querySelectorAll(
'.wp-block-carhop-blocks-chapter-section .chapter-section__content *',
);
const cover = document.querySelector('.chapter-section__cover');
if (contentElements.length > 0) {
tl.from(contentElements, {}, '<');
}
if (cover) {
tl.from(cover, { delay: 0.2 }, '<');
}
}
export { pageHeaderAnimationInit, chapterSectionAnimationInit };

View File

@ -7,11 +7,6 @@ import { searchBarInit } from './search-bar';
import singlesInit from './singles/singles'; import singlesInit from './singles/singles';
import archivesInit from './archives/archives'; import archivesInit from './archives/archives';
import handleCiteButton from './singles/cite-button'; import handleCiteButton from './singles/cite-button';
import titlesInit from './titles';
import {
pageHeaderAnimationInit,
chapterSectionAnimationInit,
} from './animation/animations';
window.addEventListener('load', function () { window.addEventListener('load', function () {
menuInit(); menuInit();
@ -23,7 +18,4 @@ window.addEventListener('load', function () {
singlesInit(); singlesInit();
archivesInit(); archivesInit();
handleCiteButton(); handleCiteButton();
titlesInit();
pageHeaderAnimationInit();
chapterSectionAnimationInit();
}); });

View File

@ -142,12 +142,10 @@ export default function archivesInit() {
} }
handleFilterPostsBy(); handleFilterPostsBy();
if (postGridToolbarActions) {
postGridToolbarActions.addEventListener('click', (e) => { postGridToolbarActions.addEventListener('click', (e) => {
e.preventDefault(); e.preventDefault();
}); });
} }
}
function updatePostCount(count: number) { function updatePostCount(count: number) {
const postCount = document.querySelector('.post-count__count'); const postCount = document.querySelector('.post-count__count');

View File

@ -14,10 +14,10 @@ export default class SearchBar {
constructor(options: SearchBarOptions = {}) { constructor(options: SearchBarOptions = {}) {
this.searchBar = document.querySelector('#search-module') as HTMLDivElement; this.searchBar = document.querySelector('#search-module') as HTMLDivElement;
this.searchButtons = document.querySelectorAll( this.searchButtons = document.querySelectorAll(
'.tools-container .search-button', '.tools-container .search-button'
) as NodeListOf<HTMLButtonElement>; // Il y a 2 boutons de recherche (1 mobile; 1 desktop) ) as NodeListOf<HTMLButtonElement>; // Il y a 2 boutons de recherche (1 mobile; 1 desktop)
this.searchInput = document.querySelector( this.searchInput = document.querySelector(
'.search-module__search-form__input', '.search-module__search-form__input'
) as HTMLInputElement; ) as HTMLInputElement;
this.init(); this.init();
@ -33,7 +33,7 @@ export default class SearchBar {
// Ajouter les event listeners // Ajouter les event listeners
this.searchButtons.forEach((button) => this.searchButtons.forEach((button) =>
button.addEventListener('click', (event) => this.toggle(event)), button.addEventListener('click', (event) => this.toggle(event))
); );
this.searchBar.addEventListener('transitionend', this.handleTransitionEnd.bind(this)); this.searchBar.addEventListener('transitionend', this.handleTransitionEnd.bind(this));
document.addEventListener('keydown', this.handleKeyDown.bind(this)); document.addEventListener('keydown', this.handleKeyDown.bind(this));
@ -58,10 +58,7 @@ export default class SearchBar {
public open(): void { public open(): void {
if (!this.searchBar) return; if (!this.searchBar) return;
const submenus = document.querySelectorAll('#primary-menu .sub-menu-open');
submenus.forEach((submenu) => {
submenu.classList.remove('sub-menu-open');
});
this.searchBar.removeAttribute('closed'); this.searchBar.removeAttribute('closed');
this.searchBar.setAttribute('opened', ''); this.searchBar.setAttribute('opened', '');
this.isOpen = true; this.isOpen = true;
@ -103,10 +100,6 @@ export default class SearchBar {
this.searchBar.addEventListener('animationend', handleAnimationEnd); this.searchBar.addEventListener('animationend', handleAnimationEnd);
} }
public closeSubmenus(): void {
if (!this.searchBar) return;
}
private handleTransitionEnd(): void { private handleTransitionEnd(): void {
this.updateAriaHidden(); this.updateAriaHidden();
} }
@ -131,7 +124,7 @@ export default class SearchBar {
// Vérifier si le clic est en dehors de la barre de recherche ET des boutons // Vérifier si le clic est en dehors de la barre de recherche ET des boutons
const isClickOutsideSearchBar = !this.searchBar.contains(target); const isClickOutsideSearchBar = !this.searchBar.contains(target);
const isClickOnButton = Array.from(this.searchButtons || []).some((button) => const isClickOnButton = Array.from(this.searchButtons || []).some((button) =>
button.contains(target), button.contains(target)
); );
if (isClickOutsideSearchBar && !isClickOnButton) { if (isClickOutsideSearchBar && !isClickOnButton) {
@ -158,10 +151,7 @@ export default class SearchBar {
// Note: Les event listeners anonymes ne peuvent pas être supprimés facilement // Note: Les event listeners anonymes ne peuvent pas être supprimés facilement
// Dans un vrai projet, il faudrait stocker les références des fonctions // Dans un vrai projet, il faudrait stocker les références des fonctions
this.searchBar.removeEventListener( this.searchBar.removeEventListener('transitionend', this.handleTransitionEnd.bind(this));
'transitionend',
this.handleTransitionEnd.bind(this),
);
document.removeEventListener('keydown', this.handleKeyDown.bind(this)); document.removeEventListener('keydown', this.handleKeyDown.bind(this));
document.removeEventListener('click', this.handleClickOutside.bind(this)); document.removeEventListener('click', this.handleClickOutside.bind(this));
window.removeEventListener('scroll', this.handleScroll.bind(this)); window.removeEventListener('scroll', this.handleScroll.bind(this));

View File

@ -1,15 +0,0 @@
// GSAP Text Animations
export default function titlesInit() {
const homeTitle = document.querySelector('body.home h1');
let split = SplitText.create(homeTitle, { type: 'words, lines' });
// now animate the characters in a staggered fashion
gsap.from(split.lines, {
duration: 2,
y: 40, // animate from 100px below
autoAlpha: 0, // fade in from opacity: 0 and visibility: hidden
stagger: 0.2, // 0.05 seconds between each
ease: 'power4.out',
});
}

View File

@ -66,6 +66,7 @@
<li class="belfius"> <li class="belfius">
<h3 class="section-title">Compte bancaire</h3> <h3 class="section-title">Compte bancaire</h3>
<p>Belfius <br/>IBAN BE86 7995 2072 9950 <br/>BIC GKCCBEBB</p> <p>Belfius <br/>IBAN BE86 7995 2072 9950 <br/>BIC GKCCBEBB</p>
</li> </li>
<li class="socials"> <li class="socials">
<?php echo carhop_display_social_links(); ?> <?php echo carhop_display_social_links(); ?>