gallery initialisation config

This commit is contained in:
Fred Tempez 2022-05-21 15:24:57 +02:00
parent 7b01190bcd
commit 0276406577
2 changed files with 20 additions and 14 deletions

View File

@ -226,6 +226,7 @@ class gallery extends common {
if ( $this->getData(['module', $this->getUrl(0), 'theme']) === null ) { if ( $this->getData(['module', $this->getUrl(0), 'theme']) === null ) {
require_once('module/gallery/ressource/defaultdata.php'); require_once('module/gallery/ressource/defaultdata.php');
$this->setData(['module', $this->getUrl(0), 'theme', theme::$defaultTheme]); $this->setData(['module', $this->getUrl(0), 'theme', theme::$defaultTheme]);
$this->setData(['module', $this->getUrl(0), 'config', theme::$defaultConfig]);
// Nom de la feuille de style // Nom de la feuille de style
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]); $this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
} }

View File

@ -1,20 +1,25 @@
<?php <?php
class theme extends gallery { class theme extends gallery {
public static $defaultTheme = [ public static $defaultTheme = [
'thumbAlign' => 'center', 'thumbAlign' => 'center',
'thumbWidth' => '18em', 'thumbWidth' => '18em',
'thumbHeight' => '15em', 'thumbHeight' => '15em',
'thumbMargin' => '.5em', 'thumbMargin' => '.5em',
'thumbBorder' => '.1em', 'thumbBorder' => '.1em',
'thumbOpacity' => '.7', 'thumbOpacity' => '.7',
'thumbBorderColor' => 'rgba(221, 221, 221, 1)', 'thumbBorderColor' => 'rgba(221, 221, 221, 1)',
'thumbRadius' => '.3em', 'thumbRadius' => '.3em',
'thumbShadows' => '1px 1px 10px', 'thumbShadows' => '1px 1px 10px',
'thumbShadowsColor'=> 'rgba(125, 125, 125, 1)', 'thumbShadowsColor' => 'rgba(125, 125, 125, 1)',
'legendHeight' => '.375em', 'legendHeight' => '.375em',
'legendAlign' => 'center', 'legendAlign' => 'center',
'legendTextColor' => 'rgba(255, 255, 255, 1)', 'legendTextColor' => 'rgba(255, 255, 255, 1)',
'legendBgColor' => 'rgba(0, 0, 0, .6)' 'legendBgColor' => 'rgba(0, 0, 0, .6)'
];
public static $defaultConfig = [
"showUniqueGallery" => false,
"backPosition" => "top",
"backAlign" => "center"
]; ];
public static $defaultData = [ public static $defaultData = [
'versionData' => '3.0' 'versionData' => '3.0'