diff --git a/assets/src/legacy/view.js b/assets/src/legacy/view.js index 8d19529bf0..633b119ac1 100644 --- a/assets/src/legacy/view.js +++ b/assets/src/legacy/view.js @@ -1,16 +1,3 @@ -var addDescriptionSlider = function(){ - $('.liz-project-img').parent().mouseenter(function(){ - var self = $(this); - self.find('.liz-project-desc').slideDown(); - }).mouseleave(function(){ - var self = $(this); - self.find('.liz-project-desc').hide(); - }).click(function(){ - var self = $(this); - window.location = self.parent().find('a.liz-project-view').attr('href'); - return false; - }); -} var searchProjects = function(){ // Hide search if there are no projects @@ -287,6 +274,5 @@ var searchProjects = function(){ } window.addEventListener('load', function () { - addDescriptionSlider(); searchProjects(); }); diff --git a/lizmap/modules/view/classes/lizmapMainViewItem.class.php b/lizmap/modules/view/classes/lizmapMainViewItem.class.php index fc909783d9..6630d6deb5 100644 --- a/lizmap/modules/view/classes/lizmapMainViewItem.class.php +++ b/lizmap/modules/view/classes/lizmapMainViewItem.class.php @@ -35,7 +35,7 @@ public function __construct($id, $title, $abstract = '', $keywordList = '', $pro $this->abstract = $abstract; $this->keywordList = $keywordList; $this->proj = $proj; - $this->bbox = $bbox; + $this->bbox = preg_replace('/([0-9]+\.[0-9]{2})[0-9]+/', '$1', $bbox); $this->url = $url; $this->img = $img; $this->order = $order; diff --git a/lizmap/modules/view/templates/view.tpl b/lizmap/modules/view/templates/view.tpl index d125dae95c..98bc5175c6 100644 --- a/lizmap/modules/view/templates/view.tpl +++ b/lizmap/modules/view/templates/view.tpl @@ -14,8 +14,9 @@
diff --git a/lizmap/www/assets/css/view.css b/lizmap/www/assets/css/view.css index 6460ee1dbf..ef47aef14e 100644 --- a/lizmap/www/assets/css/view.css +++ b/lizmap/www/assets/css/view.css @@ -20,7 +20,7 @@ .liz-project-desc { color: white; font-size: 0.8em; - line-height: 0.8em; + line-height: 0em; position: absolute; bottom:-1px; right:0px; @@ -28,10 +28,16 @@ text-align: left; text-transform: none; background-color: rgba(0, 0, 0, 0.5); - padding:5px; + padding:0px; margin:0px; overflow-wrap: break-word; } +.liz-project:hover .liz-project-desc { + line-height: 0.8em; + transition: line-height 300ms ease-in; + padding:5px; +} + .liz-project-title{ overflow-wrap: anywhere;