From ca771e2bdf8846732797e79f19a62c22cd7e2f08 Mon Sep 17 00:00:00 2001 From: nicod_ <nicod@lerebooteux.fr> Date: Fri, 23 Apr 2021 18:43:52 +0200 Subject: [PATCH] =?UTF-8?q?Des=20logos=20uniformes=20et=20carr=C3=A9s=20po?= =?UTF-8?q?ur=20les=20rubriques,=20comme=20pour=20les=20articles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc/presenter_enfants.php | 4 ++-- prive/themes/spip/box_skins.css.html | 8 +++++--- prive/themes/spip/lists.css.html | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ecrire/inc/presenter_enfants.php b/ecrire/inc/presenter_enfants.php index fe7a99998a..a1d98c9fd0 100644 --- a/ecrire/inc/presenter_enfants.php +++ b/ecrire/inc/presenter_enfants.php @@ -68,9 +68,9 @@ 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_reduire("<img src='$fid' alt='' />", 70, 70); + $logo = image_passe_partout("<img src='$fid' alt='' />", 70, 70); if ($logo) { - $logo = inserer_attribut($logo, 'class', 'logo'); + $logo = wrap(inserer_attribut($logo, 'class', 'logo'),'<span class="logo-carre">'); } } } diff --git a/prive/themes/spip/box_skins.css.html b/prive/themes/spip/box_skins.css.html index 6281108cc3..0d0af649c8 100644 --- a/prive/themes/spip/box_skins.css.html +++ b/prive/themes/spip/box_skins.css.html @@ -456,12 +456,14 @@ color: var(--spip-color-black); } /* Logo */ +.box.sous-rub .box__header .logo-carre { + padding: 0; +} .box.sous-rub .box__header .logo { - width: auto; - height: 100%; - max-height: calc((var(--spip-box-spacing-y) * 2) + 1.2em); /* = titre sur 1 ligne */ margin: 0; + border-top-#LEFT-radius: 0; border-top-#RIGHT-radius: var(--spip-box-border-radius); + border-bottom-#LEFT-radius: 0; border-bottom-#RIGHT-radius: var(--spip-box-border-radius); } /* Descriptif */ diff --git a/prive/themes/spip/lists.css.html b/prive/themes/spip/lists.css.html index a13f19b382..d273fa5a0c 100644 --- a/prive/themes/spip/lists.css.html +++ b/prive/themes/spip/lists.css.html @@ -75,8 +75,8 @@ .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,.liste-objets td.logo-carre {width: 70px; height: 70px; padding: 3px;} -.liste-objets.articles tr td.logo img,.liste-objets td.logo-carre img {width: 100%; height: 100%; object-fit: cover; border-radius: 5px;} +.liste-objets.articles tr td.logo, .logo-carre {width: 70px; height: 70px; padding: 3px;} +.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}>[ .liste-objets.[(#VALEUR{table_objet})] .caption {background-image:url((#CHEMIN_IMAGE{#VALEUR{icone_objet}|concat{-24.png}}));padding-#ENV{left}:30px;}]</BOUCLE_objets> -- GitLab