Compare commits
31 Commits
c3874cfee6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f233d9309 | |||
| 9986179153 | |||
| ee51632b85 | |||
| 04a47789f7 | |||
| ff4fabba70 | |||
| fa2352b00f | |||
| 6fe9fe1a54 | |||
| 4e8fe4fb2d | |||
| ad9c0349c7 | |||
| b266b73176 | |||
| b1d2acd246 | |||
| 1f0f540268 | |||
| 5edb071b35 | |||
| 1f377f9b60 | |||
| 446a8f2288 | |||
| 53b935bd07 | |||
| c53e9461dd | |||
| 8a8ecbb3e4 | |||
| cbc0053467 | |||
| 02231b8e17 | |||
| 811e6b5ca8 | |||
| fa8e32bef9 | |||
| ebabc21095 | |||
| 2b03838407 | |||
| 863f248656 | |||
| 66fe1c4adf | |||
| 30b82fd22b | |||
| 0b2ba2e1fd | |||
| ee2f83324c | |||
| 50de82d79c | |||
| 3eb54aae88 |
@@ -18,18 +18,19 @@
|
|||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
#sites-map-container {
|
#sites-map-container {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 530px) {
|
@media (max-width: 530px) {
|
||||||
#sites-map-container {
|
#sites-map-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 485px;
|
height:396px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 400px) {
|
@media (max-width: 400px) {
|
||||||
#sites-map-container {
|
#sites-map-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 430px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#sites-map-container .site-link:hover {
|
#sites-map-container .site-link:hover {
|
||||||
|
|||||||
@@ -163,25 +163,58 @@ svgElement.addEventListener('mouseout', function(event) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Gérer les clics pour la page node-type-site uniquement
|
|
||||||
|
// Gérer les clics sur les cercles de la carte
|
||||||
|
if (svgElement) {
|
||||||
svgElement.addEventListener('click', function(event) {
|
svgElement.addEventListener('click', function(event) {
|
||||||
|
const target = event.target;
|
||||||
|
|
||||||
|
if (!target.classList || !target.classList.contains('site-link')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// On récupère les URLs
|
||||||
|
const missionUrl = target.getAttribute('data-mission-photo-url');
|
||||||
|
const fallbackUrl = target.getAttribute('data-url');
|
||||||
|
|
||||||
|
// 1) Page RESSOURCE : priorité à la mission photo
|
||||||
|
if (isNodeTypeRessourcePage) {
|
||||||
|
event.preventDefault(); // empêche le <a href="..."> d'agir
|
||||||
|
|
||||||
|
if (missionUrl) {
|
||||||
|
window.location.href = missionUrl; // Aller directement à la mission photo
|
||||||
|
} else if (fallbackUrl) {
|
||||||
|
window.location.href = fallbackUrl; // Sinon, on garde le comportement actuel
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2) Page SITE : comportement actuel
|
||||||
if (isNodeTypeSitePage) {
|
if (isNodeTypeSitePage) {
|
||||||
if (event.target.classList.contains('site-link')) {
|
if (fallbackUrl) {
|
||||||
const targetUrl = event.target.getAttribute('data-url');
|
event.preventDefault();
|
||||||
if (targetUrl) {
|
window.location.href = fallbackUrl;
|
||||||
window.location.href = targetUrl; // Redirige vers le data-url correspondant
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 3) Page PROJET : comportement actuel
|
||||||
if (isNodeTypeProjetPage) {
|
if (isNodeTypeProjetPage) {
|
||||||
if (event.target.classList.contains('site-link')) {
|
if (fallbackUrl) {
|
||||||
const targetUrl = event.target.getAttribute('data-url');
|
event.preventDefault();
|
||||||
if (targetUrl) {
|
window.location.href = fallbackUrl;
|
||||||
window.location.href = targetUrl; // Redirige vers le data-url correspondant
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4) Autres pages : si tu veux un comportement par défaut
|
||||||
|
// if (fallbackUrl) {
|
||||||
|
// event.preventDefault();
|
||||||
|
// window.location.href = fallbackUrl;
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Fonction pour gérer l'agrandissement de views-row au survol des cercles
|
// Fonction pour gérer l'agrandissement de views-row au survol des cercles
|
||||||
if (isLessitesPage) {
|
if (isLessitesPage) {
|
||||||
|
|||||||
@@ -34,6 +34,34 @@ class GaleriePhotoMap extends BlockBase {
|
|||||||
$vp_w = 600;
|
$vp_w = 600;
|
||||||
$vp_h = 600;
|
$vp_h = 600;
|
||||||
|
|
||||||
|
// Charger toutes les ressources de type "Mission photo" (type de ressource = 17)
|
||||||
|
$all_mission_photos = \Drupal::entityTypeManager()
|
||||||
|
->getStorage('node')
|
||||||
|
->loadByProperties([
|
||||||
|
'type' => 'ressource', // adapte si ton type machine est différent
|
||||||
|
'status' => 1,
|
||||||
|
'field_type_de_ressource' => 17, // même ID que dans la query de la vue
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Indexer les missions photo par ID de site
|
||||||
|
$mission_by_site = [];
|
||||||
|
|
||||||
|
foreach ($all_mission_photos as $mission) {
|
||||||
|
if (!$mission->hasField('field_site') || $mission->get('field_site')->isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Un même node peut être lié à plusieurs sites : on en prend un par site
|
||||||
|
foreach ($mission->get('field_site') as $ref) {
|
||||||
|
$site_id = $ref->target_id;
|
||||||
|
|
||||||
|
if (!isset($mission_by_site[$site_id])) {
|
||||||
|
$mission_by_site[$site_id] = $mission;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Coordonnées géographiques des coins de la carte (France)
|
// Coordonnées géographiques des coins de la carte (France)
|
||||||
$latTop = 52.0; // Nord-Ouest (coin supérieur gauche)
|
$latTop = 52.0; // Nord-Ouest (coin supérieur gauche)
|
||||||
$lonLeft = -6.0;
|
$lonLeft = -6.0;
|
||||||
@@ -60,6 +88,24 @@ class GaleriePhotoMap extends BlockBase {
|
|||||||
// $subtitle = $site->get('field_sous_titre')->getString();
|
// $subtitle = $site->get('field_sous_titre')->getString();
|
||||||
$subtitle = $site->hasTranslation($language) ? $site->getTranslation($language)->get('field_sous_titre')->getString() : $site->get('field_sous_titre')->getString();
|
$subtitle = $site->hasTranslation($language) ? $site->getTranslation($language)->get('field_sous_titre')->getString() : $site->get('field_sous_titre')->getString();
|
||||||
|
|
||||||
|
// URL directe de la mission photo liée à ce site (si trouvée)
|
||||||
|
$mission_photo_url = '';
|
||||||
|
|
||||||
|
if (isset($mission_by_site[$site->id()])) {
|
||||||
|
$mission_node = $mission_by_site[$site->id()];
|
||||||
|
|
||||||
|
// Respecter la langue courante si traduction existe
|
||||||
|
if ($mission_node->hasTranslation($language)) {
|
||||||
|
$mission_node = $mission_node->getTranslation($language);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mission_photo_url = $mission_node->toUrl('canonical', [
|
||||||
|
'absolute' => TRUE,
|
||||||
|
'language' => \Drupal::languageManager()->getLanguage($langcode),
|
||||||
|
])->toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$link_options = ['absolute' => TRUE, 'attributes' => ['class' => 'ressource-link'], 'language' => \Drupal::languageManager()->getLanguage($langcode)]; // Passer 'absolute' à TRUE
|
$link_options = ['absolute' => TRUE, 'attributes' => ['class' => 'ressource-link'], 'language' => \Drupal::languageManager()->getLanguage($langcode)]; // Passer 'absolute' à TRUE
|
||||||
// $site_url = $site->toUrl('canonical', $link_options)->toString(); // URL absolue pour le data-url
|
// $site_url = $site->toUrl('canonical', $link_options)->toString(); // URL absolue pour le data-url
|
||||||
$site_link_object = Link::createFromRoute(t("Voir le site"), 'entity.node.canonical', ['node' => $site->id()], $link_options);
|
$site_link_object = Link::createFromRoute(t("Voir le site"), 'entity.node.canonical', ['node' => $site->id()], $link_options);
|
||||||
@@ -93,6 +139,7 @@ class GaleriePhotoMap extends BlockBase {
|
|||||||
class="site-link"
|
class="site-link"
|
||||||
data-content="$datacontent"
|
data-content="$datacontent"
|
||||||
data-url="$url"
|
data-url="$url"
|
||||||
|
data-mission-photo-url="$mission_photo_url"
|
||||||
cx="0" cy="0" r="$r"
|
cx="0" cy="0" r="$r"
|
||||||
style="fill-opacity:1;fill-rule:nonzero;" />
|
style="fill-opacity:1;fill-rule:nonzero;" />
|
||||||
<path
|
<path
|
||||||
|
|||||||
@@ -352,6 +352,8 @@ if (documentsLiensWrapper && blockRegionThird) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// start langswitcher position responsive//////////////////////
|
/////////////////// start langswitcher position responsive//////////////////////
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
|
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
|
||||||
@@ -378,109 +380,7 @@ window.addEventListener("resize", moveLanguageSwitcher);
|
|||||||
/////////////////// end langswitcher position responsive///////////////////////////////////////////////////////////
|
/////////////////// end langswitcher position responsive///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////// start class à view-rows-ressources ////////
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(".view-rows-wrapper").each(function () {
|
|
||||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
|
||||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
|
||||||
|
|
||||||
if (classToAdd) {
|
|
||||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
////////////////// end class à view-rows-wrapper ////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// start voir plus... ressources ////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// Vérifier si on est sur la page avec l'ID #ressources
|
|
||||||
if ($("#ressources").length > 0) {
|
|
||||||
$(".view-rows-wrapper").each(function () {
|
|
||||||
let container = $(this); // Cible uniquement cette section
|
|
||||||
let items = container.find(".views-row"); // Les éléments à afficher progressivement
|
|
||||||
let visibleCount = 4; // Nombre d'éléments visibles au départ (par défaut)
|
|
||||||
|
|
||||||
// Récupérer la classe `type-XXX`
|
|
||||||
let typeClass = container.attr("class").split(" ").find(cls => cls.startsWith("type-"));
|
|
||||||
let typeName = typeClass ? typeClass.replace("type-", "").replace(/-/g, " ") : "contenu"; // Nettoyer le nom
|
|
||||||
|
|
||||||
// >>> Exception : tout afficher pour type-Galerie-photos (pas de bouton)
|
|
||||||
if (typeClass && typeClass.toLowerCase() === "type-mission-photo") {
|
|
||||||
items.show(); // aucun masquage
|
|
||||||
return; // on sort : pas de "voir plus"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ajuster le nombre d'éléments visibles en fonction du type
|
|
||||||
if (typeClass && (typeClass === "type-podcast" || typeClass.toLowerCase() === "type-vidéo")) {
|
|
||||||
visibleCount = 2; // Pour Podcast et Vidéo
|
|
||||||
} else if (typeClass === "type-kit-de-communication") {
|
|
||||||
visibleCount = 1; // Pour Kit de Communication
|
|
||||||
}
|
|
||||||
|
|
||||||
// Si le nombre total d'éléments est inférieur ou égal à la limite, ne pas ajouter le bouton
|
|
||||||
if (items.length <= visibleCount) {
|
|
||||||
return; // Sortir de la boucle
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ajouter le bouton dynamiquement après chaque `.view-rows-wrapper`
|
|
||||||
let button = $("<button>")
|
|
||||||
.addClass("voir-plus")
|
|
||||||
.text("Voir plus de " + typeName)
|
|
||||||
.insertAfter(container);
|
|
||||||
|
|
||||||
// Cacher tous les éléments sauf ceux définis par `visibleCount`
|
|
||||||
items.hide().slice(0, visibleCount).show();
|
|
||||||
|
|
||||||
// Action sur le bouton
|
|
||||||
button.on("click", function () {
|
|
||||||
let hiddenItems = container.find(".views-row:hidden").slice(0, 4); // Prochains éléments à afficher
|
|
||||||
|
|
||||||
if ($(this).text().includes("Voir plus")) {
|
|
||||||
hiddenItems.slideDown(); // Afficher avec un effet de glissement
|
|
||||||
|
|
||||||
if (container.find(".views-row:hidden").length === 0) {
|
|
||||||
$(this).text("Voir moins de " + typeName); // Changer le texte du bouton si tout est affiché
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
container.find(".views-row").slice(visibleCount).slideUp(); // Replier les éléments
|
|
||||||
$(this).text("Voir plus de " + typeName); // Revenir à l'état initial
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// slimselect
|
|
||||||
let ressource_type_select = new SlimSelect({
|
|
||||||
select: '#edit-field-type-de-ressource-target-id--2',
|
|
||||||
settings:{
|
|
||||||
placeholderText: 'choisir',
|
|
||||||
searchPlaceholder: 'choisir'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let ressource_motscles_select = new SlimSelect({
|
|
||||||
select: '#edit-field-mots-clefs-target-id--2',
|
|
||||||
settings:{
|
|
||||||
placeholderText: 'choisir',
|
|
||||||
searchPlaceholder: 'choisir'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let ressource_sites_select = new SlimSelect({
|
|
||||||
select: '#edit-field-site-target-id-verf--2',
|
|
||||||
settings:{
|
|
||||||
placeholderText: 'choisir',
|
|
||||||
searchPlaceholder: 'choisir'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// console.log(('sites_select'), sites_select);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// end voir plus... ressources ////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// start voir plus... actualite dans /actualites & /home ////////////////////
|
/////////////////// start voir plus... actualite dans /actualites & /home ////////////////////
|
||||||
@@ -499,27 +399,32 @@ if ($("#actualites").length > 0 || $("#home").length > 0) {
|
|||||||
.addClass("toggle-actualite")
|
.addClass("toggle-actualite")
|
||||||
.insertAfter(article);
|
.insertAfter(article);
|
||||||
|
|
||||||
// Fonction commune
|
// Fonction de toggle (à utiliser partout)
|
||||||
function toggleActu() {
|
function toggleActu() {
|
||||||
body.slideToggle();
|
body.slideToggle();
|
||||||
links.slideToggle();
|
links.slideToggle();
|
||||||
toggleButton.toggleClass("open");
|
toggleButton.toggleClass("open");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clic sur la flèche
|
// Clic sur le bouton
|
||||||
toggleButton.on("click", function (e) {
|
toggleButton.on("click", function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
toggleActu();
|
toggleActu();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Clic n'importe où sur le node
|
// Clic sur le node entier sauf liens
|
||||||
article.on("click", function (e) {
|
article.on("click", function (e) {
|
||||||
// Ne rien faire si clic sur un lien
|
|
||||||
if ($(e.target).closest("a").length) {
|
if ($(e.target).closest("a").length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toggleActu();
|
toggleActu();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 👉 Clic aussi sur le H2
|
||||||
|
article.find("h2").on("click", function (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
toggleActu();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// slimselect
|
// slimselect
|
||||||
@@ -558,18 +463,6 @@ if ($("#actualites").length > 0 || $("#home").length > 0) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////// start class à view-rows-ressources ////////
|
|
||||||
|
|
||||||
$(".view-rows-wrapper").each(function () {
|
|
||||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
|
||||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
|
||||||
|
|
||||||
if (classToAdd) {
|
|
||||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
|
||||||
}
|
|
||||||
});
|
|
||||||
////////////////// end class à view-rows-wrapper ////////////////
|
|
||||||
|
|
||||||
//////////////start toggle partenaire //////////////////
|
//////////////start toggle partenaire //////////////////
|
||||||
|
|
||||||
$(".node-type-partenaire").each(function () {
|
$(".node-type-partenaire").each(function () {
|
||||||
@@ -598,38 +491,82 @@ if ($("#actualites").length > 0 || $("#home").length > 0) {
|
|||||||
|
|
||||||
|
|
||||||
////////////// start toggle page node projet //////////////////
|
////////////// start toggle page node projet //////////////////
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
|
||||||
const photo = document.querySelector('.field_field_equipe_photo');
|
const photo = document.querySelector('.field_field_equipe_photo');
|
||||||
const pres = document.querySelector('.field_field_equipe_presentation');
|
const pres = document.querySelector('.field_field_equipe_presentation');
|
||||||
|
|
||||||
if (!pres) return;
|
if (!photo || !pres) return;
|
||||||
|
|
||||||
// Création du bouton
|
// 🔒 Forcer l'état FERMÉ au chargement
|
||||||
|
photo.classList.remove('is-open');
|
||||||
|
pres.classList.remove('is-open');
|
||||||
|
|
||||||
|
// 1. Créer un wrapper autour de photo + présentation
|
||||||
|
const panel = document.createElement('div');
|
||||||
|
panel.className = 'equipe-panel';
|
||||||
|
|
||||||
|
// Insérer le panel avant la photo, puis y déplacer photo + pres
|
||||||
|
photo.parentNode.insertBefore(panel, photo);
|
||||||
|
panel.appendChild(photo);
|
||||||
|
panel.appendChild(pres);
|
||||||
|
|
||||||
|
// 2. Préparer le panel pour l'animation
|
||||||
|
panel.style.overflow = 'hidden';
|
||||||
|
panel.style.maxHeight = '0px';
|
||||||
|
|
||||||
|
// 3. Création du bouton
|
||||||
const btn = document.createElement('button');
|
const btn = document.createElement('button');
|
||||||
btn.className = 'btn-equipe-toggle';
|
btn.className = 'btn-equipe-toggle';
|
||||||
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||||
btn.setAttribute('aria-expanded', false);
|
btn.setAttribute('aria-expanded', 'false');
|
||||||
|
|
||||||
// Insertion du bouton juste après le bloc présentation
|
// Insertion du bouton juste après le panel (et plus après "pres")
|
||||||
pres.insertAdjacentElement('afterend', btn);
|
panel.insertAdjacentElement('afterend', btn);
|
||||||
|
|
||||||
// 3. Ajout de la ligne après le bouton
|
// Ligne de séparation après le bouton
|
||||||
const separator = document.createElement('div');
|
const separator = document.createElement('div');
|
||||||
separator.className = 'equipe-separator';
|
separator.className = 'equipe-separator';
|
||||||
btn.insertAdjacentElement('afterend', separator);
|
btn.insertAdjacentElement('afterend', separator);
|
||||||
|
|
||||||
// Toggle
|
// --- Fonctions ouverture / fermeture ---
|
||||||
|
|
||||||
|
function openPanel() {
|
||||||
|
panel.classList.add('is-open');
|
||||||
|
photo.classList.add('is-open');
|
||||||
|
pres.classList.add('is-open');
|
||||||
|
|
||||||
|
const fullHeight = panel.scrollHeight; // inclut photo + texte
|
||||||
|
panel.style.maxHeight = fullHeight + 'px';
|
||||||
|
|
||||||
|
btn.textContent = "FERMER LA PRÉSENTATION DE L'ÉQUIPE";
|
||||||
|
btn.setAttribute('aria-expanded', 'true');
|
||||||
|
}
|
||||||
|
|
||||||
|
function closePanel() {
|
||||||
|
const fullHeight = panel.scrollHeight;
|
||||||
|
panel.style.maxHeight = fullHeight + 'px';
|
||||||
|
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
panel.style.maxHeight = '0px';
|
||||||
|
panel.classList.remove('is-open');
|
||||||
|
photo.classList.remove('is-open');
|
||||||
|
pres.classList.remove('is-open');
|
||||||
|
});
|
||||||
|
|
||||||
|
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||||
|
btn.setAttribute('aria-expanded', 'false');
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Toggle bouton ---
|
||||||
btn.addEventListener('click', function () {
|
btn.addEventListener('click', function () {
|
||||||
const isOpen = pres.classList.toggle('is-open');
|
const isOpen = btn.getAttribute('aria-expanded') === 'true';
|
||||||
|
if (isOpen) {
|
||||||
if (photo) photo.classList.toggle('is-open');
|
closePanel();
|
||||||
|
} else {
|
||||||
btn.textContent = isOpen
|
openPanel();
|
||||||
? "FERMER LA PRÉSENTATION DE L'ÉQUIPE"
|
}
|
||||||
: "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
|
||||||
|
|
||||||
btn.setAttribute('aria-expanded', isOpen);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -639,6 +576,8 @@ btn.insertAdjacentElement('afterend', separator);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
|
|
||||||
|
|
||||||
@@ -846,131 +785,303 @@ document.addEventListener('keydown', (e) => {
|
|||||||
/*!*********************************!*\
|
/*!*********************************!*\
|
||||||
!*** ./src/assets/js/header.js ***!
|
!*** ./src/assets/js/header.js ***!
|
||||||
\*********************************/
|
\*********************************/
|
||||||
//////// start header ////////////
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
|
|
||||||
const header = document.querySelector('header[role="banner"]');
|
|
||||||
const logo = document.querySelector('#block-quartiers-de-demain-logoquartiersdedemain > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > svg:nth-child(1)');
|
|
||||||
const headerNavContainer = document.querySelector('.header_nav_container');
|
|
||||||
const isFirstLoad = !performance.getEntriesByType("navigation")[0].type.includes('back_forward');
|
|
||||||
const isTargetPath = window.location.pathname === '/';
|
|
||||||
|
|
||||||
// Fonction pour démarrer l'animation du logo SVG
|
|
||||||
function startLogoAnimation() {
|
|
||||||
logo.classList.add('animated');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fonction pour arrêter l'animation du logo SVG
|
|
||||||
function stopLogoAnimation() {
|
|
||||||
logo.classList.remove('animated');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vérifier si le header a la classe header--collapse
|
|
||||||
function checkHeaderCollapse() {
|
|
||||||
if (header.classList.contains('header--collapsed')) {
|
|
||||||
stopLogoAnimation();
|
|
||||||
} else if (header.classList.contains('header--collapsed-already')) {
|
|
||||||
stopLogoAnimation();
|
|
||||||
} else {
|
|
||||||
startLogoAnimation();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Appeler la fonction au chargement initial
|
|
||||||
checkHeaderCollapse();
|
|
||||||
|
|
||||||
// Observer les changements de classe sur le header
|
|
||||||
const observer = new MutationObserver(function(mutations) {
|
|
||||||
mutations.forEach(function(mutation) {
|
|
||||||
if (mutation.attributeName === 'class') {
|
|
||||||
checkHeaderCollapse();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
observer.observe(header, { attributes: true });
|
|
||||||
|
|
||||||
|
|
||||||
// Si ce n'est pas la première charge ou si le chemin n'est pas le chemin cible, ajouter la classe immédiatement
|
|
||||||
if (!isFirstLoad || !isTargetPath) {
|
// // document.addEventListener('DOMContentLoaded', function() {
|
||||||
header.classList.add('header--collapsed-already');
|
|
||||||
// logo.classList.remove('animated');
|
// // const header = document.querySelector('header[role="banner"]');
|
||||||
stopLogoAnimation();
|
// // const headerNavContainer = document.querySelector('.header_nav_container');
|
||||||
// } else {
|
|
||||||
// // Sinon, appliquer la transition après un délai
|
// // const threshold = 100;
|
||||||
// setTimeout(() => {
|
// // let lastScrollTop = 0;
|
||||||
// header.classList.add('header--collapsed');
|
// // let isHidden = false;
|
||||||
// }, 5000);
|
// // let introDone = true; // ✅ plus d'intro, donc on considère qu'elle est "déjà finie"
|
||||||
|
|
||||||
|
// // /* -------------------
|
||||||
|
// // Animations nav
|
||||||
|
// // ------------------- */
|
||||||
|
|
||||||
|
// // function slideOut() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateX(0)' },
|
||||||
|
// // { transform: 'translateX(-100%)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = true;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function slideIn() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateX(-100%)' },
|
||||||
|
// // { transform: 'translateX(0)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = false;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function slideDown() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateY(-100%)' },
|
||||||
|
// // { transform: 'translateY(0%)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = false;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function slideUp() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateY(0%)' },
|
||||||
|
// // { transform: 'translateY(-100%)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = true;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function initNavPosition() {
|
||||||
|
// // if (window.pageYOffset <= threshold) {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideDown();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // } else {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideUp();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // /* -------------------
|
||||||
|
// // Scroll / resize header
|
||||||
|
// // ------------------- */
|
||||||
|
|
||||||
|
// // function adjustHeaderHeight() {
|
||||||
|
// // if (window.scrollY > 0) {
|
||||||
|
// // header.classList.add('shrink');
|
||||||
|
// // } else {
|
||||||
|
// // header.classList.remove('shrink');
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function handleScroll() {
|
||||||
|
// // if (!introDone) return; // ici ça passe, introDone = true
|
||||||
|
|
||||||
|
// // let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
|
// // const isMobile = window.innerWidth < 811;
|
||||||
|
|
||||||
|
// // if (scrollTop > threshold && !isHidden) {
|
||||||
|
// // if (isMobile) {
|
||||||
|
// // slideUp();
|
||||||
|
// // } else {
|
||||||
|
// // slideOut();
|
||||||
|
// // }
|
||||||
|
// // } else if (scrollTop <= threshold && isHidden) {
|
||||||
|
// // if (isMobile) {
|
||||||
|
// // slideDown();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function handleTouchAndMouseEnter() {
|
||||||
|
// // if (!introDone) return;
|
||||||
|
|
||||||
|
// // if (isHidden) {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideDown();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function handleTouchAndMouseLeave() {
|
||||||
|
// // if (!introDone) return;
|
||||||
|
|
||||||
|
// // if (lastScrollTop > threshold && !isHidden) {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideUp();
|
||||||
|
// // } else {
|
||||||
|
// // slideOut();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // // ✅ on n'a plus besoin de masquer la nav au début
|
||||||
|
// // if (headerNavContainer) {
|
||||||
|
// // headerNavContainer.style.visibility = 'visible';
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // window.addEventListener('scroll', handleScroll);
|
||||||
|
// // window.addEventListener('scroll', adjustHeaderHeight);
|
||||||
|
|
||||||
|
// // header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||||
|
// // header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// // header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||||
|
// // header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// // // ✅ position initiale de la nav
|
||||||
|
// // initNavPosition();
|
||||||
|
|
||||||
|
// // });
|
||||||
|
|
||||||
|
|
||||||
|
// document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
|
// const header = document.querySelector('header[role="banner"]');
|
||||||
|
// const headerNavContainer = document.querySelector('.header_nav_container');
|
||||||
|
|
||||||
|
// if (!header || !headerNavContainer) return;
|
||||||
|
|
||||||
|
// const threshold = 100;
|
||||||
|
// let lastScrollTop = 0;
|
||||||
|
// let isHidden = false;
|
||||||
|
// let introDone = true; // ✅ pas d'intro, donc direct prêt
|
||||||
|
|
||||||
|
// /* -------------------
|
||||||
|
// Helpers show / hide
|
||||||
|
// ------------------- */
|
||||||
|
|
||||||
|
// function hideNav() {
|
||||||
|
// headerNavContainer.classList.add('nav-hidden');
|
||||||
|
// isHidden = true;
|
||||||
// }
|
// }
|
||||||
} else {
|
|
||||||
// Sinon, appliquer la transition après un délai, sauf si scroll
|
|
||||||
let collapseTimeout = setTimeout(() => {
|
|
||||||
header.classList.add('header--collapsed');
|
|
||||||
}, 5000);
|
|
||||||
|
|
||||||
function interruptCollapseOnScroll() {
|
// function showNav() {
|
||||||
if (!header.classList.contains('header--collapsed')) {
|
// headerNavContainer.classList.remove('nav-hidden');
|
||||||
clearTimeout(collapseTimeout); // annule l'animation
|
// isHidden = false;
|
||||||
header.classList.add('header--collapsed');
|
// }
|
||||||
}
|
|
||||||
window.removeEventListener('scroll', interruptCollapseOnScroll); // une seule fois
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('scroll', interruptCollapseOnScroll);
|
// function isMobile() {
|
||||||
}
|
// return window.innerWidth < 811;
|
||||||
//////////////////////////////////////
|
// }
|
||||||
|
|
||||||
|
// /* -------------------
|
||||||
|
// Position initiale
|
||||||
|
// ------------------- */
|
||||||
|
|
||||||
|
// function initNavPosition() {
|
||||||
|
// if (window.pageYOffset <= threshold) {
|
||||||
|
// showNav(); // en haut de page → nav visible
|
||||||
|
// } else {
|
||||||
|
// if (isMobile()) {
|
||||||
|
// hideNav(); // mobile scrollé → nav cachée
|
||||||
|
// } else {
|
||||||
|
// showNav(); // desktop : nav visible même en bas
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* -------------------
|
||||||
|
// Scroll / resize header
|
||||||
|
// ------------------- */
|
||||||
|
|
||||||
|
// function adjustHeaderHeight() {
|
||||||
|
// if (window.scrollY > 0) {
|
||||||
|
// header.classList.add('shrink');
|
||||||
|
// } else {
|
||||||
|
// header.classList.remove('shrink');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleScroll() {
|
||||||
|
// if (!introDone) return;
|
||||||
|
|
||||||
|
// let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
|
|
||||||
|
// if (scrollTop > threshold && !isHidden) {
|
||||||
|
// // on cache la nav
|
||||||
|
// hideNav();
|
||||||
|
// } else if (scrollTop <= threshold && isHidden) {
|
||||||
|
// // on ré-affiche la nav
|
||||||
|
// showNav();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleTouchAndMouseEnter() {
|
||||||
|
// if (!introDone) return;
|
||||||
|
// if (isHidden) {
|
||||||
|
// showNav();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleTouchAndMouseLeave() {
|
||||||
|
// if (!introDone) return;
|
||||||
|
|
||||||
|
// if (lastScrollTop > threshold && !isHidden) {
|
||||||
|
// hideNav();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Rendre la nav visible (plus de visibility:hidden)
|
||||||
|
// headerNavContainer.style.visibility = 'visible';
|
||||||
|
|
||||||
|
// window.addEventListener('scroll', handleScroll);
|
||||||
|
// window.addEventListener('scroll', adjustHeaderHeight);
|
||||||
|
|
||||||
|
// header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||||
|
// header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||||
|
// header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// // Position de départ
|
||||||
|
// initNavPosition();
|
||||||
|
// adjustHeaderHeight();
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const header = document.querySelector('header[role="banner"]');
|
||||||
|
const headerNavContainer = document.querySelector('.header_nav_container');
|
||||||
|
|
||||||
|
if (!header || !headerNavContainer) return;
|
||||||
|
|
||||||
|
const threshold = 100;
|
||||||
let lastScrollTop = 0;
|
let lastScrollTop = 0;
|
||||||
let threshold = 100; // Change this value as needed
|
let isHidden = false; // au chargement : nav visible
|
||||||
let isHidden = false;
|
|
||||||
|
|
||||||
function slideOut() {
|
function isMobile() {
|
||||||
headerNavContainer.animate([
|
return window.innerWidth < 811;
|
||||||
{ transform: 'translateX(0)' },
|
}
|
||||||
{ transform: 'translateX(-100%)' }
|
|
||||||
], {
|
/* --- helpers --- */
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
function hideNav() {
|
||||||
});
|
headerNavContainer.classList.add('nav-hidden');
|
||||||
isHidden = true;
|
isHidden = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function slideIn() {
|
function showNav() {
|
||||||
headerNavContainer.animate([
|
headerNavContainer.classList.remove('nav-hidden');
|
||||||
{ transform: 'translateX(-100%)' },
|
|
||||||
{ transform: 'translateX(0)' }
|
|
||||||
], {
|
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
|
||||||
});
|
|
||||||
isHidden = false;
|
isHidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function slideDown() {
|
/* --- init : nav visible au chargement --- */
|
||||||
// headerNavContainer.style.display = 'block';
|
|
||||||
headerNavContainer.animate([
|
headerNavContainer.style.visibility = 'visible';
|
||||||
{ transform: 'translateY(0%)' },
|
showNav();
|
||||||
{ transform: 'translateY(+100%)' }
|
|
||||||
], {
|
/* --- shrink header --- */
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
|
||||||
});
|
|
||||||
isHidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function slideUp() {
|
|
||||||
headerNavContainer.animate([
|
|
||||||
{ transform: 'translateY(100%)' },
|
|
||||||
{ transform: 'translateY(0%)' }
|
|
||||||
], {
|
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
|
||||||
}).onfinish = function() {
|
|
||||||
// headerNavContainer.style.display = 'none';
|
|
||||||
};
|
|
||||||
isHidden = true;
|
|
||||||
}
|
|
||||||
// Fonction pour ajuster la hauteur du header lors du défilement
|
|
||||||
function adjustHeaderHeight() {
|
function adjustHeaderHeight() {
|
||||||
if (window.scrollY > 0) {
|
if (window.scrollY > 0) {
|
||||||
header.classList.add('shrink');
|
header.classList.add('shrink');
|
||||||
@@ -979,78 +1090,49 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --- scroll : cache / montre la nav --- */
|
||||||
|
|
||||||
function handleScroll() {
|
function handleScroll() {
|
||||||
let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
const isMobile = window.innerWidth < 811;
|
|
||||||
|
|
||||||
if (scrollTop > threshold && !isHidden) {
|
if (scrollTop > threshold && !isHidden) {
|
||||||
if (isMobile) {
|
// on cache la nav (desktop & mobile)
|
||||||
slideUp();
|
hideNav();
|
||||||
} else {
|
|
||||||
slideOut();
|
|
||||||
}
|
|
||||||
} else if (scrollTop <= threshold && isHidden) {
|
} else if (scrollTop <= threshold && isHidden) {
|
||||||
if (isMobile) {
|
// on la remonte en haut de page
|
||||||
slideDown();
|
showNav();
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||||
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop; // For Mobile or negative scrolling
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTouchAndMouseEnter() {
|
/* --- hover / touch sur le header : on montre la nav --- */
|
||||||
|
|
||||||
|
function handleEnter() {
|
||||||
if (isHidden) {
|
if (isHidden) {
|
||||||
if (window.innerWidth < 811) {
|
showNav();
|
||||||
slideDown();
|
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTouchAndMouseLeave() {
|
function handleLeave() {
|
||||||
if (lastScrollTop > threshold && !isHidden) {
|
if (lastScrollTop > threshold && !isHidden) {
|
||||||
if (window.innerWidth < 811) {
|
hideNav();
|
||||||
slideUp();
|
|
||||||
} else {
|
|
||||||
slideOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('scroll', handleScroll);
|
|
||||||
window.addEventListener('scroll', adjustHeaderHeight);
|
|
||||||
|
|
||||||
// Mouse events for desktop
|
|
||||||
header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
|
||||||
header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
|
||||||
|
|
||||||
// Touch events for tablets and mobile devices
|
|
||||||
header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
|
||||||
header.addEventListener('touchend', handleTouchAndMouseLeave);
|
|
||||||
|
|
||||||
// Initial check to see if we're at the top of the page
|
|
||||||
if (window.pageYOffset <= threshold) {
|
|
||||||
if (window.innerWidth < 811) {
|
|
||||||
slideDown();
|
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (window.innerWidth < 811) {
|
|
||||||
slideUp();
|
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.addEventListener('scroll', handleScroll, { passive: true });
|
||||||
|
window.addEventListener('scroll', adjustHeaderHeight, { passive: true });
|
||||||
|
|
||||||
|
header.addEventListener('mouseenter', handleEnter);
|
||||||
|
header.addEventListener('mouseleave', handleLeave);
|
||||||
|
|
||||||
|
header.addEventListener('touchstart', handleEnter);
|
||||||
|
header.addEventListener('touchend', handleLeave);
|
||||||
|
|
||||||
|
// init
|
||||||
|
adjustHeaderHeight();
|
||||||
});
|
});
|
||||||
|
|
||||||
//////// end header ////////////
|
|
||||||
|
|
||||||
}();
|
}();
|
||||||
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
|
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
|
||||||
!function() {
|
!function() {
|
||||||
@@ -1112,10 +1194,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// ////////////////////// start calendrier home /////////////////////////////////
|
// ////////////////////// start calendrier home /////////////////////////////////
|
||||||
|
|
||||||
// Aller au 9e élément à l'initialisation
|
// // Aller au 9e élément à l'initialisation
|
||||||
$('.__timeline-content').on('init', function(event, slick){
|
// $('.__timeline-content').on('init', function(event, slick){
|
||||||
slick.slickGoTo(11); // Index 8 = 9e item
|
// slick.slickGoTo(11); // Index 8 = 9e item
|
||||||
});
|
// });
|
||||||
|
|
||||||
$('.__timeline-content').slick({
|
$('.__timeline-content').slick({
|
||||||
slidesToShow: 3,
|
slidesToShow: 3,
|
||||||
@@ -1125,6 +1207,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
centerMode: false,
|
centerMode: false,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
infinite: false,
|
infinite: false,
|
||||||
|
initialSlide: 13,
|
||||||
responsive: [
|
responsive: [
|
||||||
{
|
{
|
||||||
breakpoint: 810,
|
breakpoint: 810,
|
||||||
@@ -1135,6 +1218,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
draggable: true,
|
draggable: true,
|
||||||
centerMode: false,
|
centerMode: false,
|
||||||
infinite: false,
|
infinite: false,
|
||||||
|
initialSlide: 13,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
@@ -1147,6 +1231,163 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
|
|
||||||
|
|
||||||
//////////////////////// end Timeline script /////////////////////////////////////////////
|
//////////////////////// end Timeline script /////////////////////////////////////////////
|
||||||
|
})(jQuery, window);
|
||||||
|
}();
|
||||||
|
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
|
||||||
|
!function() {
|
||||||
|
/*!*************************************!*\
|
||||||
|
!*** ./src/assets/js/ressources.js ***!
|
||||||
|
\*************************************/
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* quartiers_de_demain behaviors.
|
||||||
|
*/
|
||||||
|
(function (Drupal) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
Drupal.behaviors.quartiers_de_demain = {
|
||||||
|
attach: function (context, settings) {
|
||||||
|
console.log('It works!');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} (Drupal));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(function($, window) {
|
||||||
|
$(document).ready(function () {
|
||||||
|
/////////////// start class à view-rows-ressources ////////
|
||||||
|
$(".view-rows-wrapper").each(function () {
|
||||||
|
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
||||||
|
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
||||||
|
|
||||||
|
if (classToAdd) {
|
||||||
|
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
||||||
|
}
|
||||||
|
});
|
||||||
|
////////////////// end class à view-rows-wrapper ////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////// start voir plus... ressources ////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// Vérifier si on est sur la page avec l'ID #ressources
|
||||||
|
if ($("#ressources").length > 0) {
|
||||||
|
$(".view-rows-wrapper").each(function () {
|
||||||
|
let container = $(this); // Cible uniquement cette section
|
||||||
|
let items = container.find(".views-row"); // Les éléments à afficher progressivement
|
||||||
|
let visibleCount = 4; // Nombre d'éléments visibles au départ (par défaut)
|
||||||
|
|
||||||
|
// Récupérer la classe `type-XXX`
|
||||||
|
let typeClass = container.attr("class").split(" ").find(cls => cls.startsWith("type-"));
|
||||||
|
let typeName = typeClass ? typeClass.replace("type-", "").replace(/-/g, " ") : "contenu"; // Nettoyer le nom
|
||||||
|
|
||||||
|
// >>> Exception : tout afficher pour type-Galerie-photos (pas de bouton)
|
||||||
|
if (typeClass && typeClass.toLowerCase() === "type-mission-photo") {
|
||||||
|
items.show(); // aucun masquage
|
||||||
|
return; // on sort : pas de "voir plus"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajuster le nombre d'éléments visibles en fonction du type
|
||||||
|
if (typeClass && (typeClass === "type-podcast" || typeClass.toLowerCase() === "type-vidéo")) {
|
||||||
|
visibleCount = 2; // Pour Podcast et Vidéo
|
||||||
|
} else if (typeClass === "type-kit-de-communication") {
|
||||||
|
visibleCount = 1; // Pour Kit de Communication
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si le nombre total d'éléments est inférieur ou égal à la limite, ne pas ajouter le bouton
|
||||||
|
if (items.length <= visibleCount) {
|
||||||
|
return; // Sortir de la boucle
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajouter le bouton dynamiquement après chaque `.view-rows-wrapper`
|
||||||
|
let button = $("<button>")
|
||||||
|
.addClass("voir-plus")
|
||||||
|
.text("Voir plus de " + typeName)
|
||||||
|
.insertAfter(container);
|
||||||
|
|
||||||
|
// Cacher tous les éléments sauf ceux définis par `visibleCount`
|
||||||
|
items.hide().slice(0, visibleCount).show();
|
||||||
|
|
||||||
|
// Action sur le bouton
|
||||||
|
button.on("click", function () {
|
||||||
|
let hiddenItems = container.find(".views-row:hidden").slice(0, 4); // Prochains éléments à afficher
|
||||||
|
|
||||||
|
if ($(this).text().includes("Voir plus")) {
|
||||||
|
hiddenItems.slideDown(); // Afficher avec un effet de glissement
|
||||||
|
|
||||||
|
if (container.find(".views-row:hidden").length === 0) {
|
||||||
|
$(this).text("Voir moins de " + typeName); // Changer le texte du bouton si tout est affiché
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
container.find(".views-row").slice(visibleCount).slideUp(); // Replier les éléments
|
||||||
|
$(this).text("Voir plus de " + typeName); // Revenir à l'état initial
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// slimselect
|
||||||
|
let ressource_type_select = new SlimSelect({
|
||||||
|
select: '#edit-field-type-de-ressource-target-id--2',
|
||||||
|
settings:{
|
||||||
|
placeholderText: 'choisir',
|
||||||
|
searchPlaceholder: 'choisir'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let ressource_motscles_select = new SlimSelect({
|
||||||
|
select: '#edit-field-mots-clefs-target-id--2',
|
||||||
|
settings:{
|
||||||
|
placeholderText: 'choisir',
|
||||||
|
searchPlaceholder: 'choisir'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let ressource_sites_select = new SlimSelect({
|
||||||
|
select: '#edit-field-site-target-id-verf--2',
|
||||||
|
settings:{
|
||||||
|
placeholderText: 'choisir',
|
||||||
|
searchPlaceholder: 'choisir'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(('sites_select'), sites_select);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////// end voir plus... ressources ////////////////////
|
||||||
|
|
||||||
|
///////////////////////// start ressource img clicable mission photo //////////////////////
|
||||||
|
$('.view-rows-wrapper.type-Mission-photo .views-row').each(function () {
|
||||||
|
var $row = $(this);
|
||||||
|
|
||||||
|
// Lien cible : d'abord le titre, sinon "Voir la gallerie photo"
|
||||||
|
var $link = $row.find('.views-field-views-conditional-field-1 a, .views-field-views-conditional-field a').first();
|
||||||
|
|
||||||
|
// L'image
|
||||||
|
var $img = $row.find('.views-field-field-images img').first();
|
||||||
|
|
||||||
|
if ($link.length && $img.length && !$img.data('missionPhotoBound')) {
|
||||||
|
console.log('→ Bind click sur image pour', $link.attr('href'));
|
||||||
|
|
||||||
|
$img.css('cursor', 'pointer');
|
||||||
|
$img.on('click', function () {
|
||||||
|
window.location.href = $link.attr('href');
|
||||||
|
});
|
||||||
|
|
||||||
|
// éviter de binder plusieurs fois (si AJAX / re-init)
|
||||||
|
$img.data('missionPhotoBound', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
///////////////////////// end ressource img clicable mission photo //////////////////////
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
}();
|
}();
|
||||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,128 +1,300 @@
|
|||||||
//////// start header ////////////
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
|
|
||||||
const header = document.querySelector('header[role="banner"]');
|
|
||||||
const logo = document.querySelector('#block-quartiers-de-demain-logoquartiersdedemain > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > svg:nth-child(1)');
|
|
||||||
const headerNavContainer = document.querySelector('.header_nav_container');
|
|
||||||
const isFirstLoad = !performance.getEntriesByType("navigation")[0].type.includes('back_forward');
|
|
||||||
const isTargetPath = window.location.pathname === '/';
|
|
||||||
|
|
||||||
// Fonction pour démarrer l'animation du logo SVG
|
|
||||||
function startLogoAnimation() {
|
|
||||||
logo.classList.add('animated');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fonction pour arrêter l'animation du logo SVG
|
|
||||||
function stopLogoAnimation() {
|
|
||||||
logo.classList.remove('animated');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vérifier si le header a la classe header--collapse
|
|
||||||
function checkHeaderCollapse() {
|
|
||||||
if (header.classList.contains('header--collapsed')) {
|
|
||||||
stopLogoAnimation();
|
|
||||||
} else if (header.classList.contains('header--collapsed-already')) {
|
|
||||||
stopLogoAnimation();
|
|
||||||
} else {
|
|
||||||
startLogoAnimation();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Appeler la fonction au chargement initial
|
|
||||||
checkHeaderCollapse();
|
|
||||||
|
|
||||||
// Observer les changements de classe sur le header
|
|
||||||
const observer = new MutationObserver(function(mutations) {
|
|
||||||
mutations.forEach(function(mutation) {
|
|
||||||
if (mutation.attributeName === 'class') {
|
|
||||||
checkHeaderCollapse();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
observer.observe(header, { attributes: true });
|
|
||||||
|
|
||||||
|
|
||||||
// Si ce n'est pas la première charge ou si le chemin n'est pas le chemin cible, ajouter la classe immédiatement
|
|
||||||
if (!isFirstLoad || !isTargetPath) {
|
// // document.addEventListener('DOMContentLoaded', function() {
|
||||||
header.classList.add('header--collapsed-already');
|
|
||||||
// logo.classList.remove('animated');
|
// // const header = document.querySelector('header[role="banner"]');
|
||||||
stopLogoAnimation();
|
// // const headerNavContainer = document.querySelector('.header_nav_container');
|
||||||
// } else {
|
|
||||||
// // Sinon, appliquer la transition après un délai
|
// // const threshold = 100;
|
||||||
// setTimeout(() => {
|
// // let lastScrollTop = 0;
|
||||||
// header.classList.add('header--collapsed');
|
// // let isHidden = false;
|
||||||
// }, 5000);
|
// // let introDone = true; // ✅ plus d'intro, donc on considère qu'elle est "déjà finie"
|
||||||
|
|
||||||
|
// // /* -------------------
|
||||||
|
// // Animations nav
|
||||||
|
// // ------------------- */
|
||||||
|
|
||||||
|
// // function slideOut() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateX(0)' },
|
||||||
|
// // { transform: 'translateX(-100%)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = true;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function slideIn() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateX(-100%)' },
|
||||||
|
// // { transform: 'translateX(0)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = false;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function slideDown() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateY(-100%)' },
|
||||||
|
// // { transform: 'translateY(0%)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = false;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function slideUp() {
|
||||||
|
// // headerNavContainer.animate([
|
||||||
|
// // { transform: 'translateY(0%)' },
|
||||||
|
// // { transform: 'translateY(-100%)' }
|
||||||
|
// // ], {
|
||||||
|
// // duration: 300,
|
||||||
|
// // fill: 'forwards'
|
||||||
|
// // });
|
||||||
|
// // isHidden = true;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function initNavPosition() {
|
||||||
|
// // if (window.pageYOffset <= threshold) {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideDown();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // } else {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideUp();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // /* -------------------
|
||||||
|
// // Scroll / resize header
|
||||||
|
// // ------------------- */
|
||||||
|
|
||||||
|
// // function adjustHeaderHeight() {
|
||||||
|
// // if (window.scrollY > 0) {
|
||||||
|
// // header.classList.add('shrink');
|
||||||
|
// // } else {
|
||||||
|
// // header.classList.remove('shrink');
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function handleScroll() {
|
||||||
|
// // if (!introDone) return; // ici ça passe, introDone = true
|
||||||
|
|
||||||
|
// // let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
|
// // const isMobile = window.innerWidth < 811;
|
||||||
|
|
||||||
|
// // if (scrollTop > threshold && !isHidden) {
|
||||||
|
// // if (isMobile) {
|
||||||
|
// // slideUp();
|
||||||
|
// // } else {
|
||||||
|
// // slideOut();
|
||||||
|
// // }
|
||||||
|
// // } else if (scrollTop <= threshold && isHidden) {
|
||||||
|
// // if (isMobile) {
|
||||||
|
// // slideDown();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function handleTouchAndMouseEnter() {
|
||||||
|
// // if (!introDone) return;
|
||||||
|
|
||||||
|
// // if (isHidden) {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideDown();
|
||||||
|
// // } else {
|
||||||
|
// // slideIn();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function handleTouchAndMouseLeave() {
|
||||||
|
// // if (!introDone) return;
|
||||||
|
|
||||||
|
// // if (lastScrollTop > threshold && !isHidden) {
|
||||||
|
// // if (window.innerWidth < 811) {
|
||||||
|
// // slideUp();
|
||||||
|
// // } else {
|
||||||
|
// // slideOut();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // // ✅ on n'a plus besoin de masquer la nav au début
|
||||||
|
// // if (headerNavContainer) {
|
||||||
|
// // headerNavContainer.style.visibility = 'visible';
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // window.addEventListener('scroll', handleScroll);
|
||||||
|
// // window.addEventListener('scroll', adjustHeaderHeight);
|
||||||
|
|
||||||
|
// // header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||||
|
// // header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// // header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||||
|
// // header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// // // ✅ position initiale de la nav
|
||||||
|
// // initNavPosition();
|
||||||
|
|
||||||
|
// // });
|
||||||
|
|
||||||
|
|
||||||
|
// document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
|
// const header = document.querySelector('header[role="banner"]');
|
||||||
|
// const headerNavContainer = document.querySelector('.header_nav_container');
|
||||||
|
|
||||||
|
// if (!header || !headerNavContainer) return;
|
||||||
|
|
||||||
|
// const threshold = 100;
|
||||||
|
// let lastScrollTop = 0;
|
||||||
|
// let isHidden = false;
|
||||||
|
// let introDone = true; // ✅ pas d'intro, donc direct prêt
|
||||||
|
|
||||||
|
// /* -------------------
|
||||||
|
// Helpers show / hide
|
||||||
|
// ------------------- */
|
||||||
|
|
||||||
|
// function hideNav() {
|
||||||
|
// headerNavContainer.classList.add('nav-hidden');
|
||||||
|
// isHidden = true;
|
||||||
// }
|
// }
|
||||||
} else {
|
|
||||||
// Sinon, appliquer la transition après un délai, sauf si scroll
|
|
||||||
let collapseTimeout = setTimeout(() => {
|
|
||||||
header.classList.add('header--collapsed');
|
|
||||||
}, 5000);
|
|
||||||
|
|
||||||
function interruptCollapseOnScroll() {
|
// function showNav() {
|
||||||
if (!header.classList.contains('header--collapsed')) {
|
// headerNavContainer.classList.remove('nav-hidden');
|
||||||
clearTimeout(collapseTimeout); // annule l'animation
|
// isHidden = false;
|
||||||
header.classList.add('header--collapsed');
|
// }
|
||||||
}
|
|
||||||
window.removeEventListener('scroll', interruptCollapseOnScroll); // une seule fois
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('scroll', interruptCollapseOnScroll);
|
// function isMobile() {
|
||||||
}
|
// return window.innerWidth < 811;
|
||||||
//////////////////////////////////////
|
// }
|
||||||
|
|
||||||
|
// /* -------------------
|
||||||
|
// Position initiale
|
||||||
|
// ------------------- */
|
||||||
|
|
||||||
|
// function initNavPosition() {
|
||||||
|
// if (window.pageYOffset <= threshold) {
|
||||||
|
// showNav(); // en haut de page → nav visible
|
||||||
|
// } else {
|
||||||
|
// if (isMobile()) {
|
||||||
|
// hideNav(); // mobile scrollé → nav cachée
|
||||||
|
// } else {
|
||||||
|
// showNav(); // desktop : nav visible même en bas
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* -------------------
|
||||||
|
// Scroll / resize header
|
||||||
|
// ------------------- */
|
||||||
|
|
||||||
|
// function adjustHeaderHeight() {
|
||||||
|
// if (window.scrollY > 0) {
|
||||||
|
// header.classList.add('shrink');
|
||||||
|
// } else {
|
||||||
|
// header.classList.remove('shrink');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleScroll() {
|
||||||
|
// if (!introDone) return;
|
||||||
|
|
||||||
|
// let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
|
|
||||||
|
// if (scrollTop > threshold && !isHidden) {
|
||||||
|
// // on cache la nav
|
||||||
|
// hideNav();
|
||||||
|
// } else if (scrollTop <= threshold && isHidden) {
|
||||||
|
// // on ré-affiche la nav
|
||||||
|
// showNav();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleTouchAndMouseEnter() {
|
||||||
|
// if (!introDone) return;
|
||||||
|
// if (isHidden) {
|
||||||
|
// showNav();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function handleTouchAndMouseLeave() {
|
||||||
|
// if (!introDone) return;
|
||||||
|
|
||||||
|
// if (lastScrollTop > threshold && !isHidden) {
|
||||||
|
// hideNav();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Rendre la nav visible (plus de visibility:hidden)
|
||||||
|
// headerNavContainer.style.visibility = 'visible';
|
||||||
|
|
||||||
|
// window.addEventListener('scroll', handleScroll);
|
||||||
|
// window.addEventListener('scroll', adjustHeaderHeight);
|
||||||
|
|
||||||
|
// header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||||
|
// header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||||
|
// header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||||
|
|
||||||
|
// // Position de départ
|
||||||
|
// initNavPosition();
|
||||||
|
// adjustHeaderHeight();
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const header = document.querySelector('header[role="banner"]');
|
||||||
|
const headerNavContainer = document.querySelector('.header_nav_container');
|
||||||
|
|
||||||
|
if (!header || !headerNavContainer) return;
|
||||||
|
|
||||||
|
const threshold = 100;
|
||||||
let lastScrollTop = 0;
|
let lastScrollTop = 0;
|
||||||
let threshold = 100; // Change this value as needed
|
let isHidden = false; // au chargement : nav visible
|
||||||
let isHidden = false;
|
|
||||||
|
|
||||||
function slideOut() {
|
function isMobile() {
|
||||||
headerNavContainer.animate([
|
return window.innerWidth < 811;
|
||||||
{ transform: 'translateX(0)' },
|
}
|
||||||
{ transform: 'translateX(-100%)' }
|
|
||||||
], {
|
/* --- helpers --- */
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
function hideNav() {
|
||||||
});
|
headerNavContainer.classList.add('nav-hidden');
|
||||||
isHidden = true;
|
isHidden = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function slideIn() {
|
function showNav() {
|
||||||
headerNavContainer.animate([
|
headerNavContainer.classList.remove('nav-hidden');
|
||||||
{ transform: 'translateX(-100%)' },
|
|
||||||
{ transform: 'translateX(0)' }
|
|
||||||
], {
|
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
|
||||||
});
|
|
||||||
isHidden = false;
|
isHidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function slideDown() {
|
/* --- init : nav visible au chargement --- */
|
||||||
// headerNavContainer.style.display = 'block';
|
|
||||||
headerNavContainer.animate([
|
headerNavContainer.style.visibility = 'visible';
|
||||||
{ transform: 'translateY(0%)' },
|
showNav();
|
||||||
{ transform: 'translateY(+100%)' }
|
|
||||||
], {
|
/* --- shrink header --- */
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
|
||||||
});
|
|
||||||
isHidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function slideUp() {
|
|
||||||
headerNavContainer.animate([
|
|
||||||
{ transform: 'translateY(100%)' },
|
|
||||||
{ transform: 'translateY(0%)' }
|
|
||||||
], {
|
|
||||||
duration: 300,
|
|
||||||
fill: 'forwards'
|
|
||||||
}).onfinish = function() {
|
|
||||||
// headerNavContainer.style.display = 'none';
|
|
||||||
};
|
|
||||||
isHidden = true;
|
|
||||||
}
|
|
||||||
// Fonction pour ajuster la hauteur du header lors du défilement
|
|
||||||
function adjustHeaderHeight() {
|
function adjustHeaderHeight() {
|
||||||
if (window.scrollY > 0) {
|
if (window.scrollY > 0) {
|
||||||
header.classList.add('shrink');
|
header.classList.add('shrink');
|
||||||
@@ -131,75 +303,45 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --- scroll : cache / montre la nav --- */
|
||||||
|
|
||||||
function handleScroll() {
|
function handleScroll() {
|
||||||
let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||||
const isMobile = window.innerWidth < 811;
|
|
||||||
|
|
||||||
if (scrollTop > threshold && !isHidden) {
|
if (scrollTop > threshold && !isHidden) {
|
||||||
if (isMobile) {
|
// on cache la nav (desktop & mobile)
|
||||||
slideUp();
|
hideNav();
|
||||||
} else {
|
|
||||||
slideOut();
|
|
||||||
}
|
|
||||||
} else if (scrollTop <= threshold && isHidden) {
|
} else if (scrollTop <= threshold && isHidden) {
|
||||||
if (isMobile) {
|
// on la remonte en haut de page
|
||||||
slideDown();
|
showNav();
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||||
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop; // For Mobile or negative scrolling
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTouchAndMouseEnter() {
|
/* --- hover / touch sur le header : on montre la nav --- */
|
||||||
|
|
||||||
|
function handleEnter() {
|
||||||
if (isHidden) {
|
if (isHidden) {
|
||||||
if (window.innerWidth < 811) {
|
showNav();
|
||||||
slideDown();
|
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTouchAndMouseLeave() {
|
function handleLeave() {
|
||||||
if (lastScrollTop > threshold && !isHidden) {
|
if (lastScrollTop > threshold && !isHidden) {
|
||||||
if (window.innerWidth < 811) {
|
hideNav();
|
||||||
slideUp();
|
|
||||||
} else {
|
|
||||||
slideOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('scroll', handleScroll);
|
|
||||||
window.addEventListener('scroll', adjustHeaderHeight);
|
|
||||||
|
|
||||||
// Mouse events for desktop
|
|
||||||
header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
|
||||||
header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
|
||||||
|
|
||||||
// Touch events for tablets and mobile devices
|
|
||||||
header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
|
||||||
header.addEventListener('touchend', handleTouchAndMouseLeave);
|
|
||||||
|
|
||||||
// Initial check to see if we're at the top of the page
|
|
||||||
if (window.pageYOffset <= threshold) {
|
|
||||||
if (window.innerWidth < 811) {
|
|
||||||
slideDown();
|
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (window.innerWidth < 811) {
|
|
||||||
slideUp();
|
|
||||||
} else {
|
|
||||||
slideIn();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.addEventListener('scroll', handleScroll, { passive: true });
|
||||||
|
window.addEventListener('scroll', adjustHeaderHeight, { passive: true });
|
||||||
|
|
||||||
|
header.addEventListener('mouseenter', handleEnter);
|
||||||
|
header.addEventListener('mouseleave', handleLeave);
|
||||||
|
|
||||||
|
header.addEventListener('touchstart', handleEnter);
|
||||||
|
header.addEventListener('touchend', handleLeave);
|
||||||
|
|
||||||
|
// init
|
||||||
|
adjustHeaderHeight();
|
||||||
});
|
});
|
||||||
|
|
||||||
//////// end header ////////////
|
|
||||||
|
|
||||||
@@ -294,6 +294,8 @@ if (documentsLiensWrapper && blockRegionThird) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// start langswitcher position responsive//////////////////////
|
/////////////////// start langswitcher position responsive//////////////////////
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
|
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
|
||||||
@@ -320,109 +322,7 @@ window.addEventListener("resize", moveLanguageSwitcher);
|
|||||||
/////////////////// end langswitcher position responsive///////////////////////////////////////////////////////////
|
/////////////////// end langswitcher position responsive///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////// start class à view-rows-ressources ////////
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(".view-rows-wrapper").each(function () {
|
|
||||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
|
||||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
|
||||||
|
|
||||||
if (classToAdd) {
|
|
||||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
////////////////// end class à view-rows-wrapper ////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// start voir plus... ressources ////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// Vérifier si on est sur la page avec l'ID #ressources
|
|
||||||
if ($("#ressources").length > 0) {
|
|
||||||
$(".view-rows-wrapper").each(function () {
|
|
||||||
let container = $(this); // Cible uniquement cette section
|
|
||||||
let items = container.find(".views-row"); // Les éléments à afficher progressivement
|
|
||||||
let visibleCount = 4; // Nombre d'éléments visibles au départ (par défaut)
|
|
||||||
|
|
||||||
// Récupérer la classe `type-XXX`
|
|
||||||
let typeClass = container.attr("class").split(" ").find(cls => cls.startsWith("type-"));
|
|
||||||
let typeName = typeClass ? typeClass.replace("type-", "").replace(/-/g, " ") : "contenu"; // Nettoyer le nom
|
|
||||||
|
|
||||||
// >>> Exception : tout afficher pour type-Galerie-photos (pas de bouton)
|
|
||||||
if (typeClass && typeClass.toLowerCase() === "type-mission-photo") {
|
|
||||||
items.show(); // aucun masquage
|
|
||||||
return; // on sort : pas de "voir plus"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ajuster le nombre d'éléments visibles en fonction du type
|
|
||||||
if (typeClass && (typeClass === "type-podcast" || typeClass.toLowerCase() === "type-vidéo")) {
|
|
||||||
visibleCount = 2; // Pour Podcast et Vidéo
|
|
||||||
} else if (typeClass === "type-kit-de-communication") {
|
|
||||||
visibleCount = 1; // Pour Kit de Communication
|
|
||||||
}
|
|
||||||
|
|
||||||
// Si le nombre total d'éléments est inférieur ou égal à la limite, ne pas ajouter le bouton
|
|
||||||
if (items.length <= visibleCount) {
|
|
||||||
return; // Sortir de la boucle
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ajouter le bouton dynamiquement après chaque `.view-rows-wrapper`
|
|
||||||
let button = $("<button>")
|
|
||||||
.addClass("voir-plus")
|
|
||||||
.text("Voir plus de " + typeName)
|
|
||||||
.insertAfter(container);
|
|
||||||
|
|
||||||
// Cacher tous les éléments sauf ceux définis par `visibleCount`
|
|
||||||
items.hide().slice(0, visibleCount).show();
|
|
||||||
|
|
||||||
// Action sur le bouton
|
|
||||||
button.on("click", function () {
|
|
||||||
let hiddenItems = container.find(".views-row:hidden").slice(0, 4); // Prochains éléments à afficher
|
|
||||||
|
|
||||||
if ($(this).text().includes("Voir plus")) {
|
|
||||||
hiddenItems.slideDown(); // Afficher avec un effet de glissement
|
|
||||||
|
|
||||||
if (container.find(".views-row:hidden").length === 0) {
|
|
||||||
$(this).text("Voir moins de " + typeName); // Changer le texte du bouton si tout est affiché
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
container.find(".views-row").slice(visibleCount).slideUp(); // Replier les éléments
|
|
||||||
$(this).text("Voir plus de " + typeName); // Revenir à l'état initial
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// slimselect
|
|
||||||
let ressource_type_select = new SlimSelect({
|
|
||||||
select: '#edit-field-type-de-ressource-target-id--2',
|
|
||||||
settings:{
|
|
||||||
placeholderText: 'choisir',
|
|
||||||
searchPlaceholder: 'choisir'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let ressource_motscles_select = new SlimSelect({
|
|
||||||
select: '#edit-field-mots-clefs-target-id--2',
|
|
||||||
settings:{
|
|
||||||
placeholderText: 'choisir',
|
|
||||||
searchPlaceholder: 'choisir'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let ressource_sites_select = new SlimSelect({
|
|
||||||
select: '#edit-field-site-target-id-verf--2',
|
|
||||||
settings:{
|
|
||||||
placeholderText: 'choisir',
|
|
||||||
searchPlaceholder: 'choisir'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// console.log(('sites_select'), sites_select);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// end voir plus... ressources ////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////// start voir plus... actualite dans /actualites & /home ////////////////////
|
/////////////////// start voir plus... actualite dans /actualites & /home ////////////////////
|
||||||
@@ -441,27 +341,32 @@ if ($("#actualites").length > 0 || $("#home").length > 0) {
|
|||||||
.addClass("toggle-actualite")
|
.addClass("toggle-actualite")
|
||||||
.insertAfter(article);
|
.insertAfter(article);
|
||||||
|
|
||||||
// Fonction commune
|
// Fonction de toggle (à utiliser partout)
|
||||||
function toggleActu() {
|
function toggleActu() {
|
||||||
body.slideToggle();
|
body.slideToggle();
|
||||||
links.slideToggle();
|
links.slideToggle();
|
||||||
toggleButton.toggleClass("open");
|
toggleButton.toggleClass("open");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clic sur la flèche
|
// Clic sur le bouton
|
||||||
toggleButton.on("click", function (e) {
|
toggleButton.on("click", function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
toggleActu();
|
toggleActu();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Clic n'importe où sur le node
|
// Clic sur le node entier sauf liens
|
||||||
article.on("click", function (e) {
|
article.on("click", function (e) {
|
||||||
// Ne rien faire si clic sur un lien
|
|
||||||
if ($(e.target).closest("a").length) {
|
if ($(e.target).closest("a").length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toggleActu();
|
toggleActu();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 👉 Clic aussi sur le H2
|
||||||
|
article.find("h2").on("click", function (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
toggleActu();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// slimselect
|
// slimselect
|
||||||
@@ -500,18 +405,6 @@ if ($("#actualites").length > 0 || $("#home").length > 0) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////// start class à view-rows-ressources ////////
|
|
||||||
|
|
||||||
$(".view-rows-wrapper").each(function () {
|
|
||||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
|
||||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
|
||||||
|
|
||||||
if (classToAdd) {
|
|
||||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
|
||||||
}
|
|
||||||
});
|
|
||||||
////////////////// end class à view-rows-wrapper ////////////////
|
|
||||||
|
|
||||||
//////////////start toggle partenaire //////////////////
|
//////////////start toggle partenaire //////////////////
|
||||||
|
|
||||||
$(".node-type-partenaire").each(function () {
|
$(".node-type-partenaire").each(function () {
|
||||||
@@ -540,38 +433,82 @@ if ($("#actualites").length > 0 || $("#home").length > 0) {
|
|||||||
|
|
||||||
|
|
||||||
////////////// start toggle page node projet //////////////////
|
////////////// start toggle page node projet //////////////////
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
|
||||||
const photo = document.querySelector('.field_field_equipe_photo');
|
const photo = document.querySelector('.field_field_equipe_photo');
|
||||||
const pres = document.querySelector('.field_field_equipe_presentation');
|
const pres = document.querySelector('.field_field_equipe_presentation');
|
||||||
|
|
||||||
if (!pres) return;
|
if (!photo || !pres) return;
|
||||||
|
|
||||||
// Création du bouton
|
// 🔒 Forcer l'état FERMÉ au chargement
|
||||||
|
photo.classList.remove('is-open');
|
||||||
|
pres.classList.remove('is-open');
|
||||||
|
|
||||||
|
// 1. Créer un wrapper autour de photo + présentation
|
||||||
|
const panel = document.createElement('div');
|
||||||
|
panel.className = 'equipe-panel';
|
||||||
|
|
||||||
|
// Insérer le panel avant la photo, puis y déplacer photo + pres
|
||||||
|
photo.parentNode.insertBefore(panel, photo);
|
||||||
|
panel.appendChild(photo);
|
||||||
|
panel.appendChild(pres);
|
||||||
|
|
||||||
|
// 2. Préparer le panel pour l'animation
|
||||||
|
panel.style.overflow = 'hidden';
|
||||||
|
panel.style.maxHeight = '0px';
|
||||||
|
|
||||||
|
// 3. Création du bouton
|
||||||
const btn = document.createElement('button');
|
const btn = document.createElement('button');
|
||||||
btn.className = 'btn-equipe-toggle';
|
btn.className = 'btn-equipe-toggle';
|
||||||
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||||
btn.setAttribute('aria-expanded', false);
|
btn.setAttribute('aria-expanded', 'false');
|
||||||
|
|
||||||
// Insertion du bouton juste après le bloc présentation
|
// Insertion du bouton juste après le panel (et plus après "pres")
|
||||||
pres.insertAdjacentElement('afterend', btn);
|
panel.insertAdjacentElement('afterend', btn);
|
||||||
|
|
||||||
// 3. Ajout de la ligne après le bouton
|
// Ligne de séparation après le bouton
|
||||||
const separator = document.createElement('div');
|
const separator = document.createElement('div');
|
||||||
separator.className = 'equipe-separator';
|
separator.className = 'equipe-separator';
|
||||||
btn.insertAdjacentElement('afterend', separator);
|
btn.insertAdjacentElement('afterend', separator);
|
||||||
|
|
||||||
// Toggle
|
// --- Fonctions ouverture / fermeture ---
|
||||||
|
|
||||||
|
function openPanel() {
|
||||||
|
panel.classList.add('is-open');
|
||||||
|
photo.classList.add('is-open');
|
||||||
|
pres.classList.add('is-open');
|
||||||
|
|
||||||
|
const fullHeight = panel.scrollHeight; // inclut photo + texte
|
||||||
|
panel.style.maxHeight = fullHeight + 'px';
|
||||||
|
|
||||||
|
btn.textContent = "FERMER LA PRÉSENTATION DE L'ÉQUIPE";
|
||||||
|
btn.setAttribute('aria-expanded', 'true');
|
||||||
|
}
|
||||||
|
|
||||||
|
function closePanel() {
|
||||||
|
const fullHeight = panel.scrollHeight;
|
||||||
|
panel.style.maxHeight = fullHeight + 'px';
|
||||||
|
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
panel.style.maxHeight = '0px';
|
||||||
|
panel.classList.remove('is-open');
|
||||||
|
photo.classList.remove('is-open');
|
||||||
|
pres.classList.remove('is-open');
|
||||||
|
});
|
||||||
|
|
||||||
|
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||||
|
btn.setAttribute('aria-expanded', 'false');
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Toggle bouton ---
|
||||||
btn.addEventListener('click', function () {
|
btn.addEventListener('click', function () {
|
||||||
const isOpen = pres.classList.toggle('is-open');
|
const isOpen = btn.getAttribute('aria-expanded') === 'true';
|
||||||
|
if (isOpen) {
|
||||||
if (photo) photo.classList.toggle('is-open');
|
closePanel();
|
||||||
|
} else {
|
||||||
btn.textContent = isOpen
|
openPanel();
|
||||||
? "FERMER LA PRÉSENTATION DE L'ÉQUIPE"
|
}
|
||||||
: "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
|
||||||
|
|
||||||
btn.setAttribute('aria-expanded', isOpen);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -581,6 +518,8 @@ btn.insertAdjacentElement('afterend', separator);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* quartiers_de_demain behaviors.
|
||||||
|
*/
|
||||||
|
(function (Drupal) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
Drupal.behaviors.quartiers_de_demain = {
|
||||||
|
attach: function (context, settings) {
|
||||||
|
console.log('It works!');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} (Drupal));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(function($, window) {
|
||||||
|
$(document).ready(function () {
|
||||||
|
/////////////// start class à view-rows-ressources ////////
|
||||||
|
$(".view-rows-wrapper").each(function () {
|
||||||
|
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
||||||
|
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
||||||
|
|
||||||
|
if (classToAdd) {
|
||||||
|
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
||||||
|
}
|
||||||
|
});
|
||||||
|
////////////////// end class à view-rows-wrapper ////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////// start voir plus... ressources ////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// Vérifier si on est sur la page avec l'ID #ressources
|
||||||
|
if ($("#ressources").length > 0) {
|
||||||
|
$(".view-rows-wrapper").each(function () {
|
||||||
|
let container = $(this); // Cible uniquement cette section
|
||||||
|
let items = container.find(".views-row"); // Les éléments à afficher progressivement
|
||||||
|
let visibleCount = 4; // Nombre d'éléments visibles au départ (par défaut)
|
||||||
|
|
||||||
|
// Récupérer la classe `type-XXX`
|
||||||
|
let typeClass = container.attr("class").split(" ").find(cls => cls.startsWith("type-"));
|
||||||
|
let typeName = typeClass ? typeClass.replace("type-", "").replace(/-/g, " ") : "contenu"; // Nettoyer le nom
|
||||||
|
|
||||||
|
// >>> Exception : tout afficher pour type-Galerie-photos (pas de bouton)
|
||||||
|
if (typeClass && typeClass.toLowerCase() === "type-mission-photo") {
|
||||||
|
items.show(); // aucun masquage
|
||||||
|
return; // on sort : pas de "voir plus"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajuster le nombre d'éléments visibles en fonction du type
|
||||||
|
if (typeClass && (typeClass === "type-podcast" || typeClass.toLowerCase() === "type-vidéo")) {
|
||||||
|
visibleCount = 2; // Pour Podcast et Vidéo
|
||||||
|
} else if (typeClass === "type-kit-de-communication") {
|
||||||
|
visibleCount = 1; // Pour Kit de Communication
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si le nombre total d'éléments est inférieur ou égal à la limite, ne pas ajouter le bouton
|
||||||
|
if (items.length <= visibleCount) {
|
||||||
|
return; // Sortir de la boucle
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajouter le bouton dynamiquement après chaque `.view-rows-wrapper`
|
||||||
|
let button = $("<button>")
|
||||||
|
.addClass("voir-plus")
|
||||||
|
.text("Voir plus de " + typeName)
|
||||||
|
.insertAfter(container);
|
||||||
|
|
||||||
|
// Cacher tous les éléments sauf ceux définis par `visibleCount`
|
||||||
|
items.hide().slice(0, visibleCount).show();
|
||||||
|
|
||||||
|
// Action sur le bouton
|
||||||
|
button.on("click", function () {
|
||||||
|
let hiddenItems = container.find(".views-row:hidden").slice(0, 4); // Prochains éléments à afficher
|
||||||
|
|
||||||
|
if ($(this).text().includes("Voir plus")) {
|
||||||
|
hiddenItems.slideDown(); // Afficher avec un effet de glissement
|
||||||
|
|
||||||
|
if (container.find(".views-row:hidden").length === 0) {
|
||||||
|
$(this).text("Voir moins de " + typeName); // Changer le texte du bouton si tout est affiché
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
container.find(".views-row").slice(visibleCount).slideUp(); // Replier les éléments
|
||||||
|
$(this).text("Voir plus de " + typeName); // Revenir à l'état initial
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// slimselect
|
||||||
|
let ressource_type_select = new SlimSelect({
|
||||||
|
select: '#edit-field-type-de-ressource-target-id--2',
|
||||||
|
settings:{
|
||||||
|
placeholderText: 'choisir',
|
||||||
|
searchPlaceholder: 'choisir'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let ressource_motscles_select = new SlimSelect({
|
||||||
|
select: '#edit-field-mots-clefs-target-id--2',
|
||||||
|
settings:{
|
||||||
|
placeholderText: 'choisir',
|
||||||
|
searchPlaceholder: 'choisir'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let ressource_sites_select = new SlimSelect({
|
||||||
|
select: '#edit-field-site-target-id-verf--2',
|
||||||
|
settings:{
|
||||||
|
placeholderText: 'choisir',
|
||||||
|
searchPlaceholder: 'choisir'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(('sites_select'), sites_select);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////// end voir plus... ressources ////////////////////
|
||||||
|
|
||||||
|
///////////////////////// start ressource img clicable mission photo //////////////////////
|
||||||
|
$('.view-rows-wrapper.type-Mission-photo .views-row').each(function () {
|
||||||
|
var $row = $(this);
|
||||||
|
|
||||||
|
// Lien cible : d'abord le titre, sinon "Voir la gallerie photo"
|
||||||
|
var $link = $row.find('.views-field-views-conditional-field-1 a, .views-field-views-conditional-field a').first();
|
||||||
|
|
||||||
|
// L'image
|
||||||
|
var $img = $row.find('.views-field-field-images img').first();
|
||||||
|
|
||||||
|
if ($link.length && $img.length && !$img.data('missionPhotoBound')) {
|
||||||
|
console.log('→ Bind click sur image pour', $link.attr('href'));
|
||||||
|
|
||||||
|
$img.css('cursor', 'pointer');
|
||||||
|
$img.on('click', function () {
|
||||||
|
window.location.href = $link.attr('href');
|
||||||
|
});
|
||||||
|
|
||||||
|
// éviter de binder plusieurs fois (si AJAX / re-init)
|
||||||
|
$img.data('missionPhotoBound', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
///////////////////////// end ressource img clicable mission photo //////////////////////
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})(jQuery, window);
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// ////////////////////// start calendrier home /////////////////////////////////
|
// ////////////////////// start calendrier home /////////////////////////////////
|
||||||
|
|
||||||
// Aller au 9e élément à l'initialisation
|
// // Aller au 9e élément à l'initialisation
|
||||||
$('.__timeline-content').on('init', function(event, slick){
|
// $('.__timeline-content').on('init', function(event, slick){
|
||||||
slick.slickGoTo(11); // Index 8 = 9e item
|
// slick.slickGoTo(11); // Index 8 = 9e item
|
||||||
});
|
// });
|
||||||
|
|
||||||
$('.__timeline-content').slick({
|
$('.__timeline-content').slick({
|
||||||
slidesToShow: 3,
|
slidesToShow: 3,
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
centerMode: false,
|
centerMode: false,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
infinite: false,
|
infinite: false,
|
||||||
|
initialSlide: 13,
|
||||||
responsive: [
|
responsive: [
|
||||||
{
|
{
|
||||||
breakpoint: 810,
|
breakpoint: 810,
|
||||||
@@ -76,6 +77,7 @@
|
|||||||
draggable: true,
|
draggable: true,
|
||||||
centerMode: false,
|
centerMode: false,
|
||||||
infinite: false,
|
infinite: false,
|
||||||
|
initialSlide: 13,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -64,13 +64,13 @@
|
|||||||
}
|
}
|
||||||
.field_body{ ///// texte de présentation
|
.field_body{ ///// texte de présentation
|
||||||
// width: 80%;
|
// width: 80%;
|
||||||
width: 65%;
|
width: 60%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap ;
|
flex-wrap: wrap ;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 14rem;
|
margin-left: 15rem;
|
||||||
@media(max-width: 1090px){
|
@media(max-width: 1090px){
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ main{
|
|||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
font-size: 0.4rem;
|
font-size: 0.4rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
transition: transform 0.4s ease-in-out;
|
transition: transform 0.4s ease-in-out;
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
@@ -171,11 +174,11 @@ main{
|
|||||||
transform: scale(1.05); /* effet de zoom léger */
|
transform: scale(1.05); /* effet de zoom léger */
|
||||||
}
|
}
|
||||||
position: relative;
|
position: relative;
|
||||||
&:has(.laureat:not(:empty)){
|
&.is-laureat{
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
&:has(.laureat:not(:empty))::before {
|
&.is-laureat::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
// display: block;
|
// display: block;
|
||||||
@@ -220,6 +223,9 @@ main{
|
|||||||
margin-bottom: 0.3rem;
|
margin-bottom: 0.3rem;
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
font-family: "gilroy-bold";
|
font-family: "gilroy-bold";
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.field_field_nom_de_l_equipe{
|
.field_field_nom_de_l_equipe{
|
||||||
order: 4;
|
order: 4;
|
||||||
@@ -227,6 +233,9 @@ main{
|
|||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.field_field_intro{
|
.field_field_intro{
|
||||||
|
|||||||
@@ -44,9 +44,9 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
width: 50% !important;
|
// width: 50% !important;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
margin-top: 3rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.field_field_site_projet{
|
.field_field_site_projet{
|
||||||
@@ -54,10 +54,20 @@
|
|||||||
width: 65%;
|
width: 65%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding-left: 2rem;
|
padding-left: 2rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
padding-left: 0rem;
|
||||||
|
width: 80%;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
.field_title{
|
.field_title{
|
||||||
h2{
|
h2{
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
font-size: 0.60rem;
|
font-size: 0.60rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:1rem;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
a{
|
a{
|
||||||
color: $blue_QDD;
|
color: $blue_QDD;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@@ -67,6 +77,11 @@
|
|||||||
.field_field_sous_titre{
|
.field_field_sous_titre{
|
||||||
p{
|
p{
|
||||||
font-size: 0.55rem;
|
font-size: 0.55rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem ;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.more-link{
|
.more-link{
|
||||||
@@ -76,6 +91,7 @@
|
|||||||
background: black;
|
background: black;
|
||||||
@media (max-width:810px) {
|
@media (max-width:810px) {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
a{
|
a{
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@@ -85,6 +101,9 @@
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
svg{
|
svg{
|
||||||
display: none;
|
display: none;
|
||||||
@@ -123,8 +142,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 2rem;
|
padding-left: 2rem;
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
// margin-left: 2rem;
|
padding-left: 0rem;
|
||||||
// margin-top: 3rem;
|
|
||||||
}
|
}
|
||||||
.field_field_laureats{
|
.field_field_laureats{
|
||||||
|
|
||||||
@@ -141,6 +159,10 @@
|
|||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
left: -1.5rem;
|
||||||
|
top:0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,10 +170,18 @@
|
|||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.field_title{
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
.field_field_nom_de_l_equipe{
|
.field_field_nom_de_l_equipe{
|
||||||
border-top: solid black 1px;
|
border-top: solid black 1px;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.field_field_infos{
|
.field_field_infos{
|
||||||
column-count: 3;
|
column-count: 3;
|
||||||
@@ -164,10 +194,16 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
font-family: 'gilroy-light';
|
font-family: 'gilroy-light';
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.field_field_contenu{
|
.field_field_contenu{
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
font-family: 'gilroy-bold';
|
font-family: 'gilroy-bold';
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,9 +219,15 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
font-family: "gilroy-light";
|
font-family: "gilroy-light";
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
p{
|
p{
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,22 +235,25 @@
|
|||||||
p{
|
p{
|
||||||
font-family: "gilroy-light";
|
font-family: "gilroy-light";
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.field_field_equipe_photo,
|
}
|
||||||
.field_field_equipe_presentation {
|
.equipe-panel {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
margin-top: 1rem;
|
||||||
transition:
|
transition:
|
||||||
max-height 1s ease,
|
max-height 1s ease,
|
||||||
opacity 0.8s ease;
|
opacity 0.8s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.field_field_equipe_photo.is-open,
|
.equipe-panel.is-open {
|
||||||
.field_field_equipe_presentation.is-open {
|
// max-height: 1500px;
|
||||||
max-height: 1000px;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-equipe-toggle{
|
.btn-equipe-toggle{
|
||||||
@@ -222,8 +267,11 @@
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
border: none;
|
border: none;
|
||||||
// padding-top: 0.3rem;
|
// margin-top: 1rem;
|
||||||
// padding-bottom: 0.3rem;
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
svg{
|
svg{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -232,7 +280,6 @@
|
|||||||
content: url("../img/arrow-down-white.svg");
|
content: url("../img/arrow-down-white.svg");
|
||||||
padding-right: 0.2rem;
|
padding-right: 0.2rem;
|
||||||
padding-left: 0.2rem;
|
padding-left: 0.2rem;
|
||||||
// padding-bottom: 0.2rem;
|
|
||||||
height: 12px;
|
height: 12px;
|
||||||
}
|
}
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
@@ -240,6 +287,7 @@
|
|||||||
}
|
}
|
||||||
.btn-equipe-toggle[aria-expanded="true"]::after {
|
.btn-equipe-toggle[aria-expanded="true"]::after {
|
||||||
content: url("../img/arrow-up-white.svg");
|
content: url("../img/arrow-up-white.svg");
|
||||||
|
|
||||||
}
|
}
|
||||||
.equipe-separator {
|
.equipe-separator {
|
||||||
border-bottom: 1px solid black;
|
border-bottom: 1px solid black;
|
||||||
@@ -262,6 +310,9 @@
|
|||||||
p{
|
p{
|
||||||
font-family: "gilroy-light";
|
font-family: "gilroy-light";
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -284,6 +335,10 @@
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
height: 145px;
|
height: 145px;
|
||||||
|
@media (max-width:810px){
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.image-field-caption{
|
.image-field-caption{
|
||||||
@@ -293,6 +348,9 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
font-family: 'gilroy-light';
|
font-family: 'gilroy-light';
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -316,6 +374,9 @@
|
|||||||
color: white;
|
color: white;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
}
|
||||||
svg{
|
svg{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -363,40 +424,50 @@
|
|||||||
flex: 0 1 24%;
|
flex: 0 1 24%;
|
||||||
.block-region-third{
|
.block-region-third{
|
||||||
position:relative;
|
position:relative;
|
||||||
// width: 23% !important;
|
|
||||||
margin-top: 4.5rem;
|
margin-top: 4.5rem;
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
div{
|
div{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: auto;
|
margin-bottom: 0rem;
|
||||||
margin-bottom: 1rem;
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
@media(max-width: 500px){
|
|
||||||
justify-content: center;
|
|
||||||
margin: auto;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
width: fit-content;
|
|
||||||
}
|
}
|
||||||
h2{
|
h2{
|
||||||
|
|
||||||
font-family: "gilroy-light";
|
font-family: "gilroy-light";
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
margin: auto;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
&::after{
|
&::after{
|
||||||
content: " :";
|
content: " :";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.view-rows-wrapper{
|
||||||
|
@media(max-width: 810px){
|
||||||
|
width: 80%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
.views-row{
|
.views-row{
|
||||||
width: 80%;
|
width: 80%;
|
||||||
border-bottom: solid black 1px;
|
border-bottom: solid black 1px;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
width: 80%;
|
||||||
|
justify-content: start;
|
||||||
|
padding-top: 1rem;
|
||||||
|
}
|
||||||
transition: transform 0.4s ease-in-out;
|
transition: transform 0.4s ease-in-out;
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
@@ -417,6 +488,10 @@
|
|||||||
background-size: contain;
|
background-size: contain;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
top: 0rem;
|
||||||
|
// left: -11.4rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.field-content{
|
.field-content{
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
@@ -424,24 +499,38 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.views-field-title {
|
.views-field-title {
|
||||||
|
@media (max-width:810px){
|
||||||
|
width: fit-content;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
margin-bottom: 0rem;
|
margin-bottom: 0rem;
|
||||||
// margin-top: 0.3rem;
|
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
font-family: "gilroy-regular";
|
font-family: "gilroy-regular";
|
||||||
&::after{
|
&::after{
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.views-field-field-nom-de-l-equipe{
|
.views-field-field-nom-de-l-equipe{
|
||||||
|
@media (max-width:810px){
|
||||||
|
width: fit-content;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
h3 {
|
h3 {
|
||||||
margin-bottom: 0.3rem;
|
margin-bottom: 0.3rem;
|
||||||
margin-top:0.3rem;
|
margin-top:0.3rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
font-size: 0.4rem;
|
font-size: 0.4rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.7rem;
|
||||||
|
}
|
||||||
p{
|
p{
|
||||||
font-family: "gilroy-semibold";
|
font-family: "gilroy-semibold";
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
@@ -450,33 +539,10 @@
|
|||||||
}
|
}
|
||||||
.views-field-view-node{
|
.views-field-view-node{
|
||||||
display: none;
|
display: none;
|
||||||
// width: fit-content;
|
|
||||||
// padding-left: 0.5rem;
|
|
||||||
// background: black;
|
|
||||||
// @media (max-width:810px) {
|
|
||||||
// margin-left: 0;
|
|
||||||
// }
|
|
||||||
// a{
|
|
||||||
// display: inline-flex;
|
|
||||||
// justify-content: space-between;
|
|
||||||
// align-items: center;
|
|
||||||
// color: white;
|
|
||||||
// text-transform: uppercase;
|
|
||||||
// font-size: 0.5rem;
|
|
||||||
// svg{
|
|
||||||
// display: none;
|
|
||||||
// }
|
|
||||||
// &::after{
|
|
||||||
// display: inline-flex;
|
|
||||||
// content: url("../img/noun-arrow-to-right.svg");
|
|
||||||
// padding-right: 0.2rem;
|
|
||||||
// padding-left: 0.2rem;
|
|
||||||
// // padding-bottom: 0.2rem;
|
|
||||||
// height: 25px;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.field_field_laureats{
|
.field_field_laureats{
|
||||||
color: red;
|
color: red;
|
||||||
|
|||||||
@@ -13,8 +13,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
.layout__region--first{
|
.layout__region--first{
|
||||||
|
@media(max-width: 810px){
|
||||||
|
order:2
|
||||||
|
}
|
||||||
.block-region-first{
|
.block-region-first{
|
||||||
#sites-map-container{
|
#sites-map-container{
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
@@ -27,6 +31,9 @@
|
|||||||
&::after{
|
&::after{
|
||||||
content: " :";
|
content: " :";
|
||||||
}
|
}
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +54,9 @@
|
|||||||
padding-bottom: 0.2rem;
|
padding-bottom: 0.2rem;
|
||||||
padding-top: 0.2rem;
|
padding-top: 0.2rem;
|
||||||
padding-left: 0.2rem;
|
padding-left: 0.2rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
// svg{
|
// svg{
|
||||||
// display: none;
|
// display: none;
|
||||||
@@ -71,15 +81,21 @@
|
|||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
// width: 60%;
|
// width: 60%;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
order:1;
|
||||||
|
margin-top: 3rem;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
.block-region-second{
|
.block-region-second{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
margin-right: 3rem;
|
margin-right: 3rem;
|
||||||
@media(max-width: 500px){
|
@media(max-width: 810px){
|
||||||
margin-left: 0.5rem;
|
margin-left: 00rem;
|
||||||
margin-top: 1rem;
|
margin-top: 0rem;
|
||||||
|
margin-right: 0rem;
|
||||||
}
|
}
|
||||||
.field_title,
|
.field_title,
|
||||||
.field_field_sous_titre{
|
.field_field_sous_titre{
|
||||||
@@ -219,6 +235,7 @@
|
|||||||
div:has(.field_field_images){
|
div:has(.field_field_images){
|
||||||
order: 10;
|
order: 10;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.diaporama{
|
.diaporama{
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: row !important;
|
flex-direction: row !important;
|
||||||
@@ -231,10 +248,17 @@
|
|||||||
}
|
}
|
||||||
.images{
|
.images{
|
||||||
// margin: auto;
|
// margin: auto;
|
||||||
|
@media (max-width:810px){
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
img{
|
img{
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 220px !important;
|
width: 220px !important;
|
||||||
height: 145px;
|
height: 145px;
|
||||||
|
@media (max-width:810px){
|
||||||
|
width: 100% !important;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.image-field-caption{
|
.image-field-caption{
|
||||||
@@ -244,6 +268,9 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
font-family: 'gilroy-light';
|
font-family: 'gilroy-light';
|
||||||
|
@media (max-width:810px){
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,7 +317,7 @@
|
|||||||
gap: 20px;
|
gap: 20px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
@media(max-width: 500px){
|
@media(max-width: 810px){
|
||||||
flex-direction: column !important;
|
flex-direction: column !important;
|
||||||
}
|
}
|
||||||
.cadre-img-zoom{
|
.cadre-img-zoom{
|
||||||
@@ -326,6 +326,10 @@
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
height: 145px;
|
height: 145px;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.image-field-caption{
|
.image-field-caption{
|
||||||
@@ -335,6 +339,9 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
font-family: 'gilroy-light';
|
font-family: 'gilroy-light';
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -391,24 +398,13 @@
|
|||||||
// width: 80%;
|
// width: 80%;
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin-left: 1rem;
|
||||||
|
margin-top: 3rem;
|
||||||
}
|
}
|
||||||
div{
|
div{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
// margin-bottom: 1rem;
|
|
||||||
@media(max-width: 810px){
|
|
||||||
justify-content: center;
|
|
||||||
margin: auto;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
@media(max-width: 500px){
|
|
||||||
justify-content: center;
|
|
||||||
margin: auto;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
div:has(h2){
|
div:has(h2){
|
||||||
border-bottom: solid black 1px;
|
border-bottom: solid black 1px;
|
||||||
padding-left: 0.3rem;
|
padding-left: 0.3rem;
|
||||||
@@ -423,13 +419,26 @@
|
|||||||
border-bottom: solid black 1px;
|
border-bottom: solid black 1px;
|
||||||
margin-left: 0.5rem;
|
margin-left: 0.5rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
&::after{
|
&::after{
|
||||||
content: " :";
|
content: " :";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.field_field_projets_lie{
|
||||||
|
@media(max-width: 810px){
|
||||||
|
width: 80%;
|
||||||
|
justify-content: start;
|
||||||
|
// padding-top: 1rem;
|
||||||
|
|
||||||
|
}
|
||||||
.node-type-projet {
|
.node-type-projet {
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: transform 0.4s ease-in-out;
|
transition: transform 0.4s ease-in-out;
|
||||||
|
|
||||||
&.is-laureat{
|
&.is-laureat{
|
||||||
padding-top: 1.2rem;
|
padding-top: 1.2rem;
|
||||||
}
|
}
|
||||||
@@ -443,6 +452,10 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #f6f7f3;
|
background-color: #f6f7f3;
|
||||||
font-family: "gilroy-regular";
|
font-family: "gilroy-regular";
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.field_field_nom_de_l_equipe{
|
.field_field_nom_de_l_equipe{
|
||||||
width: 80%;
|
width: 80%;
|
||||||
@@ -450,6 +463,10 @@
|
|||||||
font-size: 0.4rem;
|
font-size: 0.4rem;
|
||||||
background-color: #f6f7f3;
|
background-color: #f6f7f3;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
div{
|
div{
|
||||||
border-bottom: solid black 1px;
|
border-bottom: solid black 1px;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
@@ -459,6 +476,10 @@
|
|||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
font-size:0.8rem;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
div.more-link{
|
div.more-link{
|
||||||
display: none;
|
display: none;
|
||||||
@@ -483,25 +504,24 @@
|
|||||||
&.is-laureat::before {
|
&.is-laureat::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
// display: block;
|
top: -4.2rem;
|
||||||
top: -3rem; // adapte la position selon ton visuel
|
|
||||||
left: -1rem;
|
left: -1rem;
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
// background-color: #f6f7f3;
|
|
||||||
background-image: url("../img/laureat-ouvert.svg");
|
background-image: url("../img/laureat-ouvert.svg");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
|
@media(max-width: 810px){
|
||||||
|
top: -6rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.prevnext{
|
.prevnext{
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content-actus{
|
.content-actus{
|
||||||
|
width: 100%;
|
||||||
.slick-list{
|
.slick-list{
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
|
|
||||||
.view-rows-wrapper{
|
.view-rows-wrapper{
|
||||||
margin-left: 25%;
|
margin-left: 25%;
|
||||||
width: 65%;
|
width: 55%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ header{
|
|||||||
.field_field_logo{
|
.field_field_logo{
|
||||||
.qdd-header{
|
.qdd-header{
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
animation-delay: 0.9s;
|
||||||
|
animation-name: scale;
|
||||||
|
animation-duration: 2.8s;
|
||||||
&.animated{
|
&.animated{
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(2);
|
transform: scale(2);
|
||||||
@@ -12,30 +15,30 @@ header{
|
|||||||
.blink-blue {
|
.blink-blue {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
// animation: blink 3s 3;
|
// animation: blink 3s 3;
|
||||||
animation-delay: 0.2s;
|
animation-delay: 0.1s;
|
||||||
animation-name: blink;
|
animation-name: blink;
|
||||||
animation-duration: 10s;
|
animation-duration: 5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blink-red {
|
.blink-red {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation-delay: 0.8s;
|
animation-delay: 0.3s;
|
||||||
animation-name: blink;
|
animation-name: blink;
|
||||||
animation-duration: 10s;
|
animation-duration: 5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blink-black {
|
.blink-black {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation-delay: 1.5s;
|
animation-delay: 0.5s;
|
||||||
animation-name: blink;
|
animation-name: blink;
|
||||||
animation-duration: 10s;
|
animation-duration: 5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blink-black2 {
|
.blink-black2 {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation-delay: 2s;
|
animation-delay: 0.7s;
|
||||||
animation-name: blink;
|
animation-name: blink;
|
||||||
animation-duration: 10s;
|
animation-duration: 5s;
|
||||||
}
|
}
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
@@ -49,8 +52,8 @@ header{
|
|||||||
.consultation{
|
.consultation{
|
||||||
display: none;
|
display: none;
|
||||||
animation-name: slideIn;
|
animation-name: slideIn;
|
||||||
animation-delay: 1s;
|
animation-delay: 0.5s;
|
||||||
animation-duration: 3s;
|
animation-duration: 1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slideIn {
|
@keyframes slideIn {
|
||||||
@@ -62,15 +65,14 @@ header{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @keyframes scale {
|
@keyframes scale {
|
||||||
// 0%{
|
0%{
|
||||||
// transform: scale(2);
|
transform: scale(2);
|
||||||
// }
|
}
|
||||||
// 90%{transform: scale(2);}
|
100% {
|
||||||
// 100% {
|
transform: scale(1);
|
||||||
// transform: scale(1);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -79,3 +81,5 @@ header{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,401 @@
|
|||||||
|
// /* ===========================
|
||||||
|
// HEADER GLOBAL
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// header[role="banner"] {
|
||||||
|
// position: fixed;
|
||||||
|
// top: 0;
|
||||||
|
// left: 0;
|
||||||
|
// z-index: 99;
|
||||||
|
// max-width: 100vw;
|
||||||
|
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: row;
|
||||||
|
// transform-origin: bottom right;
|
||||||
|
// height: $header-height;
|
||||||
|
// width: 35%;
|
||||||
|
// transition: all 1.4s ease-in-out;
|
||||||
|
|
||||||
|
// @media (max-width: 1090px) {
|
||||||
|
// height: $header-height-pad;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (min-width: 1400px) {
|
||||||
|
// height: $header-height-big;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 170px;
|
||||||
|
// flex-direction: row;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .qdd-header {
|
||||||
|
// opacity: 1 !important;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// LANGUAGE SWITCHER
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// .language-switcher-language-url {
|
||||||
|
// text-transform: uppercase;
|
||||||
|
// color: white;
|
||||||
|
|
||||||
|
// ul {
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: row;
|
||||||
|
// font-size: 0.6rem;
|
||||||
|
// padding: 0;
|
||||||
|
// width: fit-content;
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// font-size: 0.9rem;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// li a {
|
||||||
|
// color: white;
|
||||||
|
// font-family: "gilroy-light";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// li:nth-child(1) {
|
||||||
|
// &::after {
|
||||||
|
// content: " / ";
|
||||||
|
// white-space: pre;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .is-active {
|
||||||
|
// font-family: "gilroy-bold";
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .contextual-region {
|
||||||
|
// width: max-content;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// COLONNE GAUCHE (LOGO)
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// .header_left_container {
|
||||||
|
// flex: 0 0 45%;
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: row;
|
||||||
|
// background-color: $white-header;
|
||||||
|
// transition:
|
||||||
|
// flex-basis 0.9s ease-in-out,
|
||||||
|
// width 0.9s ease-in-out;
|
||||||
|
|
||||||
|
// img {
|
||||||
|
// display: none;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 660px) {
|
||||||
|
// height: inherit;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// #block-quartiers-de-demain-logorepu-2 {
|
||||||
|
// display: none;
|
||||||
|
|
||||||
|
// @media (max-width: 891px) {
|
||||||
|
// height: $header-height-pad;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// #block-quartiers-de-demain-logoepau-2 {
|
||||||
|
// display: none;
|
||||||
|
// height: $header-height;
|
||||||
|
|
||||||
|
// @media (max-width: 891px) {
|
||||||
|
// height: $header-height-pad;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// #block-quartiers-de-demain-logoquartiersdedemain {
|
||||||
|
// margin: auto;
|
||||||
|
|
||||||
|
// .field_field_logo {
|
||||||
|
// width: 90%;
|
||||||
|
// margin: auto;
|
||||||
|
|
||||||
|
// @media (max-width: 1650px) {
|
||||||
|
// width: 80%;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .qdd-header {
|
||||||
|
// width: 100%;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// img {
|
||||||
|
// width: auto;
|
||||||
|
// margin: auto;
|
||||||
|
// height: calc($header-height - 1rem);
|
||||||
|
// padding: 2rem;
|
||||||
|
// transition: height 0.3s;
|
||||||
|
|
||||||
|
// @media (max-width: 891px) {
|
||||||
|
// height: $header-height-pad;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 660px) {
|
||||||
|
// height: $header-height-small;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 450px) {
|
||||||
|
// height: $header-height-ultrasmall;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// BOUTON / BLOCS DROITE (SI BESOIN)
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// .header_right_container {
|
||||||
|
// display: none;
|
||||||
|
// flex: 0 0 0%;
|
||||||
|
// width: fit-content;
|
||||||
|
// min-width: fit-content;
|
||||||
|
// background: $blue_QDD;
|
||||||
|
// text-align: center;
|
||||||
|
// transform: translateX(0);
|
||||||
|
// transition: transform 0.3s ease-in-out;
|
||||||
|
// z-index: 10;
|
||||||
|
// position: fixed;
|
||||||
|
// right: 0;
|
||||||
|
// border-radius: 11px;
|
||||||
|
// padding: 0.5rem 0.5rem 0 0.5rem;
|
||||||
|
// margin: 1rem;
|
||||||
|
|
||||||
|
// @media (max-width: 660px) {
|
||||||
|
// padding-right: 0;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// NAVIGATION (COLONNE DROITE)
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// .header_nav_container {
|
||||||
|
// flex: 0 0 0%;
|
||||||
|
// width: 100%;
|
||||||
|
// min-width: fit-content;
|
||||||
|
|
||||||
|
// background: $blue_QDD;
|
||||||
|
// text-align: center;
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: column;
|
||||||
|
|
||||||
|
// z-index: -1;
|
||||||
|
// transform: translateX(0);
|
||||||
|
// transition:
|
||||||
|
// flex-basis 0.9s ease-in-out,
|
||||||
|
// width 0.9s ease-in-out,
|
||||||
|
// transform 0.3s ease-in-out;
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// height: 200px;
|
||||||
|
// top: -30px;
|
||||||
|
// flex: 1 0 100%;
|
||||||
|
// position: relative;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 500px) {
|
||||||
|
// flex: 0 0 40%;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ---- Bloc menu principal ---- */
|
||||||
|
// #block-quartiers-de-demain-entete {
|
||||||
|
// margin: auto;
|
||||||
|
|
||||||
|
// h2 {
|
||||||
|
// display: none;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ul {
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: column;
|
||||||
|
// align-items: flex-start;
|
||||||
|
// position: relative;
|
||||||
|
// padding-left: 1rem;
|
||||||
|
// padding-right: 1rem;
|
||||||
|
// margin: auto;
|
||||||
|
|
||||||
|
// @media (max-width: 1025px) {
|
||||||
|
// top: 0;
|
||||||
|
// align-items: center;
|
||||||
|
// padding-top: 0.3rem;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// li {
|
||||||
|
// width: 100%;
|
||||||
|
// text-align: left;
|
||||||
|
|
||||||
|
// .is-active {
|
||||||
|
// font-family: "gilroy-bold";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// :hover {
|
||||||
|
// font-family: "gilroy-bold";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 1090px) {
|
||||||
|
// padding-top: 0.3rem;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// line-height: 1.3rem;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// a {
|
||||||
|
// text-transform: uppercase;
|
||||||
|
// color: white;
|
||||||
|
// font-size: 0.5rem;
|
||||||
|
|
||||||
|
// @media (max-width: 1090px) {
|
||||||
|
// font-size: 0.6rem;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: column;
|
||||||
|
// align-items: center;
|
||||||
|
// font-size: 0.8rem;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ---- Sélecteur de langue en bas du menu ---- */
|
||||||
|
// #block-quartiers-de-demain-selecteurdelangue {
|
||||||
|
// width: fit-content;
|
||||||
|
// margin: auto;
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// padding-bottom: 0.5rem;
|
||||||
|
// margin-bottom: 0.5rem;
|
||||||
|
|
||||||
|
// .links {
|
||||||
|
// margin-top: 0.5rem;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// ÉTATS D’AFFICHAGE DU MENU
|
||||||
|
// (pilotés en JS avec .nav-hidden)
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// /* État par défaut : menu visible */
|
||||||
|
// .header_nav_container {
|
||||||
|
// transform: translateX(0);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* Menu caché : desktop → slide vers la gauche */
|
||||||
|
// .header_nav_container.nav-hidden {
|
||||||
|
// transform: translateX(-100%);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* Spécifique mobile : on slide verticalement */
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// .header_nav_container {
|
||||||
|
// transform: translateY(0);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .header_nav_container.nav-hidden {
|
||||||
|
// transform: translateY(-100%);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// HEADER "SHRINK" AU SCROLL
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// .shrink {
|
||||||
|
// height: 260px;
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// height: 170px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /* ===========================
|
||||||
|
// RÉGLAGES DE LA RÉPARTITION GAUCHE / DROITE
|
||||||
|
// (quand le header est à son état "final")
|
||||||
|
// =========================== */
|
||||||
|
|
||||||
|
// header[role="banner"] {
|
||||||
|
// .header_left_container {
|
||||||
|
// flex-basis: 65%;
|
||||||
|
// transform-origin: bottom right;
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// flex: 1 0 100%;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .header_nav_container {
|
||||||
|
// flex-basis: 30%;
|
||||||
|
// transform-origin: bottom right;
|
||||||
|
// min-width: fit-content;
|
||||||
|
|
||||||
|
// @media (max-width: 810px) {
|
||||||
|
// flex: 1 0 100%;
|
||||||
|
// position: relative;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
HEADER GLOBAL
|
||||||
|
=========================== */
|
||||||
|
|
||||||
header[role="banner"] {
|
header[role="banner"] {
|
||||||
display: flex;
|
// background: none;
|
||||||
flex-direction: row;
|
|
||||||
height: 100vh;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 99;
|
|
||||||
max-width: 100vw;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
transition: none;
|
left: 0;
|
||||||
|
z-index: 50;
|
||||||
|
max-width: 100vw;
|
||||||
|
|
||||||
// transition: height 2s ease-in-out, width 2s ease-in-out; /* Transition pour le changement de taille */
|
display: flex;
|
||||||
// transition: height 0.3s, padding 0.3s; /* Add transition for smooth resizing */
|
flex-direction: row;
|
||||||
|
transform-origin: bottom right;
|
||||||
|
height: $header-height;
|
||||||
|
width: 35%;
|
||||||
|
transition: all 1.4s ease-in-out;
|
||||||
|
// background-color: $white-header; // pour éviter la transparence
|
||||||
|
|
||||||
|
@media (max-width: 1090px) {
|
||||||
|
height: $header-height-pad;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1400px) {
|
||||||
|
height: $header-height-big;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 810px) {
|
||||||
|
width: 100%;
|
||||||
|
height: 170px; // hauteur du bloc header-left
|
||||||
|
flex-direction: row; // header_left + (nav positionnée en absolu)
|
||||||
|
}
|
||||||
|
|
||||||
|
.qdd-header {
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
LANGUAGE SWITCHER
|
||||||
|
=========================== */
|
||||||
|
|
||||||
.language-switcher-language-url {
|
.language-switcher-language-url {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@@ -24,39 +409,24 @@ header[role="banner"]{
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
|
||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
font-size: 00.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
// @media(max-width: 500px){
|
|
||||||
// flex-direction: column;
|
|
||||||
// // margin-bottom: 0;
|
|
||||||
// margin: auto;
|
|
||||||
// }
|
|
||||||
li a {
|
li a {
|
||||||
color: white;
|
color: white;
|
||||||
font-family: 'gilroy-light';
|
font-family: "gilroy-light";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
li:nth-child(1) {
|
li:nth-child(1) {
|
||||||
&::after {
|
&::after {
|
||||||
content: " / ";
|
content: " / ";
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
@media(max-width: 660px){
|
|
||||||
// content:none ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.is-active{
|
|
||||||
font-family: 'gilroy-bold';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: 810px){
|
.is-active {
|
||||||
height: 100vh;
|
font-family: "gilroy-bold";
|
||||||
header {
|
}
|
||||||
position: relative;
|
|
||||||
flex-direction: column;
|
|
||||||
height: auto !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,61 +434,86 @@ header[role="banner"]{
|
|||||||
width: max-content;
|
width: max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
COLONNE GAUCHE (LOGO)
|
||||||
|
=========================== */
|
||||||
|
|
||||||
.header_left_container {
|
.header_left_container {
|
||||||
flex: 0 0 100%;
|
flex: 0 0 70%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
transition: height 2s ease-in-out, width 2s ease-in-out; /* Transition pour le changement de taille */
|
|
||||||
background-color: $white-header;
|
background-color: $white-header;
|
||||||
img{display: none;}
|
transition:
|
||||||
|
flex-basis 0.9s ease-in-out,
|
||||||
|
width 0.9s ease-in-out;
|
||||||
|
|
||||||
|
@media (max-width: 810px) {
|
||||||
|
flex: 1 0 100%;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 660px) {
|
@media (max-width: 660px) {
|
||||||
height: inherit;
|
height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#block-quartiers-de-demain-logorepu-2 {
|
#block-quartiers-de-demain-logorepu-2 {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@media (max-width: 891px) {
|
@media (max-width: 891px) {
|
||||||
height: $header-height-pad;
|
height: $header-height-pad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#block-quartiers-de-demain-logoepau-2 {
|
#block-quartiers-de-demain-logoepau-2 {
|
||||||
display: none;
|
display: none;
|
||||||
height: $header-height;
|
height: $header-height;
|
||||||
|
|
||||||
|
@media (max-width: 891px) {
|
||||||
|
height: $header-height-pad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#block-quartiers-de-demain-logoquartiersdedemain {
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
.field_field_logo {
|
||||||
|
// width: 100%;
|
||||||
|
// margin: auto;
|
||||||
|
|
||||||
|
// @media (max-width: 1650px) {
|
||||||
|
// width: 80%;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .qdd-header {
|
||||||
|
// width: 100%;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: auto;
|
||||||
|
margin: auto;
|
||||||
|
height: calc($header-height - 3rem);
|
||||||
|
padding: 2rem;
|
||||||
|
transition: height 0.3s;
|
||||||
|
|
||||||
@media (max-width: 891px) {
|
@media (max-width: 891px) {
|
||||||
height: $header-height-pad;
|
height: $header-height-pad;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
#block-quartiers-de-demain-logoquartiersdedemain{
|
|
||||||
// padding-right: 5%;
|
|
||||||
margin: auto;
|
|
||||||
.field_field_logo{
|
|
||||||
width: 90%;
|
|
||||||
margin: auto;
|
|
||||||
@media(max-width: 1650px){
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
.qdd-header{
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
img{
|
|
||||||
width: auto;
|
|
||||||
margin: auto;
|
|
||||||
height: calc($header-height - 1rem);
|
|
||||||
padding: 2rem;
|
|
||||||
transition: height 0.3s; /* Add transition for smooth resizing */
|
|
||||||
@media(max-width: 891px){
|
|
||||||
height: $header-height-pad;
|
|
||||||
}
|
|
||||||
@media (max-width: 660px) {
|
@media (max-width: 660px) {
|
||||||
height: $header-height-small;
|
height: $header-height-small;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 450px) {
|
@media (max-width: 450px) {
|
||||||
height: $header-height-ultrasmall;
|
height: $header-height-ultrasmall;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
BLOC DROITE OPTIONNEL
|
||||||
|
=========================== */
|
||||||
|
|
||||||
.header_right_container {
|
.header_right_container {
|
||||||
display: none;
|
display: none;
|
||||||
flex: 0 0 0%;
|
flex: 0 0 0%;
|
||||||
@@ -128,87 +523,60 @@ header[role="banner"]{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
transition: transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out;
|
||||||
z-index: -1 ;
|
z-index: 60;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
border-radius: 11px;
|
border-radius: 11px;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem 0.5rem 0 0.5rem;
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
padding-top: 0rem;
|
|
||||||
padding-bottom: 0rem;
|
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 660px) {
|
@media (max-width: 660px) {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
.language-switcher-language-url{
|
}
|
||||||
text-transform: uppercase;
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
ul{
|
/* ===========================
|
||||||
display: flex;
|
NAVIGATION (COLONNE DROITE)
|
||||||
flex-direction: row;
|
=========================== */
|
||||||
font-size:0.6rem;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
@media(max-width: 660px){
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
@media(max-width: 500px){
|
|
||||||
flex-direction: column;
|
|
||||||
// margin-bottom: 0;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
li a {
|
|
||||||
color: white;
|
|
||||||
font-family: 'gilroy-light';
|
|
||||||
|
|
||||||
}
|
|
||||||
li:nth-child(1){
|
|
||||||
&::after{
|
|
||||||
content: " / ";
|
|
||||||
white-space: pre;
|
|
||||||
@media(max-width: 660px){
|
|
||||||
content:none ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.is-active{
|
|
||||||
font-family: 'gilroy-bold';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header_nav_container {
|
.header_nav_container {
|
||||||
flex: 0 0 0%;
|
flex: 0 0 30%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: fit-content;
|
min-width: fit-content;
|
||||||
background: $blue_QDD;
|
background: $blue_QDD;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transform: translateX(0);
|
|
||||||
transition: transform 0.3s ease-in-out;
|
|
||||||
z-index: -1 ;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@media(max-width: 1090px){
|
z-index: -1;
|
||||||
// text-align:left;
|
transform: translateX(0);
|
||||||
// height: fit-content;
|
transition:
|
||||||
|
flex-basis 0.9s ease-in-out,
|
||||||
|
width 0.9s ease-in-out,
|
||||||
|
transform 0.3s ease-in-out;
|
||||||
|
|
||||||
}
|
|
||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
|
/* 🔹 en mobile : nav en dessous du header, en absolu */
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 170px; // même valeur que la hauteur du header mobile
|
||||||
|
width: 100%;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
top: -30px;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
flex: 0 0 40%;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---- Bloc menu principal ---- */
|
||||||
#block-quartiers-de-demain-entete {
|
#block-quartiers-de-demain-entete {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -217,29 +585,30 @@ header[role="banner"]{
|
|||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
// padding-top: 5%;
|
|
||||||
@media (max-width: 1025px) {
|
@media (max-width: 1025px) {
|
||||||
top: 0;
|
top: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 0.3rem;
|
padding-top: 0.3rem;
|
||||||
}
|
}
|
||||||
@media(max-width: 1090px){
|
|
||||||
}
|
|
||||||
li {
|
li {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
.is-active {
|
.is-active {
|
||||||
font-family: "gilroy-bold";
|
font-family: "gilroy-bold";
|
||||||
}
|
}
|
||||||
|
|
||||||
:hover {
|
:hover {
|
||||||
font-family: "gilroy-bold";
|
font-family: "gilroy-bold";
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1090px) {
|
@media (max-width: 1090px) {
|
||||||
padding-top: 0.3rem;
|
padding-top: 0.3rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
@media(max-width: 810px){
|
|
||||||
|
|
||||||
|
@media (max-width: 810px) {
|
||||||
line-height: 1.3rem;
|
line-height: 1.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,141 +616,76 @@ header[role="banner"]{
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
|
|
||||||
@media (max-width: 1090px) {
|
@media (max-width: 1090px) {
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
/* ---- Sélecteur de langue en bas du menu ---- */
|
||||||
// &:not(:last-of-type){
|
|
||||||
// ::after{
|
|
||||||
// content: "";
|
|
||||||
// display: block;
|
|
||||||
// border-bottom: solid white 1px;
|
|
||||||
// padding-bottom: 0.3rem;
|
|
||||||
// width: 60%; /* Réduit la largeur du soulignement à 50% */
|
|
||||||
// // margin: 0 auto; /* Centre le soulignement sous l'élément */
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media(max-width: 660px){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#block-quartiers-de-demain-selecteurdelangue {
|
#block-quartiers-de-demain-selecteurdelangue {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
|
|
||||||
.links {
|
.links {
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header_nav_container.hidden {
|
/* ===========================
|
||||||
transform: translateX(30%);
|
ÉTATS D’AFFICHAGE DU MENU
|
||||||
}
|
(pilotés en JS avec .nav-hidden)
|
||||||
|
=========================== */
|
||||||
|
|
||||||
.header_nav_container.visible {
|
/* État par défaut : visible */
|
||||||
|
|
||||||
|
.header_nav_container {
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header:hover + .header_nav_container {
|
/* Desktop : caché → slide vers la gauche */
|
||||||
transform: translateX(0);
|
.header_nav_container.nav-hidden {
|
||||||
|
transform: translateX(-100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile : on utilise translateY pour cacher/montrer */
|
||||||
|
@media (max-width: 810px) {
|
||||||
|
.header_nav_container {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header_nav_container.nav-hidden {
|
||||||
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===========================
|
||||||
|
HEADER "SHRINK" AU SCROLL
|
||||||
|
=========================== */
|
||||||
|
|
||||||
.shrink {
|
.shrink {
|
||||||
height: 260px;
|
height: 260px;
|
||||||
@media(max-width: 810px){
|
background: none;
|
||||||
height: 170px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Taille définitive du header après l'animation */
|
|
||||||
header[role="banner"].header--collapsed {
|
|
||||||
height: $header-height; /* Ou la hauteur que vous souhaitez pour votre header */
|
|
||||||
width: 35%;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
transition: all 1s ease-in-out;
|
|
||||||
@media(max-width: 1090px) {
|
|
||||||
height: $header-height-pad;
|
|
||||||
}
|
|
||||||
@media (min-width: 1400px) {
|
|
||||||
height: $header-height-big;
|
|
||||||
}
|
|
||||||
.qdd-header{
|
|
||||||
opacity: 1 !important;
|
|
||||||
}
|
|
||||||
@media(max-width: 810px){
|
|
||||||
width: 100%;
|
|
||||||
height: 170px;
|
|
||||||
}
|
|
||||||
.header_left_container{
|
|
||||||
flex: 1 0 65%;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
@media(max-width: 810px){
|
|
||||||
flex: 1 0 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.header_nav_container{
|
|
||||||
flex: 0 0 30%;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
min-width: fit-content;
|
|
||||||
@media(max-width: 810px){
|
|
||||||
flex: 1 0 100%;
|
|
||||||
position: relative;
|
|
||||||
left: -100%;
|
|
||||||
// top: -45px; /* a remettre et faire varier si ajoute éléments dans menu */
|
|
||||||
|
|
||||||
|
@media (max-width: 810px) {
|
||||||
|
height: 170px; // la hauteur du bloc header-left reste la même en mobile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
header[role="banner"].header--collapsed-already{
|
|
||||||
height: $header-height; /* Ou la hauteur que vous souhaitez pour votre header */
|
|
||||||
width: 35%;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
transition: all 0s ease-in-out;
|
|
||||||
.qdd-header{
|
|
||||||
opacity: 1 !important;
|
|
||||||
}
|
|
||||||
@media(max-width: 810px){
|
|
||||||
width: 100%;
|
|
||||||
// height: 170px;
|
|
||||||
}
|
|
||||||
@media (min-width: 1400px) {
|
|
||||||
height: $header-height-big;
|
|
||||||
}
|
|
||||||
.header_left_container{
|
|
||||||
flex: 1 0 65%;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
@media(max-width: 810px){
|
|
||||||
flex: 1 0 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.header_nav_container{
|
|
||||||
flex: 0 0 30%;
|
|
||||||
min-width: fit-content;
|
|
||||||
transform-origin: bottom right;
|
|
||||||
@media(max-width: 810px){
|
|
||||||
flex: 1 0 100%;
|
|
||||||
position: relative;
|
|
||||||
left: -100%;
|
|
||||||
// top: -75px;
|
|
||||||
}
|
|
||||||
@media(max-width: 550px){
|
|
||||||
top: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
@import "global/layout";
|
@import "global/layout";
|
||||||
@import "global/reset";
|
@import "global/reset";
|
||||||
@import "global/mediaquerries";
|
@import "global/mediaquerries";
|
||||||
|
|
||||||
// @import "global/_animated-logo";
|
// @import "global/_animated-logo";
|
||||||
|
|
||||||
|
|
||||||
@@ -24,12 +25,12 @@
|
|||||||
@import "partials/header";
|
@import "partials/header";
|
||||||
@import "partials/footer";
|
@import "partials/footer";
|
||||||
@import "partials/aside";
|
@import "partials/aside";
|
||||||
@import "partials/animation-logo";
|
// @import "partials/animation-logo";
|
||||||
@import "partials/slick-theme";
|
@import "partials/slick-theme";
|
||||||
@import "partials/slick";
|
@import "partials/slick";
|
||||||
@import "partials/timeline";
|
@import "partials/timeline";
|
||||||
@import "partials/actu-caroussel-home";
|
@import "partials/actu-caroussel-home";
|
||||||
@import "partials/animation-logo-header";
|
// @import "partials/animation-logo-header";
|
||||||
@import "partials/formes-animees";
|
@import "partials/formes-animees";
|
||||||
@import "partials/animation-pilliers";
|
@import "partials/animation-pilliers";
|
||||||
@import "partials/map";
|
@import "partials/map";
|
||||||
|
|||||||
@@ -432,9 +432,9 @@
|
|||||||
|
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<div{{ item.attributes }}>
|
<div{{ item.attributes }}>
|
||||||
<a class='logo-qdd' href="{{ ancre_href1 }}">
|
{# <a class='logo-qdd' href="{{ ancre_href1 }}">
|
||||||
{{ svg_icon|raw }}
|
{{ svg_icon|raw }}
|
||||||
</a>
|
</a> #}
|
||||||
|
|
||||||
<a clas='other-logo' href="{{ ancre_href }}">
|
<a clas='other-logo' href="{{ ancre_href }}">
|
||||||
{{ item.content }}
|
{{ item.content }}
|
||||||
|
|||||||
@@ -62,7 +62,10 @@
|
|||||||
* @ingroup themeable
|
* @ingroup themeable
|
||||||
*/
|
*/
|
||||||
#}
|
#}
|
||||||
<article{{ attributes }}>
|
{# On calcule une variable Twig pour savoir si le node est lauréat #}
|
||||||
|
{% set is_laureat = node.field_laureats.value ?? 0 %}
|
||||||
|
|
||||||
|
<article{{ attributes.addClass(is_laureat ? 'is-laureat' : '') }}>
|
||||||
|
|
||||||
{{ title_prefix }}
|
{{ title_prefix }}
|
||||||
{% if label and not page %}
|
{% if label and not page %}
|
||||||
|
|||||||
@@ -93,14 +93,35 @@
|
|||||||
{% set node_title = node.label %}
|
{% set node_title = node.label %}
|
||||||
{% set node_url = (url is defined and url) ? url : path('entity.node.canonical', {'node': node.id}) %}
|
{% set node_url = (url is defined and url) ? url : path('entity.node.canonical', {'node': node.id}) %}
|
||||||
|
|
||||||
{% if node_title %}
|
{# {% if node_title %}
|
||||||
{{ title_prefix }}
|
{{ title_prefix }}
|
||||||
<h3{{ title_attributes }} class="node-projet-title">
|
<h3{{ title_attributes }} class="node-projet-title">
|
||||||
<a href="{{ node_url }}" rel="bookmark">{{ node_title }}</a>
|
<a href="{{ node_url }}" rel="bookmark">{{ node_title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
{{ title_suffix }}
|
{{ title_suffix }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{{ content }} #}
|
||||||
|
|
||||||
|
{% if node_title %}
|
||||||
|
{{ title_prefix }}
|
||||||
|
<a href="{{ node_url }}" rel="bookmark" class="node-projet-link">
|
||||||
|
<h3{{ title_attributes.addClass('node-projet-title') }}>
|
||||||
|
{{ node_title }}
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
{# Champ "Nom de l'équipe" inclus dans le lien #}
|
||||||
|
{% if content.field_nom_de_l_equipe is defined %}
|
||||||
|
{{ content.field_nom_de_l_equipe }}
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
{{ title_suffix }}
|
||||||
|
|
||||||
|
{# On affiche le reste des champs, sans field_nom_de_l_equipe #}
|
||||||
|
{{ content|without('field_nom_de_l_equipe') }}
|
||||||
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ let config = {
|
|||||||
"./src/assets/js/lightbox.js",
|
"./src/assets/js/lightbox.js",
|
||||||
"./src/assets/js/header.js",
|
"./src/assets/js/header.js",
|
||||||
"./src/assets/js/timeline.js",
|
"./src/assets/js/timeline.js",
|
||||||
|
"./src/assets/js/ressources.js",
|
||||||
"./src/assets/scss/quartiers_de_demain.scss",
|
"./src/assets/scss/quartiers_de_demain.scss",
|
||||||
// "./src/assets/fonts/*",
|
// "./src/assets/fonts/*",
|
||||||
// "./src/assets/css/animated_logo.css",
|
// "./src/assets/css/animated_logo.css",
|
||||||
|
|||||||
Reference in New Issue
Block a user