From e6ac86bb127adef40a6ce4200064d2e99254ea98 Mon Sep 17 00:00:00 2001 From: erational <erational@erational.org> Date: Mon, 31 May 2021 21:16:39 +0200 Subject: [PATCH] ajouter une class .spip_icone sur les vignettes liees au mimetype --- inc/documents.php | 3 ++- prive/style_prive_plugin_medias.html | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/documents.php b/inc/documents.php index 329d5caa..1eb27879 100644 --- a/inc/documents.php +++ b/inc/documents.php @@ -131,6 +131,7 @@ function vignette_automatique($img, $doc, $lien, $x = 0, $y = 0, $align = '', $c $img = $f($e, false); $size = @spip_getimagesize($img); $img = "<img src='$img' " . $size[3] . ' />'; + $class .= " spip_icone"; } } else { $size = @spip_getimagesize($img); @@ -143,7 +144,7 @@ function vignette_automatique($img, $doc, $lien, $x = 0, $y = 0, $align = '', $c $img = image_reduire($img, $x, $y); } $img = inserer_attribut($img, 'alt', ''); - $img = inserer_attribut($img, 'class', $class); + $img = inserer_attribut($img, 'class', trim($class)); if ($align) { $img = inserer_attribut($img, 'align', $align); } diff --git a/prive/style_prive_plugin_medias.html b/prive/style_prive_plugin_medias.html index a1e3a969..11ca8373 100644 --- a/prive/style_prive_plugin_medias.html +++ b/prive/style_prive_plugin_medias.html @@ -432,6 +432,11 @@ h3 .affichages { height: auto; } +.portfolios .item .vignette img.spip_icone { + max-height:90px; +} + + .portfolios .documents_cases .item .actions { display:block; width:100%; -- GitLab