diff --git a/core/core.php b/core/core.php index d3b2ccec..558f14fc 100644 --- a/core/core.php +++ b/core/core.php @@ -34,7 +34,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '10.0.007.dev'; + const ZWII_VERSION = '10.0.008.dev'; public static $actions = []; public static $coreModuleIds = [ diff --git a/core/module/install/install.php b/core/module/install/install.php index 9e49f967..986ef295 100755 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -51,15 +51,19 @@ class install extends common { $userLastname = $this->getInput('installLastname', helper::FILTER_STRING_SHORT, true); $userMail = $this->getInput('installMail', helper::FILTER_MAIL, true); $userId = $this->getInput('installId', helper::FILTER_ID, true); + // Copier la bannière par défaut + mkdir(self::FILE_DIR.'source/banner/'); + mkdir(self::FILE_DIR.'thumb/banner/'); + copy('core/module/install/ressource/file/source/banner960.jpg',self::FILE_DIR.'source/banner/banner960.jpg'); + copy('core/module/install/ressource/file/thumb/banner960.jpg',self::FILE_DIR.'thumb/banner/banner960.jpg'); // Configure certaines données par défaut if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === TRUE) { $this->initData('page','fr',true); $this->initData('module','fr',true); - } else { $this->setData(['module', 'blog', 'mon-premier-article', 'userId', $userId]); $this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]); - $this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]); - } + $this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]); + } $success = $this->setData([ 'user', $userId, diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 5b0397dd..2e168884 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -15,13 +15,13 @@ class init extends common { 'pinterestId' => '', 'twitterId' => '', 'youtubeId' => '', - 'githubId' => '' + 'githubId' => 'fredtempez/ZwiiCMS/' ], 'timezone' => 'Europe/Paris', 'itemsperPage' => 10, 'legalPageId' => '', 'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.', - 'title' => 'Zwii, votre site en quelques clics !' + 'title' => 'Votre site en quelques clics !' ], 'core' => [ 'dataVersion' => 10000, @@ -104,14 +104,14 @@ class init extends common { 'fontSize' => '2em', 'fontWeight' => 'normal', 'height' => '150px', - 'image' => 'banniere/zwii_banniere-960px.jpg', + 'image' => 'banner/banner960.jpg', 'imagePosition' => 'center center', 'imageRepeat' => 'no-repeat', 'margin' => false, 'position' => 'site', 'textAlign' => 'center', 'textColor' => 'rgba(33, 34, 35, 1)', - 'textHide' => true, + 'textHide' => false, 'textTransform' => 'none', 'linkHomePage' => true, 'imageContainer' => 'auto' diff --git a/core/module/install/ressource/file/source/banner960.jpg b/core/module/install/ressource/file/source/banner960.jpg new file mode 100644 index 00000000..158e0608 Binary files /dev/null and b/core/module/install/ressource/file/source/banner960.jpg differ diff --git a/core/module/install/ressource/file/thumb/banner960.jpg b/core/module/install/ressource/file/thumb/banner960.jpg new file mode 100644 index 00000000..8a65fb5b Binary files /dev/null and b/core/module/install/ressource/file/thumb/banner960.jpg differ diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 70afd9a2..29349052 100755 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -30,6 +30,7 @@ $("input, select").on("change", function() { // Informations affichées $("#themeHeaderImageHeight").html(tmpImg.height + "px"); $("#themeHeaderImageWidth").html(tmpImg.width + "px"); + $("#themeHeaderImageRatio").html(tmpImg.width / tmpImg.height); // Limiter la hauteur à 600 px if (tmpImg.height > 600) { diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index 135cdfb6..9a68ebc4 100755 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -83,7 +83,7 @@
- Dimensions de l'image : largeur - hauteur + Dimensions de l'image : largeur - hauteur - ratio
diff --git a/core/module/theme/view/menu/menu.php b/core/module/theme/view/menu/menu.php index bb55a627..f23cc8ad 100755 --- a/core/module/theme/view/menu/menu.php +++ b/core/module/theme/view/menu/menu.php @@ -38,7 +38,7 @@
is_null($this->getData(['theme', 'menu', 'activeColor'])) ? true : $this->getData(['theme', 'menu', 'activeColorAuto']), + 'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']), 'help' => 'La couleur de fond de la page active peut être définie automatique ou selon une couleur définie, comme par exemple celle de fond des pages.' ]); ?>