From b2c463dcbe4f3fe2afbc2e9bc1c4c88c47f558ca Mon Sep 17 00:00:00 2001 From: ARNO* <arno@rezo.net> Date: Sat, 24 Apr 2021 20:13:19 +0200 Subject: [PATCH] =?UTF-8?q?Coh=C3=A9rence=20logos=20sous-rubs=20(idem=20li?= =?UTF-8?q?ste=20articles)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit et réglages flexbox --- ecrire/inc/presenter_enfants.php | 9 +++++---- prive/themes/spip/box_skins.css.html | 12 +++++++++--- prive/themes/spip/lists.css.html | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ecrire/inc/presenter_enfants.php b/ecrire/inc/presenter_enfants.php index 7a90b272a7..5417c908e3 100644 --- a/ecrire/inc/presenter_enfants.php +++ b/ecrire/inc/presenter_enfants.php @@ -68,7 +68,7 @@ function enfant_rub($collection, $debut = 0, $limite = 500) { if ($voir_logo) { if ($logo = $chercher_logo($id_rubrique, 'id_rubrique', 'on')) { list($fid, $dir, $nom, $format) = $logo; - $logo = image_passe_partout("<img src='$fid' alt='' />", 70, 70); + $logo = image_recadre_avec_fallback("<img src='$fid' alt='' />", 70, 70); if ($logo) { $logo = wrap(inserer_attribut($logo, 'class', 'logo'),'<span class="logo-carre">'); } @@ -86,10 +86,11 @@ function enfant_rub($collection, $debut = 0, $limite = 500) { ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . " href='" . generer_url_entite($id_rubrique, 'rubrique') . - "'><span>" . + "'><span class='titre'>" . $rang . $titre - . '</span></a>' - . (is_string($logo) ? $logo : ''); + . '</span>' + . (is_string($logo) ? $logo : '') + . '</a>'; $titre = bouton_block_depliable($lib_bouton, $les_sous_enfants ? false : -1, "enfants$id_rubrique") . (!$descriptif ? '' : "\n<div class='descriptif'>$descriptif</div>") diff --git a/prive/themes/spip/box_skins.css.html b/prive/themes/spip/box_skins.css.html index 0d0af649c8..3e53d614d3 100644 --- a/prive/themes/spip/box_skins.css.html +++ b/prive/themes/spip/box_skins.css.html @@ -424,8 +424,8 @@ background-repeat: no-repeat; border-radius: inherit; } -.box.sous-rub .titrem.deplie, -.box.sous-rub .titrem.deplie .logo { +.box.sous-rub .titrem.deplie/*, +.box.sous-rub .titrem.deplie .logo*/ { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } @@ -436,11 +436,15 @@ border-radius: inherit; } .box.sous-rub .titrem a:not(.titremancre) { - padding: var(--spip-box-spacing-y) calc(var(--spip-box-spacing-x) / 2); flex: 1 1 auto; display: flex; align-items: center; /* Pour aligner les one-liners avec le logo éventuel */ } +.box.sous-rub .titrem a:not(.titremancre) span.titre { + padding: var(--spip-box-spacing-y) calc(var(--spip-box-spacing-x) / 2); + flex-grow: 2; +} + /* Si titre dépliable */ .box.sous-rub .titrem.depliant a:first-of-type:not(:only-of-type) { border-top-#RIGHT-radius: 0; @@ -456,6 +460,7 @@ color: var(--spip-color-black); } /* Logo */ +/* .box.sous-rub .box__header .logo-carre { padding: 0; } @@ -466,6 +471,7 @@ border-bottom-#LEFT-radius: 0; border-bottom-#RIGHT-radius: var(--spip-box-border-radius); } +*/ /* Descriptif */ .box.sous-rub .descriptif { padding: calc(var(--spip-box-spacing-y) / 2) calc(var(--spip-box-spacing-x) / 2); diff --git a/prive/themes/spip/lists.css.html b/prive/themes/spip/lists.css.html index d273fa5a0c..cc293c8cac 100644 --- a/prive/themes/spip/lists.css.html +++ b/prive/themes/spip/lists.css.html @@ -75,7 +75,7 @@ .liste-objets.auteurs th.statut {line-height:1px;padding-bottom:0;} .liste-objets.auteurs td.nom .spip_logos { vertical-align: middle; margin-#ENV{right}: 0.3em; } -.liste-objets.articles tr td.logo, .logo-carre {width: 70px; height: 70px; padding: 3px;} +.liste-objets.articles tr td.logo, .logo-carre {width: 70px; height: 70px; padding: 3px; flex-shrink: 0} .liste-objets.articles tr td.logo img, .logo-carre img {width: 100%; height: 100%; object-fit: cover; border-radius: 5px;} <BOUCLE_objets(DATA){source table,#REM|lister_tables_objets_sql}>[ -- GitLab