From d2b6c54418010b59b17774f2bad1287c66b1106f Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 19 Aug 2020 21:08:00 +0200 Subject: [PATCH] =?UTF-8?q?Gallery=20stockage=20unique=20des=20param=C3=A8?= =?UTF-8?q?tres=20de=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/gallery/gallery.php | 8 +++---- module/gallery/view/gallery/gallery.css | 24 ++++++++++----------- module/gallery/view/index/index.css | 24 ++++++++++----------- module/gallery/view/theme/theme.php | 28 ++++++++++++------------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 91b865ce..84a2ba19 100755 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -19,7 +19,7 @@ class gallery extends common { const SORT_ASC = 'SORT_ASC'; const SORT_DSC = 'SORT_DSC'; const SORT_HAND = 'SORT_HAND'; - const GALLERY_VERSION = '2.26'; + const GALLERY_VERSION = '2.3'; public static $directories = []; @@ -608,14 +608,14 @@ class gallery extends common { } // Initialisation des données de thème de la galerie dasn theme.json // Création des valeur par défaut absentes - if ( $this->getData(['theme', $this->getUrl(0)]) === null ) { + if ( $this->getData(['theme', 'gallery']) === null ) { require_once('module/gallery/ressource/defaultdata.php'); - $this->setData(['theme', $this->getUrl(0), theme::$defaultData]); + $this->setData(['theme', 'gallery', theme::$defaultData]); } // Soumission du formulaire if($this->isPost()) { - $this->setData(['theme', $this->getUrl(0), [ + $this->setData(['theme', 'gallery', [ 'thumbAlign' => $this->getinput('galleryThemeThumbAlign'), 'thumbWidth' => $this->getinput('galleryThemeThumbWidth'), 'thumbHeight' => $this->getinput('galleryThemeThumbHeight'), diff --git a/module/gallery/view/gallery/gallery.css b/module/gallery/view/gallery/gallery.css index a9da4105..b8f9959e 100755 --- a/module/gallery/view/gallery/gallery.css +++ b/module/gallery/view/gallery/gallery.css @@ -2,28 +2,28 @@ --thumbAlign: center; } .colPicture { - --thumbWidth: 18em; - --thumbMargin: .5em; + --thumbWidth: 15em; + --thumbMargin: .3em; } .galleryPicture, .galleryGalleryPicture { - --thumbHeight: 15em; - --thumbBorder: .1em; - --thumbBorderColor: rgba(221, 221, 221, 1); - --thumbRadius: .3em; - --thumbShadows: 1px 1px 10px; - --thumbShadowsColor: rgba(125, 125, 125, 1); + --thumbHeight: 12em; + --thumbBorder: 0em; + --thumbBorderColor: rgba(121, 176, 214, 1); + --thumbRadius: 0em; + --thumbShadows: 0px; + --thumbShadowsColor: rgba(29, 72, 104, 1); } .galleryName, .galleryGalleryName { - --legendHeight: .375em; + --legendHeight: .125em; --legendAlign: center; - --legendTextColor: rgba(255, 255, 255, 1); - --legendBgColor: rgba(0, 0, 0, .6); + --legendTextColor: rgba(4, 21, 39, 1); + --legendBgColor: rgba(143, 181, 184, 0.74); } .galleryPicture:hover, .galleryGalleryPicture:hover { - --thumbOpacity: .7; + --thumbOpacity: 1; } .galleryPicture, .galleryGalleryPicture { diff --git a/module/gallery/view/index/index.css b/module/gallery/view/index/index.css index a9da4105..b8f9959e 100755 --- a/module/gallery/view/index/index.css +++ b/module/gallery/view/index/index.css @@ -2,28 +2,28 @@ --thumbAlign: center; } .colPicture { - --thumbWidth: 18em; - --thumbMargin: .5em; + --thumbWidth: 15em; + --thumbMargin: .3em; } .galleryPicture, .galleryGalleryPicture { - --thumbHeight: 15em; - --thumbBorder: .1em; - --thumbBorderColor: rgba(221, 221, 221, 1); - --thumbRadius: .3em; - --thumbShadows: 1px 1px 10px; - --thumbShadowsColor: rgba(125, 125, 125, 1); + --thumbHeight: 12em; + --thumbBorder: 0em; + --thumbBorderColor: rgba(121, 176, 214, 1); + --thumbRadius: 0em; + --thumbShadows: 0px; + --thumbShadowsColor: rgba(29, 72, 104, 1); } .galleryName, .galleryGalleryName { - --legendHeight: .375em; + --legendHeight: .125em; --legendAlign: center; - --legendTextColor: rgba(255, 255, 255, 1); - --legendBgColor: rgba(0, 0, 0, .6); + --legendTextColor: rgba(4, 21, 39, 1); + --legendBgColor: rgba(143, 181, 184, 0.74); } .galleryPicture:hover, .galleryGalleryPicture:hover { - --thumbOpacity: .7; + --thumbOpacity: 1; } .galleryPicture, .galleryGalleryPicture { diff --git a/module/gallery/view/theme/theme.php b/module/gallery/view/theme/theme.php index 704cb0c7..d9759a14 100755 --- a/module/gallery/view/theme/theme.php +++ b/module/gallery/view/theme/theme.php @@ -20,25 +20,25 @@
'Largeur', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbWidth']) + 'selected' => $this->getData(['theme', 'gallery','thumbWidth']) ]); ?>
'Hauteur', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbHeight']) + 'selected' => $this->getData(['theme', 'gallery','thumbHeight']) ]); ?>
'Alignement', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbAlign']) + 'selected' => $this->getData(['theme', 'gallery','thumbAlign']) ]); ?>
'Marge', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbMargin']) + 'selected' => $this->getData(['theme', 'gallery','thumbMargin']) ]); ?>
@@ -46,7 +46,7 @@
'Bordure', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbBorder']) + 'selected' => $this->getData(['theme', 'gallery','thumbBorder']) ]); ?>
@@ -54,13 +54,13 @@ 'class' => 'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', 'label' => 'Couleur de la bordure', - 'value' => $this->getData(['theme', $this->getUrl(0),'thumbBorderColor']) + 'value' => $this->getData(['theme', 'gallery','thumbBorderColor']) ]); ?>
'Arrondi des angles', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbRadius']) + 'selected' => $this->getData(['theme', 'gallery','thumbRadius']) ]); ?>
@@ -68,7 +68,7 @@
'Ombre', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbShadows']) + 'selected' => $this->getData(['theme', 'gallery','thumbShadows']) ]); ?>
@@ -76,13 +76,13 @@ 'class' => 'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', 'label' => 'Couleur de l\'ombre', - 'value' => $this->getData(['theme', $this->getUrl(0),'thumbShadowsColor']) + 'value' => $this->getData(['theme', 'gallery','thumbShadowsColor']) ]); ?>
'Opacité au survol', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbOpacity']) + 'selected' => $this->getData(['theme', 'gallery','thumbOpacity']) ]); ?>
@@ -99,7 +99,7 @@ 'class' => 'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', 'label' => 'Texte', - 'value' => $this->getData(['theme', $this->getUrl(0),'legendTextColor']) + 'value' => $this->getData(['theme', 'gallery','legendTextColor']) ]); ?>
@@ -107,19 +107,19 @@ 'class' => 'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', 'label' => 'Fond', - 'value' => $this->getData(['theme', $this->getUrl(0),'legendBgColor']) + 'value' => $this->getData(['theme', 'gallery','legendBgColor']) ]); ?>
'Hauteur', - 'selected' => $this->getData(['theme', $this->getUrl(0),'legendHeight']) + 'selected' => $this->getData(['theme', 'gallery','legendHeight']) ]); ?>
'Alignement', - 'selected' => $this->getData(['theme', $this->getUrl(0),'legendAlign']) + 'selected' => $this->getData(['theme', 'gallery','legendAlign']) ]); ?>