diff --git a/CHANGES.md b/CHANGES.md index eb47161e..721f8914 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,13 +1,15 @@ # Changelog ## version 10.1.000 -- Nouveauté : +- Nouveautés : - Thème des écrans d'administration modifiable (configuration, utilisateurs : etc.) + - Thème du site : couleur de l'encadrement et la bordure des blocs. + - Thème du menu : couleur du texte de la page active - Corrections : - Configuration SMTP : sur-cryptage du mot de passe. - Quelques corrections liées à l'hébergeur Free. - Modification : - - Optimisation des opérations de disque, mis en cache en lecture des données de pages. Aucun cache en écriture. + - Optimisation des opérations de disque, mise en cache en lecture des données de pages. Aucun cache en écriture. - Mise à jour : - TinyMCE 4.9.10 diff --git a/core/core.php b/core/core.php index d3834e71..644043c4 100755 --- a/core/core.php +++ b/core/core.php @@ -173,8 +173,8 @@ class common { $this->user = $this->getData(['user', $this->getInput('ZWII_USER_ID')]); } - // Mise ne cache des pages - $this->page = $this->readPageCache(); + // Mise en cache des pages + $this->page = $this->getPageCache(); // Construit la liste des pages parents/enfants if($this->hierarchy['all'] === []) { @@ -435,7 +435,7 @@ class common { * Lecture des fichiers de données de page et mise ne cache * @param @return string données des pages */ - public function readPageCache() { + public function getPageCache() { // Trois tentatives for($i = 0; $i < 3; $i++) { $data =json_decode(file_get_contents(self::DATA_DIR.'fr/page.json'), true); @@ -443,7 +443,7 @@ class common { return($data); } elseif($i === 2) { - exit('Unable to read data file.'); + exit('Erreur fatale : impossible d\'accéder aux pages'); } // Pause de 10 millisecondes usleep(10000); @@ -1409,7 +1409,7 @@ class core extends common { // Icône BacktoTop $css .= '#backToTop {background-color:' .$this->getData(['theme', 'body', 'toTopbackgroundColor']). ';color:'.$this->getData(['theme', 'body', 'toTopColor']).';}'; // Site - $colors = helper::colorVariants($this->getData(['theme', 'text', 'linkTextColor'])); + $colors = helper::colorVariants($this->getData(['theme', 'text', 'linkColor'])); $css .= 'a{color:' . $colors['normal'] . '}'; $css .= 'a:hover{color:' . $colors['darken'] . '}'; $css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}'; @@ -1433,6 +1433,9 @@ class core extends common { $css .= '.button:active,button[type=\'submit\']:active,.pagination a:active{background-color:' . $colors['veryDarken'] . '}'; $colors = helper::colorVariants($this->getData(['theme', 'title', 'textColor'])); $css .= 'h1,h2,h3,h4,h5,h6{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'title', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}'; + // Les blocs + $colors = helper::colorVariants($this->getData(['theme', 'block', 'backgroundColor'])); + $css .= '.block {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) . ';}.block h4 {background:'. $colors['normal'] . ';color:' . $colors['text'] .';}'; // Bannière $colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor'])); if($this->getData(['theme', 'header', 'margin'])) { diff --git a/core/layout/common.css b/core/layout/common.css index a14be0cc..8ec57525 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -829,7 +829,7 @@ footer #footerSocials .zwiico-github:hover { /* Bloc */ .block { - border: 1px solid #D8DFE3; +/* border: 1px solid #D8DFE3;*/ padding: 20px 20px 10px; margin: 20px 0; word-wrap: break-word; @@ -844,7 +844,7 @@ footer #footerSocials .zwiico-github:hover { .block h4 { margin: -20px -20px 10px -20px; padding: 10px; - background: #ECEFF1; +/* background: #ECEFF1;*/ } /* Aides */ diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 75be736a..df8b3dcd 100755 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -144,11 +144,15 @@ class init extends common { 'shadow' => '0', 'width' => '960px' ], + 'block' => [ + 'backgroundBlockColor' => 'rgba(236, 239, 241, 1)', + 'borderColor' => 'rgba(236, 239, 241, 1)' + ], 'text' => [ 'font' => 'Open+Sans', 'fontSize' => '13px', 'textColor' => 'rgba(33, 34, 35, 1)', - 'linkTextColor' => 'rgba(74, 105, 189, 1)' + 'linkColor' => 'rgba(74, 105, 189, 1)' ], 'title' => [ 'font' => 'Oswald', @@ -174,7 +178,7 @@ class init extends common { 'backgroundColorButtonRed' => 'rgba(231, 76, 60, 1)', 'backgroundColorButtonGreen' => 'rgba(57, 112, 12, 1)', 'backgroundBlockColor' => 'rgba(236, 239, 241, 1)', - 'borderBlockColor' => 'rgba(236, 239, 241, 1)', + 'borderBlockColor' => 'rgba(236, 239, 241, 1)' ], ]; diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 32cd0607..2c924a55 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -568,18 +568,22 @@ class theme extends common { 'font' => $this->getInput('themeTextFont'), 'fontSize' => $this->getInput('themeTextFontSize'), 'textColor' => $this->getInput('themeTextTextColor'), - 'linkTextColor'=> $this->getInput('themeTextLinkTextColor') + 'linkColor'=> $this->getInput('themeTextLinkColor') ]]); $this->setData(['theme', 'site', [ 'backgroundColor' => $this->getInput('themeSiteBackgroundColor'), 'radius' => $this->getInput('themeSiteRadius'), 'shadow' => $this->getInput('themeSiteShadow'), 'width' => $this->getInput('themeSiteWidth'), - 'margin' => $this->getInput('themeSiteMargin',helper::FILTER_BOOLEAN), + 'margin' => $this->getInput('themeSiteMargin',helper::FILTER_BOOLEAN) ]]); $this->setData(['theme', 'button', [ - 'backgroundColor' => $this->getInput('themeButtonBackgroundColor'), - ]]); + 'backgroundColor' => $this->getInput('themeButtonBackgroundColor') + ]]); + $this->setData(['theme', 'block', [ + 'backgroundColor' => $this->getInput('themeBlockBackgroundColor'), + 'borderColor' => $this->getInput('themeBlockBorderColor') + ]]); // Valeurs en sortie $this->addOutput([ 'notification' => 'Modifications enregistrées', diff --git a/core/module/theme/view/admin/admin.php b/core/module/theme/view/admin/admin.php index 6bc7e5f0..2b085452 100755 --- a/core/module/theme/view/admin/admin.php +++ b/core/module/theme/view/admin/admin.php @@ -8,13 +8,7 @@ 'value' => 'Retour' ]); ?> -