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 ) {
require_once('module/gallery/ressource/defaultdata.php');
$this->setData(['module', $this->getUrl(0), 'theme', theme::$defaultTheme]);
$this->setData(['module', $this->getUrl(0), 'config', theme::$defaultConfig]);
// Nom de la feuille de style
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
}

View File

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