diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 801dff6b..cb07d5fc 100755 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -19,6 +19,21 @@ class gallery extends common { const SORT_ASC = 'SORT_ASC'; const SORT_DSC = 'SORT_DSC'; const SORT_HAND = 'SORT_HAND'; + const GALLERY_VERSION = '2.18'; + + public static $directories = []; + + public static $firstPictures = []; + + public static $galleries = []; + + public static $galleriesId = []; + + public static $pictures = []; + + public static $picturesId = []; + + public static $thumbs = []; public static $actions = [ 'config' => self::GROUP_MODERATOR, @@ -51,64 +66,65 @@ class gallery extends common { ]; public static $galleryThemeSize = [ - '9em' => 'Très petite (9em)', - '12em' => 'Petite (12em)', - '15em' => 'Moyenne (15em)', - '18em' => 'Grande (18em)', - '21em' => 'Très grande (21em)' + '9em' => 'Très petite', + '12em' => 'Petite', + '15em' => 'Moyenne', + '18em' => 'Grande', + '21em' => 'Très grande' ]; public static $galleryThemeLegendHeight = [ - '.125em' => 'Très petite (.125 em)', - '.25em' => 'Petite (.25em)', - '.375em' => 'Moyenne (.375em)', - '.5em' => 'Grande (.5em)', - '.625em' => 'Très grande (.625em)' + '.125em' => 'Très petite', + '.25em' => 'Petite', + '.375em' => 'Moyenne', + '.5em' => 'Grande', + '.625em' => 'Très grande' ]; public static $galleryThemeBorder = [ '0em' => 'Aucune', - '.1em' => 'Très petite (.1em)', - '.4em' => 'Petite (.2em)', - '.5em' => 'Moyenne (.5em)', - '.8em' => 'Grande (.8em)', - '1.2em' => 'Très grande (1.2em)' + '.1em' => 'Très petite', + '.4em' => 'Petite', + '.5em' => 'Moyenne', + '.8em' => 'Grande', + '1.2em' => 'Très grande' ]; public static $galleryThemeOpacity = [ '1' => 'Aucun ', - '.9' => 'Très Discrète (.9)', - '.8' => 'Discrète (0.8)', - '.7' => 'Moyenne (0.7)', - '.6' => 'Forte (0.6)', - '.5' => 'Très forte (0.5)' + '.9' => 'Très Discrète', + '.8' => 'Discrète', + '.7' => 'Moyenne', + '.6' => 'Forte', + '.5' => 'Très forte' ]; public static $galleryThemeMargin = [ '0em' => 'Aucune', - '.1em' => 'Très petite (.1em)', - '.3em' => 'Petite (.3em)', - '.6em' => 'Moyenne (.6em)', - '.9em' => 'Grande (.9em)', - '1.2em' => 'Très grande (1.2em)' + '.1em' => 'Très petite', + '.3em' => 'Petite', + '.6em' => 'Moyenne', + '.9em' => 'Grande', + '1.2em' => 'Très grande' ]; - public static $directories = []; - - public static $firstPictures = []; - - public static $galleries = []; - - public static $galleriesId = []; - - public static $pictures = []; - - public static $picturesId = []; - - public static $thumbs = []; - - const GALLERY_VERSION = '2.17'; + public static $galleryThemeRadius = [ + '0px' => 'Aucun', + '5px' => 'Très léger', + '10px' => 'Léger', + '15px' => 'Moyen', + '25px' => 'Important', + '50px' => 'Très important' + ]; + public static $galleryThemeShadows = [ + '0px' => 'Aucune', + '1px 1px 5px' => 'Très légère', + '1px 1px 10px' => 'Légère', + '1px 1px 15px' => 'Moyenne', + '1px 1px 25px' => 'Importante', + '1px 1px 50px' => 'Très importante' + ]; /** * Tri de la liste des galeries @@ -579,17 +595,19 @@ 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'), - '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'), + '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 @@ -603,6 +621,8 @@ class gallery extends common { $content = str_replace('#thumbBorder#',$this->getinput('galleryThemeThumbBorder'),$content ); $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('#thumbRadius#',$this->getinput('galleryThemeThumbRadius'),$content ); $content = str_replace('#legendAlign#',$this->getinput('galleryThemeLegendAlign'),$content ); $content = str_replace('#legendHeight#',$this->getinput('galleryThemeLegendHeight'),$content ); $content = str_replace('#legendTextColor#',$this->getinput('galleryThemeLegendTextColor'),$content ); diff --git a/module/gallery/ressource/defaultdata.php b/module/gallery/ressource/defaultdata.php index 207ce317..e9f9e134 100644 --- a/module/gallery/ressource/defaultdata.php +++ b/module/gallery/ressource/defaultdata.php @@ -1,16 +1,18 @@ 'center', - 'thumbWidth' => '18em', - 'thumbHeight' => '15em', - 'thumbMargin' => '.6em', - 'thumbBorder' => '.1em', - 'thumbOpacity' => '.7', - 'ThumbBorderColor' => 'rgba(221, 221, 221, 1)', - 'legendHeight' => '.375em', - 'legendAlign' => 'center', - 'legendTextColor'=> 'rgba(255, 255, 255, 1)', - 'legendBgColor' => 'rgba(0, 0, 0, .6)' + 'thumbAlign' => 'center', + 'thumbWidth' => '18em', + 'thumbHeight' => '15em', + 'thumbMargin' => '.6em', + 'thumbBorder' => '.1em', + 'thumbOpacity' => '.7', + 'thumbBorderColor' => 'rgba(221, 221, 221, 1)', + 'thumbRadius' => '5px', + 'thumbShadows' => '1px 1px 5px', + 'legendHeight' => '.375em', + 'legendAlign' => 'center', + 'legendTextColor' => 'rgba(255, 255, 255, 1)', + 'legendBgColor' => 'rgba(0, 0, 0, .6)' ]; } diff --git a/module/gallery/ressource/theme.css b/module/gallery/ressource/theme.css index 7f6170fc..064a30f7 100644 --- a/module/gallery/ressource/theme.css +++ b/module/gallery/ressource/theme.css @@ -9,6 +9,8 @@ position: relative; -webkit-transition: opacity .3s ease-out; transition: opacity .3s ease-out; + border-radius: var(--thumbRadius); + box-shadow: var(--thumbShadows) ; } .galleryPicture:hover, .galleryGalleryPicture:hover { @@ -35,7 +37,7 @@ .colPicture { width : var(--thumbWidth); max-width: 50%; - margin: var(--thumbMargin); + padding: var(--thumbMargin); } @media (max-width: 432px) { diff --git a/module/gallery/ressource/vartheme.css b/module/gallery/ressource/vartheme.css index e483de6e..f526bc2c 100644 --- a/module/gallery/ressource/vartheme.css +++ b/module/gallery/ressource/vartheme.css @@ -10,6 +10,8 @@ --thumbHeight: #thumbHeight#; --thumbBorder: #thumbBorder#; --thumbBorderColor: #thumbBorderColor#; + --thumbRadius: #thumbRadius#; + --thumbShadows: #thumbShadows#; } .galleryName, .galleryGalleryName { diff --git a/module/gallery/view/gallery/gallery.css b/module/gallery/view/gallery/gallery.css index f5bfb291..3f7315aa 100644 --- a/module/gallery/view/gallery/gallery.css +++ b/module/gallery/view/gallery/gallery.css @@ -10,6 +10,8 @@ --thumbHeight: 15em; --thumbBorder: .1em; --thumbBorderColor: rgba(221, 221, 221, 1); + --thumbRadius: 5px; + --thumbShadows: 1px 1px 5px; } .galleryName, .galleryGalleryName { @@ -33,6 +35,8 @@ position: relative; -webkit-transition: opacity .3s ease-out; transition: opacity .3s ease-out; + border-radius: var(--thumbRadius); + box-shadow: var(--thumbShadows) ; } .galleryPicture:hover, .galleryGalleryPicture:hover { @@ -59,7 +63,7 @@ .colPicture { width : var(--thumbWidth); max-width: 50%; - margin: var(--thumbMargin); + padding: var(--thumbMargin); } @media (max-width: 432px) { diff --git a/module/gallery/view/index/index.css b/module/gallery/view/index/index.css index f5bfb291..3f7315aa 100644 --- a/module/gallery/view/index/index.css +++ b/module/gallery/view/index/index.css @@ -10,6 +10,8 @@ --thumbHeight: 15em; --thumbBorder: .1em; --thumbBorderColor: rgba(221, 221, 221, 1); + --thumbRadius: 5px; + --thumbShadows: 1px 1px 5px; } .galleryName, .galleryGalleryName { @@ -33,6 +35,8 @@ position: relative; -webkit-transition: opacity .3s ease-out; transition: opacity .3s ease-out; + border-radius: var(--thumbRadius); + box-shadow: var(--thumbShadows) ; } .galleryPicture:hover, .galleryGalleryPicture:hover { @@ -59,7 +63,7 @@ .colPicture { width : var(--thumbWidth); max-width: 50%; - margin: var(--thumbMargin); + padding: var(--thumbMargin); } @media (max-width: 432px) { diff --git a/module/gallery/view/theme/theme.php b/module/gallery/view/theme/theme.php index 0533707e..c53eb401 100755 --- a/module/gallery/view/theme/theme.php +++ b/module/gallery/view/theme/theme.php @@ -15,55 +15,73 @@
-

Configuration des vignettes

+

Configuration des vignettes

-
- 'Alignement des vignettes sur la page :', - 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbAlign']) - ]); ?> -
-
+
'Largeur des vignettes :', + 'label' => 'Largeur', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbWidth']) ]); ?>
-
+
'Hauteur des vignettes :', + 'label' => 'Hauteur', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbHeight']) ]); ?>
-
-
+
+
+ 'Alignement', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbAlign']) + ]); ?> +
+
'Marges autour des vignettes :', + 'label' => 'Marges', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbMargin']) ]); ?>
-
+
+
+
'Epaisseur des bordures', + 'label' => 'Bordures', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbBorder']) ]); ?> -
-
- 'colorPicker', - 'help' => 'Le curseur horizontal règle le niveau de transparence.', - 'label' => 'Couleur de la bordure', - 'value' => $this->getData(['theme', $this->getUrl(0),'ThumbBorderColor']) - ]); ?> -
-
+
+
'Opacité au survol', 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbOpacity']) ]); ?>
+
+
+ 'Bords arrondis', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbRadius']) + ]); ?> +
+
+ 'Ombres', + 'selected' => $this->getData(['theme', $this->getUrl(0),'thumbShadows']) + ]); ?> +
+
+
+
+ 'colorPicker', + 'help' => 'Le curseur horizontal règle le niveau de transparence.', + 'label' => 'Couleur de la bordure', + 'value' => $this->getData(['theme', $this->getUrl(0),'thumbBorderColor']) + ]); ?> +
+
@@ -72,35 +90,35 @@

Configuration des légendes

-
- 'Hauteur des légendes :', - 'selected' => $this->getData(['theme', $this->getUrl(0),'legendHeight']) - ]); ?> -
-
- 'Alignement des légendes dans les vignettes :', - 'selected' => $this->getData(['theme', $this->getUrl(0),'legendAlign']) - ]); ?> -
-
-
-
+
'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', - 'label' => 'Couleur du texte de légende', + 'label' => 'Texte', 'value' => $this->getData(['theme', $this->getUrl(0),'legendTextColor']) ]); ?>
-
+
'colorPicker', 'help' => 'Le curseur horizontal règle le niveau de transparence.', - 'label' => 'Couleur du fond de la légende', + 'label' => 'Fond', 'value' => $this->getData(['theme', $this->getUrl(0),'legendBgColor']) ]); ?> +
+
+
+
+ 'Hauteur', + 'selected' => $this->getData(['theme', $this->getUrl(0),'legendHeight']) + ]); ?> +
+
+ 'Alignement:', + 'selected' => $this->getData(['theme', $this->getUrl(0),'legendAlign']) + ]); ?>