diff --git a/CHANGES.md b/CHANGES.md
index 1a7c9e2..177b4ea 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,16 @@
# Changelog
+## Version 4.4.04 de Deltacms
+- Modifications :
+ - Edition / Tinymce : nouveau blocs de texte 3-6-3,
+ - Thème / site : modification des options 'Largeur du site' qui passent en valeurs relatives 75vw, 85vw, 95vw, 100%,
+ - Modules de page / thème : le thème des modules de page est maintenant modifiable par custom.css,
+ - Site fluide sur petit écran : nouveau seuil à 800px, nettoyage et réorganisation du fichier css principal,
+ - Configuration / configuration : modification de la mise à jour automatique pour prendre en compte les incompatibilités du serveur.
+- Corrections :
+ - Module Form : en absence de champ 'File' un fichier fantôme était émis, logo associé au message compatible avec androïd,
+ - Thème / gestion / sauvegarde : le dossier et les images de la bannière animée sont sauvegardés dans le zip.
+
## Version 4.4.03 de Deltacms
- Modifications :
- Thème / bannière : nouvelle option, une bannière animée avec Swiper,
diff --git a/README.md b/README.md
index c70ed0b..e360117 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-# DeltaCMS 4.4.03
+# DeltaCMS 4.4.04
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.
L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une des principales langues européennes.
diff --git a/core/class/template.class.php b/core/class/template.class.php
index edf63be..c57a4ee 100644
--- a/core/class/template.class.php
+++ b/core/class/template.class.php
@@ -611,7 +611,7 @@ class template {
'ico' => 'check',
'id' => $nameId,
'name' => $nameId,
- 'uniqueSubmission' => false, //true avant 9.1.08
+ 'uniqueSubmission' => false,
'value' => 'Enregistrer'
], $attributes);
// Retourne le html
diff --git a/core/core.php b/core/core.php
index cd81aac..f8f837e 100644
--- a/core/core.php
+++ b/core/core.php
@@ -49,7 +49,7 @@ class common {
// Numéro de version
const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/';
- const DELTA_VERSION = '4.4.03';
+ const DELTA_VERSION = '4.4.04';
const DELTA_UPDATE_CHANNEL = "v4";
public static $actions = [];
@@ -120,7 +120,8 @@ class common {
'tippy',
'zwiico',
'imagemap',
- 'simplelightbox'
+ 'simplelightbox',
+ 'swiper'
],
'view' => ''
];
@@ -950,7 +951,7 @@ class common {
// Update robots.txt file in output directory
if ($this->getData(['config','seo', 'robots']) === true) {
- unlink('robots.txt');
+ if(file_exists('robots.txt')) unlink('robots.txt');
$sitemap->updateRobots();
} else {
file_put_contents('robots.txt','User-agent: *' . PHP_EOL . 'Disallow: /');
@@ -1432,12 +1433,12 @@ class common {
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'right') { $this->showSocials(true); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'right') { $this->showCopyright(true); }
echo '';
-
+
if($this->getData(['theme', 'footer', 'textPosition']) === 'hide') { $this->showFooterText(false); }
if($this->getData(['theme', 'footer', 'socialsPosition']) === 'hide') { $this->showSocials(false); }
if($this->getData(['theme', 'footer', 'copyrightPosition']) === 'hide') { $this->showCopyright(false); }
-
+
// Fermeture du contenaire
echo '';
echo '';
@@ -1450,7 +1451,7 @@ class common {
if($footerText = $this->getData(['theme', 'footer', 'text']) OR $this->getUrl(0) === 'theme') {
$style = '';
if( $visibility === false ) $style = 'style="display: none;"';
- echo '
';
+ echo '';
}
}
@@ -1583,8 +1584,8 @@ class common {
}
if($socials !== '') {
$style = '';
- if( $visibility === false ) $style = 'style="display: none;"';
- echo '';
+ if( $visibility === false ) $style = 'style="display: none;"';
+ echo '';
}
}
@@ -1599,17 +1600,16 @@ class common {
if($favicon &&
file_exists(self::FILE_DIR.'source/' . $favicon)
) {
- echo '';
+ echo '';
} else {
- echo '';
+ echo '';
}
// Dark scheme
$faviconDark = $this->getData(['config', 'faviconDark']);
if(!empty($faviconDark) &&
file_exists(self::FILE_DIR.'source/' . $faviconDark)
) {
- echo '';
- //echo '';
+ echo '';
echo '';
}
}
@@ -1923,9 +1923,6 @@ class common {
}
/**
- * Affiche le meta titre
- */
- /**
* Affiche les balises title et meta name
*/
public function showMetaTitle() {
@@ -2086,15 +2083,21 @@ class common {
// Une mise à jour est disponible + recherche auto activée + 1 jour de délai
if ( $this->getData(['config','autoUpdate']) === true
AND $today > $this->getData(['core','lastAutoUpdate']) + 86400 ) {
- if ( helper::checkNewVersion(common::DELTA_UPDATE_CHANNEL) ) {
- $this->setData(['core','updateAvailable', true]);
- $this->setData(['core','lastAutoUpdate',$today]);
+ $version = helper::getOnlineVersion();
+ if( $version === false){
+ // Le serveur ne supporte pa la mise à jour automatique
+ $this->setData(['config','autoUpdate',false]);
+ } else {
+ if ( version_compare(common::DELTA_VERSION,$version) === -1 ) {
+ $this->setData(['core','updateAvailable', true]);
+ $this->setData(['core','lastAutoUpdate',$today]);
+ }
}
}
// Afficher le bouton : Mise à jour détectée + activée
if ( $this->getData(['core','updateAvailable']) === true &&
$this->getData(['config','autoUpdate']) === true ) {
- $rightItems .= '' . template::ico('update colorRed') . '';
+ $rightItems .= '' . template::ico('update colorRed') . '';
}
}
if($this->getUser('group') >= self::GROUP_EDITOR) {
@@ -2126,9 +2129,9 @@ class common {
if($this->output['style']) {
echo '';
if (strpos($this->output['style'], 'admin.css') >= 1 ) {
- echo '';
+ echo ''.PHP_EOL;
}
- echo '';
+ echo '';
}
}
@@ -2148,8 +2151,6 @@ class common {
echo '';
// Librairies
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
- // Ajout si bannière animée
- if($this->getData(['theme', 'header', 'feature']) === 'swiper') $this->output['vendor'] = array_merge ( $this->output['vendor'] , array('swiper') );
foreach($this->output['vendor'] as $vendorName) {
// Coeur
if(file_exists('core/vendor/' . $vendorName . '/inc.json')) {
@@ -2329,7 +2330,7 @@ class core extends common {
$format = 'woff2';
break;
}
- $css .= '@font-face{ font-family: "'. $this->getData(['fonts', $value, 'name' ]) .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $file;
+ $css .= '@font-face{ font-family: "'. $this->getData(['fonts', $value, 'name' ]) .'"; src: url("../file/source/fonts/' . $file;
$css .= '") format("'. $format . '"); font-weight: normal; font-style: normal;}';
$css .= ' ';
}
@@ -2363,7 +2364,9 @@ class core extends common {
//$css .= 'a:hover:not(.inputFile, button){color:' . $colors['darken'] . '}';
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
- $css .= 'select,input[type=\'password\'],input[type=\'email\'],input[type=\'text\'],.inputFile,select,textarea{color:' . $this->getData(['theme', 'text', 'textColor']) .';background-color:'.$this->getData(['theme', 'site', 'backgroundColor']).';}';
+ $css .= 'select,input[type=\'password\'],input[type=\'email\'],input[type=\'text\'],.inputFile,select,textarea{color:' . $this->getData(['theme', 'text', 'textColor']) .';background-color:'.$this->getData(['theme', 'site', 'backgroundColor']).';border-color:'.$this->getData(['theme', 'block', 'borderColor']).';}';
+ $css .= 'select:focus-visible,input[type=\'password\']:focus-visible,input[type=\'email\']:focus-visible,input[type=\'text\']:focus-visible,.inputFile:focus-visible,textarea:focus-visible{border-color:'.$this->getData(['theme', 'block', 'borderColor']).';}';
+ $css .= 'select:hover,input[type=\'password\']:hover,input[type=\'email\']:hover,input[type=\'text\']:hover,.inputFile:hover,textarea:hover{border-color:'.$this->getData(['theme', 'block', 'borderColor']).';}';
// spécifiques au module de blog
$css .= '.blogDate {color:' . $this->getData(['theme', 'text', 'textColor']) . ';}.blogPicture img{border:1px solid ' . $this->getData(['theme', 'text', 'textColor']) . '; box-shadow: 1px 1px 5px ' . $this->getData(['theme', 'text', 'textColor']) . ';}';
// Couleur fixée dans admin.css
@@ -2373,25 +2376,24 @@ class core extends common {
// Marge supplémentaire lorsque le pied de page est fixe
if ( $this->getData(['theme', 'footer', 'fixed']) === true &&
$this->getData(['theme', 'footer', 'position']) === 'body') {
- //$css .= '@media (min-width: 769px) { #site {margin-bottom: ' . ((str_replace ('px', '', $this->getData(['theme', 'footer', 'height']) ) * 2 ) + 31 ) . 'px}}';
- //$css .= '@media (max-width: 768px) { #site {margin-bottom: ' . ((str_replace ('px', '', $this->getData(['theme', 'footer', 'height']) ) * 2 ) + 93 ) . 'px}}';
$marginBottomLarge = ((str_replace ('px', '', $this->getData(['theme', 'footer', 'height']) ) * 2 ) + 31 ) . 'px';
$marginBottomSmall = ((str_replace ('px', '', $this->getData(['theme', 'footer', 'height']) ) * 2 ) + 93 ) . 'px';
} else {
$marginBottomSmall = $margin;
$marginBottomLarge = $margin;
}
+ $css .= '@media screen and (max-width: 799px) { .container { max-width: 100vw; } }';
$css .= $this->getData(['theme', 'site', 'width']) === '100%'
- ? '@media (min-width: 769px) {#site{margin:0 auto ' . $marginBottomLarge . ' 0 !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' 0 !important;}}#site.light{margin:5% auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}'
- : '@media (min-width: 769px) {#site{margin: ' . $margin . ' auto ' . $marginBottomLarge . ' auto !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' auto !important;}}#site.light{margin: 5% auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} ';
- $css .= $this->getData(['theme', 'site', 'width']) === '750px'
+ ? '@media (min-width: 800px) {#site{margin:0 auto ' . $marginBottomLarge . ' 0 !important;}}@media (max-width: 799px) {#site{margin:0 auto ' . $marginBottomSmall . ' 0 !important;}}#site.light{margin:5% auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}'
+ : '@media (min-width: 800px) {#site{margin: ' . $margin . ' auto ' . $marginBottomLarge . ' auto !important;}}@media (max-width: 799px) {#site{margin:0 auto ' . $marginBottomSmall . ' auto !important;}}#site.light{margin: 5% auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} ';
+ $css .= $this->getData(['theme', 'site', 'width']) === '75vw'
? '.button, button{font-size:0.8em;}'
: '';
$css .= '#site{background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';border-radius:' . $this->getData(['theme', 'site', 'radius']) . ';box-shadow:' . $this->getData(['theme', 'site', 'shadow']) . ' #212223;}';
$colors = helper::colorVariants($this->getData(['theme', 'button', 'backgroundColor']));
$css .= '.speechBubble,.button,.button:hover,button[type=\'submit\'],.pagination a,.pagination a:hover,input[type=\'checkbox\']:checked + label:before,input[type=\'radio\']:checked + label:before,.helpContent{background-color:' . $colors['normal'] . ';color:' . $colors['text'] . '}';
$css .= '.helpButton span{color:' . $colors['normal'] . '}';
- $css .= 'input[type=\'text\']:hover,input[type=\'password\']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:' . $colors['normal'] . '}';
+ //$css .= 'input[type=\'text\']:hover,input[type=\'password\']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:' . $colors['normal'] . '}';
$css .= '.speechBubble:before{border-color:' . $colors['normal'] . ' transparent transparent transparent}';
$css .= '.button:hover,button[type=\'submit\']:hover,.pagination a:hover,input[type=\'checkbox\']:not(:active):checked:hover + label:before,input[type=\'checkbox\']:active + label:before,input[type=\'radio\']:checked:hover + label:before,input[type=\'radio\']:not(:checked):active + label:before{background-color:' . $colors['darken'] . '}';
$css .= '.helpButton span:hover{color:' . $colors['darken'] . '}';
@@ -2511,7 +2513,7 @@ class core extends common {
$css .= 'footer #footersite > div {margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
$css .= 'footer #footerbody > div {margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
- $css .= '@media (max-width: 768px) {footer #footerbody > div { padding: 2px }}';
+ $css .= '@media (max-width: 799px) {footer #footerbody > div { padding: 2px }}';
$css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}';
$css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
@@ -2567,7 +2569,7 @@ class core extends common {
$format = 'woff2';
break;
}
- $css .= '@font-face{ font-family: "'. $value['name'] .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $value['file'];
+ $css .= '@font-face{ font-family: "'. $value['name'] .'"; src: url("../file/source/fonts/' . $value['file'];
$css .= '") format("'. $format . '"); font-weight: normal; font-style: normal;}';
$css .= ' ';
}
@@ -2586,7 +2588,7 @@ class core extends common {
$css .= 'input[type="checkbox"]:checked + label::before,.speechBubble{background-color:' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
$css .= '.speechBubble::before {border-color:' . $colors['normal'] . ' transparent transparent transparent;}';
$css .= '.button {background-color:' . $colors['normal'] . ';color:' . $colors['text'] . ';}.button:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
- $css .= '.buttonPreview {background-color:' . $colors['normal'] . '!important;color:' . $colors['text'] . '!important;}.buttonPreview:hover {background-color:' . $colors['darken'] . '!important;color:' . $colors['text'] . '!important;}.buttonPreview:active {background-color:' . $colors['veryDarken'] . '!important;color:' . $colors['text'] . '!important;}';
+ $css .= '.buttonPreview {background-color:' . $colors['normal'] . '!important;color:' . $colors['text'] . '!important;}.buttonPreview:hover {background-color:' . $colors['darken'] . '!important;color:' . $colors['text'] . '!important;}.buttonPreview:active {background-color:' . $colors['veryDarken'] . '!important;color:' . $colors['text'] . '!important;}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGrey']));
$css .= '.button.buttonGrey {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGrey:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonGrey:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonRed']));
diff --git a/core/include/update.inc.php b/core/include/update.inc.php
index 3e19385..0bf1247 100644
--- a/core/include/update.inc.php
+++ b/core/include/update.inc.php
@@ -105,4 +105,12 @@ if ($this->getData(['core', 'dataVersion']) < 4403) {
// Mise à jour
$this->setData(['core', 'dataVersion', 4403]);
}
+
+if ($this->getData(['core', 'dataVersion']) < 4404) {
+ if( $this->getData(['theme', 'site', 'width']) === '750px') $this->setData(['theme', 'site', 'width', '75vw']);
+ if( $this->getData(['theme', 'site', 'width']) === '960px') $this->setData(['theme', 'site', 'width', '85vw']);
+ if( $this->getData(['theme', 'site', 'width']) === '1170px') $this->setData(['theme', 'site', 'width', '95vw']);
+ // Mise à jour
+ $this->setData(['core', 'dataVersion', 4404]);
+}
?>
diff --git a/core/layout/blank.php b/core/layout/blank.php
index 5ec6c86..6e80095 100644
--- a/core/layout/blank.php
+++ b/core/layout/blank.php
@@ -1,23 +1,22 @@
-
+
showMetaTitle();
- $this->showMetaPropertyFacebook();
- ?>
- showFavicon();
$this->showVendor();
- $this->showStyle();
?>
+
-
+ showStyle(); ?>
+
+
showContent(); ?>
showScript(); ?>
-
\ No newline at end of file
+