From 0f2500f3cae65a5039c84c94a91bde2efb5014c7 Mon Sep 17 00:00:00 2001
From: gloas <gloas@afi-sa.fr>
Date: Mon, 17 Dec 2018 15:12:22 +0100
Subject: [PATCH] dev #64573 improve css + fix failure

---
 .../Intonation/Assets/css/intonation.css      | 56 ++++++++++++-------
 .../templates/Intonation/Library/Settings.php |  9 ++-
 .../Intonation/Library/Widget/Login/View.php  |  3 +-
 library/templates/Intonation/View/Cardify.php |  6 +-
 tests/scenarios/Templates/TemplatesTest.php   |  2 +-
 5 files changed, 48 insertions(+), 28 deletions(-)

diff --git a/library/templates/Intonation/Assets/css/intonation.css b/library/templates/Intonation/Assets/css/intonation.css
index 79f0bb60c98..806d15cd196 100644
--- a/library/templates/Intonation/Assets/css/intonation.css
+++ b/library/templates/Intonation/Assets/css/intonation.css
@@ -27,24 +27,6 @@ body {
     box-shadow: 1px 1px 5px var(--front-shadow);
 }
 
-.widget:not(.col-12) + .widget:not(.col-12) {
-    *margin-left: 1em;
-}
-
-.widget.col-12 + .widget.col-12 {
-    *margin-top: 2ex;
-}
-
-#site_web_content_wrapper > header {
-    padding-bottom: 1ex;
-    margin-bottom: 1ex;
-}
-
-#site_web_content_wrapper > footer {
-    padding-top: 1ex;
-    margin-top: 1ex;
-}
-
 #site_web_wrapper {
     background-color: var(--front-background);
 }
@@ -69,6 +51,10 @@ body {
     width: 100%;
 }
 
+div:hover > .img_as_background {
+    filter: blur(5px);
+}
+
 [class^="fa"].ico_xl {
     display: block;
     font-size: 4em;
@@ -141,7 +127,7 @@ pre {
 [class*="position_fixed"] {
     position: fixed !important;
     width: auto;
-    z-index: 1;    
+    z-index: 10;    
 }
 
 [class*="position_fixed_top"] {
@@ -201,9 +187,39 @@ pre {
 }
 
 .no_border {
-    border: none !important;
+    border: 1px solid rgba(0,0,0,0) !important;
 }
 
 .no_shadow {
     box-shadow: none !important;
+}
+
+.container-fluid,
+.col {
+    padding: 0;
+    margin: 0;
+}
+
+.z_index_1 {
+    z-index: 1 !important;
+}
+
+.z_index_2 {
+    z-index: 2 !important;
+}
+
+.z_index_3 {
+    z-index: 3 !important;
+}
+
+.margin_top_-15 {
+    margin-top: -15%;
+}
+
+.margin_bottom_+15 {
+    margin-bottom: +15%;
+}
+
+.margin_top_-35 {
+    margin-top: -35%;
 }
\ No newline at end of file
diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php
index 4efe446e1cc..c08a4ee02cb 100644
--- a/library/templates/Intonation/Library/Settings.php
+++ b/library/templates/Intonation/Library/Settings.php
@@ -48,6 +48,13 @@ class Intonation_Library_Settings extends Intonation_System_Abstract {
                                                  'no_border',
                                                  'no_shadow',
                                                  'no_overflow',
+                                                 'z_index_1',
+                                                 'z_index_2',
+                                                 'z_index_3',
+                                                 'margin_top_-15',
+                                                 'margin_top_-35',
+                                                 'margin_bottom_+15',
+                                                 'align-items-center',
                           ],
 
                           'hydrating_mapping' => ['div id site_web_wrapper' => 'container align-self-center',
@@ -66,7 +73,6 @@ class Intonation_Library_Settings extends Intonation_System_Abstract {
                                                   'input type submit' => 'btn btn-sm btn-primary',
                                                   'select' => 'form-control form-control-sm custom-select',
                                                   'button' => 'btn btn-secondary',
-                                                  'button class btn' => '',
                                                   'button class accessibility' => 'btn btn-light',
                                                   'button class scroll' => 'btn btn-light',
                                                   'button type submit' => 'btn btn-primary',
@@ -74,6 +80,7 @@ class Intonation_Library_Settings extends Intonation_System_Abstract {
                                                   'table' => 'table table-stripped table-hover table-responsive-md table-sm',
                                                   'thead' => 'thead-dark',
                                                   'img' => 'img-fluid rounded',
+                                                  'img class image_widget' => 'img-fluid',
                                                   'img d-block' => '',
                                                   'dl' => 'row',
                                                   'dt' => 'col-3',
diff --git a/library/templates/Intonation/Library/Widget/Login/View.php b/library/templates/Intonation/Library/Widget/Login/View.php
index 515b22db467..addbde98dc4 100644
--- a/library/templates/Intonation/Library/Widget/Login/View.php
+++ b/library/templates/Intonation/Library/Widget/Login/View.php
@@ -378,6 +378,7 @@ class IntonationLoginRenderToggle extends IntonationLoginRenderAbstract {
                                                                    $html,
                                                                    ['class' => 'dropdown-item']),
                                                  ['class' => 'dropdown-menu',
-                                                  'aria-labelledby' => $id]));
+                                                  'aria-labelledby' => $id]),
+                             ['class' => 'dropdown']);
   }
 }
diff --git a/library/templates/Intonation/View/Cardify.php b/library/templates/Intonation/View/Cardify.php
index 15ef690808f..f4d0c3e2760 100644
--- a/library/templates/Intonation/View/Cardify.php
+++ b/library/templates/Intonation/View/Cardify.php
@@ -53,11 +53,7 @@ class Intonation_View_Cardify extends ZendAfi_View_Helper_BaseHelper {
                            $link,
                            ['class' => 'card-block card-img-overlay rounded text-center']);
 
-    $img = $this->view->tagImg($this->view->url(['module' => 'opac',
-                                                 'controller' => 'index',
-                                                 'action' => 'picture',
-                                                 'url' => $element->getPicture(),
-                                                 'hidde' => 'extension'], null, true),
+    $img = $this->view->tagImg($element->getPicture(),
                                ['class' => 'd-block text-center img_as_background',
                                 'alt' => '']);
 
diff --git a/tests/scenarios/Templates/TemplatesTest.php b/tests/scenarios/Templates/TemplatesTest.php
index 2e2f44b4e82..c6758dbec54 100644
--- a/tests/scenarios/Templates/TemplatesTest.php
+++ b/tests/scenarios/Templates/TemplatesTest.php
@@ -1481,7 +1481,7 @@ class TemplatesScrollWidgetTest extends TemplatesIntonationTestCase {
   /** @test */
   public function dispatchFrontShouldContainsScrollUp() {
     $this->dispatch('/opac/index/index/id_profil/72', true);
-    $this->assertXPath('//a/i[contains(@class, "arrow-circle-up")]');
+    $this->assertXPath('//button/i[contains(@class, "arrow-circle-up")]');
   }
 }
 
-- 
GitLab