From 9254b16e7187f8efa30e1503cfd1e19f34b018e9 Mon Sep 17 00:00:00 2001 From: Deltacms Date: Tue, 15 Feb 2022 15:46:04 +0100 Subject: [PATCH] =?UTF-8?q?Font=20identification=20par=20name=20=C3=A0=20l?= =?UTF-8?q?a=20place=20de=20la=20clef?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 28 ++----------------- README.md | 2 +- core/core.php | 22 +++++++-------- core/include/update.inc.php | 9 ++++-- core/module/install/ressource/defaultdata.php | 2 +- core/module/theme/theme.php | 8 +++--- 6 files changed, 26 insertions(+), 45 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 709e779..338eecb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # Changelog +## Version 3.2.02 de Deltacms +- Modifications : + ## Version 3.2.01 de Deltacms - Modifications : - nouvelles polices 'Open Font License' hébergées en local, l'administrateur peut ajouter des polices. @@ -37,30 +40,5 @@ - Import de thème, modification du nom des fichiers importés pour éviter l'écrasement des fichiers de même nom. Deltacms a été créé à partir de la version 11.2.00.24 de ZwiiCMS -## Version 11.2.00 de ZwiiCMS -Mises à jour : - - jQuery v3.6.0 - - Lity v2.4.1 - - Lightbox v2.10.1 - - Faltpickr v4.6.9 - - FavIcon Switcher v1.2.2 -- Corrections : - - Configuration, restauration d'une archive du site : - - la validation du formulaire sans avoir sélectionné de fichier de sauvegarde provoque le crash du site. - - la conversion des URL des ressources ne fonctionnait plus depuis l'externalisation du contenu des pages dans des fichiers séparés. - - Multi-langues : - - Bug auto détection du navigateur. - - Page site map, correction d'erreurs et rénovation de la présentation. -- Modifications : - - Gestion des cookies : - - Options de personnalisation du message d'acceptation des cookies, acceptation ou refus du cookie Google Analytics, affichage de la page des mentions légales. - - Etiquette dans le footer permettant d'afficher la popup des cookies. - - Thème : - - Disposition des options de configuration du site. - - Bannière : le contenu peut être personnalisé à l'aide d'un éditeur. La bannière au-dessus du site peut s'étendre sur la largeur de la page. - - Pages : il est désormais possible de donner un nom de page court qui sera utilisé dans le menu du site, dans les barres latérales et dans les sélecteurs de page (éditeur / lien). En revanche le nom de la page affiché en haut de celle-ci est inchangé. Dans la plupart des cas le titre court sera identique au titre. - - Les écrans d'aide renvoient vers le site doc.zwiicms.fr - - Mise en évidence du statut des pages dans la liste de la barre d'administration. Rouge italique : page orpheline ; Orange gras page inactive. - - Référencement, l'URL de la page d'accueil (www.site.fr/accueil) est remplacée par la base Url du site (www.site.fr/) afin d'éviter la duplication de contenu. diff --git a/README.md b/README.md index 9bc42bb..9ab595d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# DeltaCMS 3.2.01 +# DeltaCMS 3.2.02 DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. diff --git a/core/core.php b/core/core.php index fa2b3d0..b4f4529 100644 --- a/core/core.php +++ b/core/core.php @@ -48,7 +48,7 @@ class common { // Numéro de version const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/'; - const DELTA_VERSION = '3.2.01'; + const DELTA_VERSION = '3.2.02'; const DELTA_UPDATE_CHANNEL = "v3"; public static $actions = []; @@ -2265,7 +2265,7 @@ class core extends common { $format = 'woff2'; break; } - $css .= '@font-face{ font-family: "'. $value .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $file; + $css .= '@font-face{ font-family: "'. $this->getData(['fonts', $value, 'name' ]) .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $file; $css .= '") format("'. $format . '"); font-weight: normal; font-style: normal;}'; $css .= ' '; } @@ -2274,7 +2274,7 @@ class core extends common { // Fond du body $colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor'])); // Body - $css .= 'body{font-family:"' . $this->getData(['theme', 'text', 'font']) . '",sans-serif}'; + $css .= 'body{font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'text', 'font']), 'name']) . '",sans-serif}'; if($themeBodyImage = $this->getData(['theme', 'body', 'image'])) { // Image dans html pour éviter les déformations. $css .= 'html {background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}'; @@ -2292,7 +2292,7 @@ class core extends common { $colors = helper::colorVariants($this->getData(['theme', 'text', 'linkColor'])); $css .= 'a{color:' . $colors['normal'] . '}'; // Couleurs de site dans TinyMCe - $css .= 'div.mce-edit-area {font-family:"' . $this->getData(['theme', 'text', 'font']) . '",sans-serif}'; + $css .= 'div.mce-edit-area {font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'text', 'font']), 'name']) . '",sans-serif}'; // Site dans TinyMCE $css .= '.editorWysiwyg {background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . '; margin:0 !important; padding-top: 10px;}'; $css .= 'span.mce-text{background-color: unset !important;}'; @@ -2333,7 +2333,7 @@ class core extends common { $css .= '.helpButton span:hover{color:' . $colors['darken'] . '}'; $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,h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:' . $colors['normal'] . ';font-family:"' . $this->getData(['theme', 'title', 'font']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}'; + $css .= 'h1,h2,h3,h4,h5,h6,h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:' . $colors['normal'] . ';font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'title', 'font']), 'name']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}'; $css .= 'h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{color:' . $colors['darken'] . '}'; // Les blocs $colors = helper::colorVariants($this->getData(['theme', 'block', 'backgroundTitleColor'])); @@ -2369,7 +2369,7 @@ class core extends common { $css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}'; } $colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor'])); - $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . $this->getData(['theme', 'header', 'font']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}'; + $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'header', 'font']), 'name']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}'; } // Bannière au contenu personnalisé @@ -2418,7 +2418,7 @@ class core extends common { $css .= 'nav{padding:0 10px;}'; } - $css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) .';font-family:"' . $this->getData(['theme', 'menu', 'font']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}'; + $css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) .';font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'menu', 'font']), 'name']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}'; // Pied de page $colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor'])); @@ -2428,7 +2428,7 @@ class core extends common { $css .= 'footer{padding:0}'; } - $css .= 'footer span, #footerText > p {color:' . $this->getData(['theme', 'footer', 'textColor']) . ';font-family:"' . $this->getData(['theme', 'footer', 'font']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'footer', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'footer', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'footer', 'textTransform']) . '}'; + $css .= 'footer span, #footerText > p {color:' . $this->getData(['theme', 'footer', 'textColor']) . ';font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'footer', 'font']), 'name']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'footer', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'footer', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'footer', 'textTransform']) . '}'; $css .= 'footer {background-color:' . $colors['normal'] . ';color:' . $this->getData(['theme', 'footer', 'textColor']) . '}'; $css .= 'footer a{color:' . $this->getData(['theme', 'footer', 'textColor']) . '}'; $css .= 'footer #footersite > div {margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}'; @@ -2488,7 +2488,7 @@ class core extends common { $format = 'woff2'; break; } - $css .= '@font-face{ font-family: "'. $key .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $value['file']; + $css .= '@font-face{ font-family: "'. $value['name'] .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $value['file']; $css .= '") format("'. $format . '"); font-weight: normal; font-style: normal;}'; $css .= ' '; } @@ -2497,8 +2497,8 @@ class core extends common { } $colors = helper::colorVariants($this->getData(['admin','backgroundColor'])); $css .= '#site{background-color:' . $colors['normal']. ';}'; - $css .= '.row > div {font:' . $this->getData(['admin','fontSize']) . ' "' . $this->getData(['admin','fontText']) . '", sans-serif;}'; - $css .= 'body h1, h2, h3, .block h4, h5, h6 {font-family:' . $this->getData(['admin','fontTitle' ]) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}'; + $css .= '.row > div {font:' . $this->getData(['admin','fontSize']) . ' "' . $this->getData(['fonts', $this->getData(['admin', 'fontText']), 'name']) . '", sans-serif;}'; + $css .= 'body h1, h2, h3, .block h4, h5, h6 {font-family:' . $this->getData(['fonts', $this->getData(['admin', 'fontTitle']), 'name']) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}'; // TinyMCE $css .= 'body:not(.editorWysiwyg),span .zwiico-help {color:' . $this->getData(['admin','colorText']) . ';}'; diff --git a/core/include/update.inc.php b/core/include/update.inc.php index d3784ca..4b29060 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -3,9 +3,12 @@ * Mises à jour suivant les versions de DeltaCMS */ -if ($this->getData(['core', 'dataVersion']) < 3201) { - +if ($this->getData(['core', 'dataVersion']) < 3202) { + //Forcer une mise à jour de admin.css + $this->setData(['admin', 'maj', true]); + //Forcer une mise à jour de theme.css + if (file_exists(self::DATA_DIR . '/theme.css')) unlink (self::DATA_DIR . '/theme.css'); // Mise à jour - $this->setData(['core', 'dataVersion', 3201]); + $this->setData(['core', 'dataVersion', 3202]); } ?> diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 2d48f0f..deab9a5 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -55,7 +55,7 @@ class init extends common { ] ], 'core' => [ - 'dataVersion' => 3201, + 'dataVersion' => 3202, 'lastBackup' => 0, 'lastClearTmp' => 0, 'lastAutoUpdate' => 0, diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 193134d..1d50255 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -330,10 +330,10 @@ class theme extends common { foreach($fontsName as $fontsId => $value) { self::$fonts[] = [ - ''.$fontsId.'', - ''.$this->getData(['fonts', $fontsId, 'name']).'', - ''.$this->getData(['fonts', $fontsId, 'file']).'', - 'TPQtpq741àéèôüç', + ''.$fontsId.'', + ''.$this->getData(['fonts', $fontsId, 'name']).'', + ''.$this->getData(['fonts', $fontsId, 'file']).'', + 'TPQtpq741àéèôüç', template::button('fontsEdit' . $fontsId, [ 'href' => helper::baseUrl() . 'theme/editFonts/' . $fontsId, 'value' => template::ico('pencil')