From 1d497d8389c7f7fccaf2a4b72a0e3e87be85f0c0 Mon Sep 17 00:00:00 2001 From: RastaPopoulos <rastapopoulos@spip.org> Date: Sun, 31 Mar 2024 20:43:19 +0200 Subject: [PATCH] =?UTF-8?q?feat(4766):=20les=20acc=C3=A8s=20rapides=20?= =?UTF-8?q?=C3=A0=20la=20cr=C3=A9ation=20passent=20dans=20un=20menu=20d?= =?UTF-8?q?=C3=A9roulant=20commun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: #4766 --- prive/javascript/gadgets.js | 2 +- prive/squelettes/inclure/barre-nav.html | 30 ++++++++++++++++--------- prive/themes/spip/bando.css.html | 8 ++++++- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/prive/javascript/gadgets.js b/prive/javascript/gadgets.js index 18d488392f..3a82156437 100644 --- a/prive/javascript/gadgets.js +++ b/prive/javascript/gadgets.js @@ -106,7 +106,7 @@ jQuery(function(){ }); jQuery('#bando_navigation .deroulant > li').menuFocus(); - jQuery('#bando_outils ul.bandeau_rubriques li').menuFocus(); + jQuery('#bando_outils .deroulant > li').menuFocus(); jQuery('#bandeau_haut #formRecherche input').on('hover touchstart', function(){ jQuery('#bandeau_haut ul.actif').trigger('mouseout'); diff --git a/prive/squelettes/inclure/barre-nav.html b/prive/squelettes/inclure/barre-nav.html index 930fad06b4..18a737ded4 100644 --- a/prive/squelettes/inclure/barre-nav.html +++ b/prive/squelettes/inclure/barre-nav.html @@ -125,16 +125,26 @@ [(#REM) Boutons de création rapide ] <B_creer> - <ul class="rapides rapides_creer creer"> - <BOUCLE_creer(DATA){source table, #GET{boutons}} {cle=outils_rapides}> - <BOUCLE_creersous(DATA){source table, #VALEUR{sousmenu}}{par position}> - [<li class="rapides__item"> - <a - href="[(#VALEUR{url}|sinon{#CLE}|bandeau_creer_url{#VALEUR{urlArg},#GET{contexte}})]" - title="[(#VALEUR{libelle}|_T|attribut_html)]" - class="rapides__lien bando2_#CLE"><span class="libelle">(#VALEUR{libelle}|_T)</span></a> - </li>] - </BOUCLE_creersous></BOUCLE_creer> + <ul class="deroulant deroulant_creer" data-racine> + <li class="deroulant__item"> + <a class="deroulant__lien bando2_creer" href="#URL_ECRIRE{creer}"> + [(#CHEMIN_IMAGE{ouvrir-24.png}|balise_img{'', picto picto_creer})] + <span class="libelle">Créer</span> + </a> + + <ul class="deroulant__sous-menu" data-profondeur="1"> + <BOUCLE_creer(DATA){source table, #GET{boutons}} {cle=outils_rapides}> + <BOUCLE_creersous(DATA){source table, #VALEUR{sousmenu}}{par position}> + [<li class="deroulant__item"> + <a + href="[(#VALEUR{url}|sinon{#CLE}|bandeau_creer_url{#VALEUR{urlArg},#GET{contexte}})]" + title="[(#VALEUR{libelle}|_T|attribut_html)]" + class="deroulant__lien bando2_#CLE"><span class="libelle">(#VALEUR{libelle}|_T)</span></a> + </li>] + </BOUCLE_creersous></BOUCLE_creer> + </ul> + + </li> </ul> </B_creer> diff --git a/prive/themes/spip/bando.css.html b/prive/themes/spip/bando.css.html index 6bda262a55..4475ed0d0b 100644 --- a/prive/themes/spip/bando.css.html +++ b/prive/themes/spip/bando.css.html @@ -203,7 +203,7 @@ /* Items <li> */ .bando-haut .deroulant__item { - flex: 0 1; /* effectif à la racine uniquement, plus bas le conteneur est en display:block */ + flex: auto 1; /* effectif à la racine uniquement, plus bas le conteneur est en display:block */ display: block; /* block obligé, cf. notes */ } @@ -507,6 +507,12 @@ } /* Menus « rapides » */ +.bando-outils { + color: var(--spip-color-gray-dark); +} +.bando-outils .deroulant__lien img + .libelle { + margin-left: 0.25em; +} .bando-outils .rapides__lien { flex: 0 0 auto; align-items: center; -- GitLab