amélioration dropdown collectif et debug (?) la nav au resize
This commit is contained in:
@@ -200,6 +200,7 @@ h4 + p em > img.open {
|
||||
|
||||
h4 + p + p {
|
||||
margin-bottom: 0 !important;
|
||||
line-height: 1.45em;
|
||||
padding-bottom: 0rem;
|
||||
font-size: 0.75em;
|
||||
max-height: 0px;
|
||||
@@ -360,6 +361,8 @@ body main .content .projet-card .loader {
|
||||
}
|
||||
body main .content .projet-card a {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
body main .content .projet-card a figcaption {
|
||||
color: #0e1229;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -77,6 +77,7 @@ function initBarba() {
|
||||
}
|
||||
})
|
||||
barba.hooks.after((data) => {
|
||||
refreshUiOnResize()
|
||||
let pageTitleComparator, navIndex
|
||||
switch ($('main').children(":first").attr('id')) {
|
||||
case 'index-content':
|
||||
@@ -175,9 +176,11 @@ function refreshUiOnResize() {
|
||||
if (result) {
|
||||
currentColor = $('body').css('background-color')
|
||||
if (isDesktopDevice) {
|
||||
console.log("is desktop");
|
||||
$('nav').css('background-color', currentColor)
|
||||
$('#nav-container').css('background-color', color_bg)
|
||||
} else {
|
||||
console.log("is NOT desktop");
|
||||
$('nav').css('background-color', color_main)
|
||||
$('#nav-container').css('background-color', currentColor)
|
||||
}
|
||||
@@ -826,11 +829,20 @@ function addToggleBiography() {
|
||||
}
|
||||
|
||||
function toggleBiographie(el) {
|
||||
let targetContent;
|
||||
let targetArrow;
|
||||
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 {
|
||||
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');
|
||||
}
|
||||
@@ -34,8 +34,10 @@
|
||||
// typography - general sizes
|
||||
$currentSize: 1.2em;
|
||||
$smallSize: 0.95em;
|
||||
|
||||
$tinySize: 0.75em;
|
||||
$currentLineHeight: 1.25em;
|
||||
$smallFontLineHeight: 1.45em;
|
||||
$titleLineHeight: 1.1em;
|
||||
// typography - sizes mobile
|
||||
$titleFontSizeMobile: 1.8em;
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
}
|
||||
h4 + p + p {
|
||||
margin-bottom: 0 !important;
|
||||
line-height: $smallFontLineHeight;
|
||||
padding-bottom: 0rem;
|
||||
font-size: $tinySize;
|
||||
max-height: 0px;
|
||||
@@ -203,6 +204,8 @@
|
||||
}
|
||||
a {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
figcaption {
|
||||
color: $mainColor;
|
||||
background-color: transparent;
|
||||
|
||||
Reference in New Issue
Block a user