From b9e5c6fb3a57632c18ef8b4c34a5d8b37b95f487 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 19 Apr 2020 19:43:37 +0200 Subject: [PATCH] =?UTF-8?q?Couleur=20des=20ombres=20+=20valeurs=20par=20d?= =?UTF-8?q?=C3=A9faut=20plus=20faibles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/gallery/gallery.php | 48 ++++++++++++------------ module/gallery/ressource/defaultdata.php | 7 ++-- module/gallery/ressource/theme.css | 4 +- module/gallery/ressource/vartheme.css | 1 + module/gallery/view/gallery/gallery.css | 19 ++++++---- module/gallery/view/index/index.css | 19 ++++++---- module/gallery/view/theme/theme.php | 32 ++++++++++------ 7 files changed, 75 insertions(+), 55 deletions(-) mode change 100644 => 100755 module/gallery/view/gallery/gallery.css mode change 100644 => 100755 module/gallery/view/index/index.css diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 197ed04e..92c48cf6 100755 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -84,10 +84,10 @@ class gallery extends common { public static $galleryThemeBorder = [ '0em' => 'Aucune', '.1em' => 'Très fine', - '.2em' => 'Fine', - '.4em' => 'Moyenne', - '.8em' => 'Epaisse', - '1em' => 'Epaisse' + '.3em' => 'Fine', + '.5em' => 'Moyenne', + '.7em' => 'Epaisse', + '.9em' => 'Epaisse' ]; public static $galleryThemeOpacity = [ @@ -102,10 +102,10 @@ class gallery extends common { public static $galleryThemeMargin = [ '0em' => 'Aucune', '.1em' => 'Très petite', - '.4em' => 'Petite', - '.6em' => 'Moyenne', - '1em' => 'Grande', - '2.5em' => 'Très grande' + '.3em' => 'Petite', + '.5em' => 'Moyenne', + '.7em' => 'Grande', + '.9em' => 'Très grande' ]; public static $galleryThemeRadius = [ @@ -595,19 +595,20 @@ class gallery extends common { if($this->isPost()) { $this->setData(['theme', $this->getUrl(0), [ - 'thumbAlign' => $this->getinput('galleryThemeThumbAlign'), - 'thumbWidth' => $this->getinput('galleryThemeThumbWidth'), - 'thumbHeight' => $this->getinput('galleryThemeThumbHeight'), - 'thumbMargin' => $this->getinput('galleryThemeThumbMargin'), - 'thumbBorder' => $this->getinput('galleryThemeThumbBorder'), - 'thumbBorderColor'=> $this->getinput('galleryThemeThumbBorderColor'), - 'thumbOpacity' => $this->getinput('galleryThemeThumbOpacity'), - 'thumbShadows' => $this->getinput('galleryThemeThumbShadows'), - 'thumbRadius' => $this->getinput('galleryThemeThumbRadius'), - 'legendHeight' => $this->getinput('galleryThemeLegendHeight'), - 'legendAlign' => $this->getinput('galleryThemeLegendAlign'), - 'legendTextColor' => $this->getinput('galleryThemeLegendTextColor'), - 'legendBgColor' => $this->getinput('galleryThemeLegendBgColor') + 'thumbAlign' => $this->getinput('galleryThemeThumbAlign'), + 'thumbWidth' => $this->getinput('galleryThemeThumbWidth'), + 'thumbHeight' => $this->getinput('galleryThemeThumbHeight'), + 'thumbMargin' => $this->getinput('galleryThemeThumbMargin'), + 'thumbBorder' => $this->getinput('galleryThemeThumbBorder'), + 'thumbBorderColor' => $this->getinput('galleryThemeThumbBorderColor'), + 'thumbOpacity' => $this->getinput('galleryThemeThumbOpacity'), + 'thumbShadows' => $this->getinput('galleryThemeThumbShadows'), + 'thumbShadowsColor' => $this->getinput('galleryThemeThumbShadowsColor'), + 'thumbRadius' => $this->getinput('galleryThemeThumbRadius'), + 'legendHeight' => $this->getinput('galleryThemeLegendHeight'), + 'legendAlign' => $this->getinput('galleryThemeLegendAlign'), + 'legendTextColor' => $this->getinput('galleryThemeLegendTextColor'), + 'legendBgColor' => $this->getinput('galleryThemeLegendBgColor') ] ]); // Création des fichiers CSS @@ -622,6 +623,7 @@ class gallery extends common { $content = str_replace('#thumbBorderColor#',$this->getinput('galleryThemeThumbBorderColor'),$content ); $content = str_replace('#thumbOpacity#',$this->getinput('galleryThemeThumbOpacity'),$content ); $content = str_replace('#thumbShadows#',$this->getinput('galleryThemeThumbShadows'),$content ); + $content = str_replace('#thumbShadowsColor#',$this->getinput('galleryThemeThumbShadowsColor'),$content ); $content = str_replace('#thumbRadius#',$this->getinput('galleryThemeThumbRadius'),$content ); $content = str_replace('#legendAlign#',$this->getinput('galleryThemeLegendAlign'),$content ); $content = str_replace('#legendHeight#',$this->getinput('galleryThemeLegendHeight'),$content ); @@ -632,13 +634,13 @@ class gallery extends common { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . $this->getUrl() . '/theme', - 'notification' => $succes ? 'Modifications enregistrées' : 'Modifications non enregistées !', + 'notification' => $success ? 'Modifications enregistrées' : 'Modifications non enregistées !', 'state' => $success ]); } // Valeurs en sortie $this->addOutput([ - 'title' => "Thème du module", + 'title' => "Thème", 'view' => 'theme', 'vendor' => [ 'tinycolorpicker' diff --git a/module/gallery/ressource/defaultdata.php b/module/gallery/ressource/defaultdata.php index a058126b..7a66f120 100755 --- a/module/gallery/ressource/defaultdata.php +++ b/module/gallery/ressource/defaultdata.php @@ -4,12 +4,13 @@ class theme extends gallery { 'thumbAlign' => 'center', 'thumbWidth' => '18em', 'thumbHeight' => '15em', - 'thumbMargin' => '.6em', + 'thumbMargin' => '.5em', 'thumbBorder' => '.1em', 'thumbOpacity' => '.7', 'thumbBorderColor' => 'rgba(221, 221, 221, 1)', - 'thumbRadius' => '.3em', - 'thumbShadows' => '1px 1px 10px', + 'thumbRadius' => '.3em', + 'thumbShadows' => '1px 1px 10px', + 'thumbShadowsColor'=> 'rgba(125, 125, 125, 1)', 'legendHeight' => '.375em', 'legendAlign' => 'center', 'legendTextColor' => 'rgba(255, 255, 255, 1)', diff --git a/module/gallery/ressource/theme.css b/module/gallery/ressource/theme.css index 12b92e4d..c0608f9a 100755 --- a/module/gallery/ressource/theme.css +++ b/module/gallery/ressource/theme.css @@ -10,7 +10,9 @@ -webkit-transition: opacity .3s ease-out; transition: opacity .3s ease-out; border-radius: var(--thumbRadius); - box-shadow: var(--thumbShadows) ; + box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); } .galleryPicture:hover, .galleryGalleryPicture:hover { diff --git a/module/gallery/ressource/vartheme.css b/module/gallery/ressource/vartheme.css index f526bc2c..bd665d49 100755 --- a/module/gallery/ressource/vartheme.css +++ b/module/gallery/ressource/vartheme.css @@ -12,6 +12,7 @@ --thumbBorderColor: #thumbBorderColor#; --thumbRadius: #thumbRadius#; --thumbShadows: #thumbShadows#; + --thumbShadowsColor: #thumbShadowsColor#; } .galleryName, .galleryGalleryName { diff --git a/module/gallery/view/gallery/gallery.css b/module/gallery/view/gallery/gallery.css old mode 100644 new mode 100755 index 7e4bddad..d03364d2 --- a/module/gallery/view/gallery/gallery.css +++ b/module/gallery/view/gallery/gallery.css @@ -1,17 +1,18 @@ .galleryRow { - --thumbAlign: center; + --thumbAlign: space-around; } .colPicture { - --thumbWidth: 18em; - --thumbMargin: .6em; + --thumbWidth: 21em; + --thumbMargin: .9em; } .galleryPicture, .galleryGalleryPicture { - --thumbHeight: 15em; + --thumbHeight: 12em; --thumbBorder: .1em; - --thumbBorderColor: rgba(221, 221, 221, 1); - --thumbRadius: .6em; - --thumbShadows: 1px 1px 5px; + --thumbBorderColor: rgba(251, 1, 1, 0.48); + --thumbRadius: 0em; + --thumbShadows: 1px 1px 25px; + --thumbShadowsColor: rgba(253, 16, 16, 0.37); } .galleryName, .galleryGalleryName { @@ -36,7 +37,9 @@ -webkit-transition: opacity .3s ease-out; transition: opacity .3s ease-out; border-radius: var(--thumbRadius); - box-shadow: var(--thumbShadows) ; + box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); } .galleryPicture:hover, .galleryGalleryPicture:hover { diff --git a/module/gallery/view/index/index.css b/module/gallery/view/index/index.css old mode 100644 new mode 100755 index 7e4bddad..d03364d2 --- a/module/gallery/view/index/index.css +++ b/module/gallery/view/index/index.css @@ -1,17 +1,18 @@ .galleryRow { - --thumbAlign: center; + --thumbAlign: space-around; } .colPicture { - --thumbWidth: 18em; - --thumbMargin: .6em; + --thumbWidth: 21em; + --thumbMargin: .9em; } .galleryPicture, .galleryGalleryPicture { - --thumbHeight: 15em; + --thumbHeight: 12em; --thumbBorder: .1em; - --thumbBorderColor: rgba(221, 221, 221, 1); - --thumbRadius: .6em; - --thumbShadows: 1px 1px 5px; + --thumbBorderColor: rgba(251, 1, 1, 0.48); + --thumbRadius: 0em; + --thumbShadows: 1px 1px 25px; + --thumbShadowsColor: rgba(253, 16, 16, 0.37); } .galleryName, .galleryGalleryName { @@ -36,7 +37,9 @@ -webkit-transition: opacity .3s ease-out; transition: opacity .3s ease-out; border-radius: var(--thumbRadius); - box-shadow: var(--thumbShadows) ; + box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); } .galleryPicture:hover, .galleryGalleryPicture:hover { diff --git a/module/gallery/view/theme/theme.php b/module/gallery/view/theme/theme.php index 0f7c6fb7..5e756cc9 100755 --- a/module/gallery/view/theme/theme.php +++ b/module/gallery/view/theme/theme.php @@ -37,7 +37,7 @@
'Marges', + 'label' => 'Marge', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbMargin']) ]); ?>
@@ -45,7 +45,7 @@
'Bordures', + 'label' => 'Bordure', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbBorder']) ]); ?>
@@ -59,24 +59,32 @@
'Bords arrondis', + 'label' => 'Arrondi des angles', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbRadius']) ]); ?>
-
+
+ 'Ombre', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbShadows']) + ]); ?> +
+
+ 'colorPicker', + 'help' => 'Le curseur horizontal règle le niveau de transparence.', + 'label' => 'Couleur de l\'ombre', + 'value' => $this->getData(['theme', $this->getUrl(0),'thumbShadowsColor']) + ]); ?> +
+
'Opacité au survol', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbOpacity']) ]); ?> -
-
- 'Ombres', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbShadows']) - ]); ?> -
+
@@ -110,7 +118,7 @@
'Alignement:', + 'label' => 'Alignement', 'selected' => $this->getData(['theme', $this->getUrl(0),'legendAlign']) ]); ?>