|
@@ -77,6 +77,7 @@ function initBarba() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
barba.hooks.after((data) => {
|
|
barba.hooks.after((data) => {
|
|
|
|
+ refreshUiOnResize()
|
|
let pageTitleComparator, navIndex
|
|
let pageTitleComparator, navIndex
|
|
switch ($('main').children(":first").attr('id')) {
|
|
switch ($('main').children(":first").attr('id')) {
|
|
case 'index-content':
|
|
case 'index-content':
|
|
@@ -175,9 +176,11 @@ function refreshUiOnResize() {
|
|
if (result) {
|
|
if (result) {
|
|
currentColor = $('body').css('background-color')
|
|
currentColor = $('body').css('background-color')
|
|
if (isDesktopDevice) {
|
|
if (isDesktopDevice) {
|
|
|
|
+ console.log("is desktop");
|
|
$('nav').css('background-color', currentColor)
|
|
$('nav').css('background-color', currentColor)
|
|
$('#nav-container').css('background-color', color_bg)
|
|
$('#nav-container').css('background-color', color_bg)
|
|
} else {
|
|
} else {
|
|
|
|
+ console.log("is NOT desktop");
|
|
$('nav').css('background-color', color_main)
|
|
$('nav').css('background-color', color_main)
|
|
$('#nav-container').css('background-color', currentColor)
|
|
$('#nav-container').css('background-color', currentColor)
|
|
}
|
|
}
|
|
@@ -826,11 +829,20 @@ function addToggleBiography() {
|
|
}
|
|
}
|
|
|
|
|
|
function toggleBiographie(el) {
|
|
function toggleBiographie(el) {
|
|
|
|
+ let targetContent;
|
|
|
|
+ let targetArrow;
|
|
if (el.target.tagName === "H4") {
|
|
if (el.target.tagName === "H4") {
|
|
- el.target.nextElementSibling.nextElementSibling.classList.toggle('open');
|
|
|
|
- el.target.nextElementSibling.firstElementChild.firstElementChild.classList.toggle('open');
|
|
|
|
|
|
+ targetContent = el.target.nextElementSibling.nextElementSibling;
|
|
|
|
+ targetArrow = el.target.nextElementSibling.firstElementChild.firstElementChild;
|
|
} else {
|
|
} else {
|
|
- el.target.firstElementChild.classList.toggle('open');
|
|
|
|
- el.target.parentElement.nextElementSibling.classList.toggle('open');
|
|
|
|
|
|
+ targetContent = el.target.firstElementChild;
|
|
|
|
+ targetArrow = el.target.parentElement.nextElementSibling;
|
|
|
|
+ }
|
|
|
|
+ for (let openElement of document.querySelectorAll('h4 + p > em > img, h4 + p + p')) {
|
|
|
|
+ if (openElement !== targetContent && openElement !== targetArrow) {
|
|
|
|
+ openElement.classList.remove('open');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ targetContent.classList.toggle('open');
|
|
|
|
+ targetArrow.classList.toggle('open');
|
|
}
|
|
}
|