diff --git a/.htaccess b/.htaccess index 9a668810..f7d3c8d8 100755 --- a/.htaccess +++ b/.htaccess @@ -1,10 +1,11 @@ -# Cache le PHPSESSID de l'url +# Cache le PHPSESSID de l'url SetEnv SESSION_USE_TRANS_SID 0 # Bloque l'accès à la liste des fichiers Options -Indexes # Attention, surtout ne rien modifier ci-dessous ! +<<<<<<< HEAD # URL rewriting RewriteEngine on @@ -13,3 +14,6 @@ Options -Indexes RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L] +======= +# URL rewriting +>>>>>>> 8.3.13 diff --git a/CHANGES.MD b/CHANGES.MD index 6112ca7d..5c9bf3a2 100644 --- a/CHANGES.MD +++ b/CHANGES.MD @@ -1,5 +1,13 @@ # ChangeLog + +Préversion 8.3.13 : +* Modifications : + - Bannière "responsive", nouvelles options de positionnement + - Bouton Edit dans Blog + - Options de position des menus selon la position de la bannière + - Mise à jour TinyMCE + ## version 8.3.12 : * Modification : - bouton de retour dans la page d'un article de blog diff --git a/core/core.php b/core/core.php index b65b0b43..b0beefa7 100644 --- a/core/core.php +++ b/core/core.php @@ -24,7 +24,7 @@ class common { const GROUP_MEMBER = 1; const GROUP_MODERATOR = 2; const GROUP_ADMIN = 3; - const ZWII_VERSION = '8.3.12'; + const ZWII_VERSION = '8.3.13'; public static $actions = []; public static $coreModuleIds = [ @@ -325,9 +325,8 @@ class common { 'textColor' => 'rgba(33, 34, 35, 1)', 'textHide' => false, 'textTransform' => 'none', - // Menu Image - 'linkHome' => 'false' - // Menu Image + 'linkHome' => 'false', + 'imageContainer' => 'auto' ], 'link' => [ 'textColor' => 'rgba(74, 105, 189, 1)' @@ -862,6 +861,13 @@ class common { $this->setData(['core', 'dataVersion', 826]); $this->SaveData(); } + // Version 8.3.13 + if($this->getData(['core', 'dataVersion']) < 8313) { + $this->setData(['theme','header','imageContainer','auto']); + $this->setData(['core', 'dataVersion', 8313]); + $this->SaveData(); + + } } } @@ -970,7 +976,11 @@ class core extends common { $css .= 'header{margin:20px 20px 0 20px}'; } } + $css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).'}'; $css .= 'header{background-color:' . $colors['normal'] . ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) . ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}'; + // Modif CrowueWeb pour la bannière + $css .= '@media (max-width: 767px) {header{height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;line-height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;}}'; + // Fin modif Croque Web if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) { $css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}'; } diff --git a/core/layout/common.css b/core/layout/common.css index b5d11e97..89d14300 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -286,6 +286,9 @@ body > header { } header { position: relative; + margin:0; + padding:0; + } header span { display: inline-block; diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 7b64a6d1..15e20c64 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -123,15 +123,20 @@ class theme extends common { '20px 15px' => 'Grande', '25px 15px' => 'Très grande' ]; - public static $menuPositions = [ - 'hide' => 'Caché', + public static $menuPositionsSite = [ 'site-first' => 'Dans le site avant la bannière', 'site-second' => 'Dans le site après la bannière', - 'body-top' => 'Au-dessus et en-dehors du site', - 'body-first' => 'Au dessus du site avant la bannière', - 'body-second' => 'Au dessus du site après la bannière' + 'body-top' => 'Au-dessus et en-dehors du site', + 'hide' => 'Caché' ]; + public static $menuPositionsBody = [ + 'body-first' => 'Au dessus du site avant la bannière', + 'body-second' => 'Au dessus du site après la bannière', + 'body-top' => 'Au-dessus et en-dehors du site', + 'hide' => 'Caché' + + ]; public static $radius = [ '0' => 'Aucun', '5px' => 'Très léger', @@ -181,6 +186,14 @@ class theme extends common { 'container-large' => 'sur la largeur de la page' ]; + public static $headerWide = [ + 'auto' => 'Automatique', + 'contain' => 'Image entière', + 'cover' => 'Largeur adaptée au fond', + '100% 100%' => 'Taille adaptée au fond' + + ]; + /** * Mode avancé */ @@ -292,11 +305,11 @@ class theme extends common { 'textAlign' => $this->getInput('themeHeaderTextAlign'), 'textColor' => $this->getInput('themeHeaderTextColor'), 'textHide' => $this->getInput('themeHeaderTextHide', helper::FILTER_BOOLEAN), - 'textTransform' => $this->getInput('themeHeaderTextTransform'), - // Menu Image - 'linkHome' => $this->getInput('themeHeaderlinkHome',helper::FILTER_BOOLEAN) - // Menu Image + 'textTransform' => $this->getInput('themeHeaderTextTransform'), + 'linkHome' => $this->getInput('themeHeaderlinkHome',helper::FILTER_BOOLEAN), + 'imageContainer' => $this->getInput('themeHeaderImageContainer') ]]); + // Valeurs en sortie $this->addOutput([ 'notification' => 'Modifications enregistrées', diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 2ec2b66d..e800a0fb 100755 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -16,9 +16,13 @@ $("input, select").on("change", function() { // Import des polices de caractères var headerFont = $("#themeHeaderFont").val(); + var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');"; + // Adaptation aux média + css += "@media (max-width: 767px) {header{height:" + $("#themeHeaderHeight").val() + "/2;line-height:" + $("#themeHeaderHeight").val() + "/2;}}"; // Couleurs, image, alignement et hauteur de la bannière css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";height:" + $("#themeHeaderHeight").val() + ";line-height:" + $("#themeHeaderHeight").val() + "}"; + var themeHeaderImage = $("#themeHeaderImage").val(); if(themeHeaderImage) { css += "header{background-image:url('site/file/source/" + themeHeaderImage + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + "}"; @@ -26,6 +30,8 @@ $("input, select").on("change", function() { else { css += "header{background-image:none}"; } + // Adaptation de la bannière + css += "header{background-size:" + $("#themeHeaderImageContainer").val() + "}"; // Taille, couleur, épaisseur et capitalisation du titre de la bannière css += "header span{color:" + $("#themeHeaderTextColor").val() + ";font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + "}"; // Cache le titre de la bannière diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index 8a737201..081d32e9 100755 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -57,9 +57,19 @@ ]); ?> - $this->getData(['theme', 'header', 'textHide']) - ]); ?> +
+
+ $this->getData(['theme', 'header', 'textHide']) + ]); ?> +
+
+ 'Taille', + 'selected' => $this->getData(['theme', 'header', 'imageContainer']) + ]); ?> +
+
diff --git a/core/module/theme/view/menu/menu.php b/core/module/theme/view/menu/menu.php index 100c640c..58b8aae2 100755 --- a/core/module/theme/view/menu/menu.php +++ b/core/module/theme/view/menu/menu.php @@ -66,10 +66,18 @@

Configuration

- getData(['theme', 'header', 'position']) == "site") + { echo template::select('themeMenuPosition', $module::$menuPositionsSite, [ 'label' => 'Position', 'selected' => $this->getData(['theme', 'menu', 'position']) - ]); ?> + ]); + }else{ + echo template::select('themeMenuPosition', $module::$menuPositionsBody, [ + 'label' => 'Position', + 'selected' => $this->getData(['theme', 'menu', 'position']) + ]); } + ?>
+getUser('group') >= self::GROUP_ADMIN): ?>
-
+
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . $this->getUrl(0), + 'ico' => 'left', + 'value' => 'Retour' + ]); ?> +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . '/blog/edit/' . $this->getUrl(1), + 'value' => 'Editer' + ]); ?> +
+
+
+
+ +
'buttonGrey', @@ -102,7 +123,8 @@ 'value' => 'Retour' ]); ?>
-
+
- \ No newline at end of file + + diff --git a/module/inclusion/inclusion.php b/module/inclusion/inclusion.php deleted file mode 100644 index 4023d48f..00000000 --- a/module/inclusion/inclusion.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @copyright Copyright (C) 2008-2018, Rémi Jean - * @license GNU General Public License, version 3 - * @link http://zwiicms.com/ - */ - -class inclusion extends common { - - public static $actions = [ - 'config' => self::GROUP_MODERATOR, - 'index' => self::GROUP_VISITOR - ]; - - /** - * Configuration - */ - public function config() { - // Soumission du formulaire - if($this->isPost()) { - $this->setData(['module', $this->getUrl(0), 'url', $this->getInput('inclusionConfigUrl', helper::FILTER_URL, true)]); - // Valeurs en sortie - $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(), - 'notification' => 'Modifications enregistrées', - 'state' => true - ]); - } - // Valeurs en sortie - $this->addOutput([ - 'title' => 'Configuration du module', - 'view' => 'config' - ]); - } - - /** - * Accueil - */ - public function index() { - // Message si l'utilisateur peut éditer la page - if( - $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - AND $this->getUser('group') >= self::GROUP_MODERATOR - AND $this->getUrl(1) !== 'force' - ) { - // Valeurs en sortie - $this->addOutput([ - 'display' => self::DISPLAY_LAYOUT_BLANK, - 'title' => '', - 'view' => 'index' - ]); - } - // Sinon inclusion - else { - // Incrémente le compteur de clics - $this->setData(['module', $this->getUrl(0), 'count', helper::filter($this->getData(['module', $this->getUrl(0), 'count']) + 1, helper::FILTER_INT)]); - // Valeurs en sortie - $this->addOutput([ - 'content' => '' , - 'state' => true - ]); - } - } - -} \ No newline at end of file diff --git a/module/inclusion/view/config/config.php b/module/inclusion/view/config/config.php deleted file mode 100644 index 9e4637d7..00000000 --- a/module/inclusion/view/config/config.php +++ /dev/null @@ -1,37 +0,0 @@ - -
-
- 'buttonGrey', - 'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0), - 'ico' => 'left', - 'value' => 'Retour' - ]); ?> -
-
- -
-
-
-
-
-

inclusion

- 'Lien d\'inclusion', - 'placeholder' => helper::baseUrl() . 'site/file/source/', - 'value' => $this->getData(['module', $this->getUrl(0), 'url']) - ]); ?> -
-
-
-
-

Statistiques

- true, - 'label' => 'Nombre de redirections', - 'value' => helper::filter($this->getData(['module', $this->getUrl(0), 'count']), helper::FILTER_INT) - ]); ?> -
-
-
- \ No newline at end of file diff --git a/module/inclusion/view/index/index.js.php b/module/inclusion/view/index/index.js.php deleted file mode 100644 index bc393f33..00000000 --- a/module/inclusion/view/index/index.js.php +++ /dev/null @@ -1,32 +0,0 @@ - - -/** - * This file is part of Zwii. - * - * For full copyright and license information, please see the LICENSE - * file that was distributed with this source code. - * - * @author Rémi Jean - * @copyright Copyright (C) 2008-2018, Rémi Jean - * @license GNU General Public License, version 3 - * @link http://zwiicms.com/ - * - * - **/ - -if (document.referrer.indexOf("edit") === -1) -{ - core.confirm( - "Souhaitez-vous accéder à l'interface de modification de la page ? En cas de refus, vous serez redirigé vers l'URL saisie dans le module de redirection.", - function() { - $(location).attr("href", "page/edit/getUrl(0); ?>"); - }, - function() { - $(location).attr("href", "getUrl(); ?>/force"); - } - ); -} -else -{ - $(location).attr("href", ""); -} \ No newline at end of file diff --git a/module/inclusion/view/index/index.php b/module/inclusion/view/index/index.php deleted file mode 100644 index 595f6370..00000000 --- a/module/inclusion/view/index/index.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/data/theme.css b/site/data/theme.css index 7cce10df..de593464 100755 --- a/site/data/theme.css +++ b/site/data/theme.css @@ -1 +1 @@ -/*db413798705aa289e2ec19cf556e4f78*/@import url("https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Oswald");body{background-color:rgba(236,239,241,1);font-family:"Open Sans",sans-serif}a{color:rgba(74,105,189,1)}a:hover{color:rgba(59,90,174,1)}body,.row > div{font-size:14px}body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:rgba(33, 34, 35, 1)}.container{max-width:1170px}#site{background-color:rgba(255, 255, 255, 1);border-radius:0;box-shadow:0 #212223}.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:rgba(74,105,189,1);color:white}.helpButton span{color:rgba(74,105,189,1)}input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:rgba(74,105,189,1)}.speechBubble:before{border-color:rgba(74,105,189,1) transparent transparent transparent}.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:rgba(59,90,174,1)}.helpButton span:hover{color:rgba(59,90,174,1)}.button:active,button[type='submit']:active,.pagination a:active{background-color:rgba(54,85,169,1)}h1,h2,h3,h4,h5,h6{color:rgba(74,105,189,1);font-family:"Oswald",sans-serif;font-weight:normal;text-transform:none}header{background-color:rgba(255,255,255,1);height:150px;line-height:150px;text-align:center}header span{color:rgba(33,34,35,1);font-family:"Oswald",sans-serif;font-weight:normal;font-size:2em;text-transform:none}nav,nav a{background-color:rgba(74,105,189,1)}nav a,#toggle span,nav a:hover{color:rgba(255, 255, 255, 1)}nav a:hover{background-color:rgba(59,90,174,1)}nav a.active{background-color:rgba(54,85,169,1)}#menu{text-align:left}#toggle span,#menu a{padding:15px 10px;font-weight:normal;font-size:1em;text-transform:none}footer{background-color:rgba(255,255,255,1);color:rgba(33, 34, 35, 1)}footer a{color:rgba(33, 34, 35, 1)}footer .container > div{margin:10px 0}#footerSocials{text-align:center}#footerText{text-align:center}#footerCopyright{text-align:center} \ No newline at end of file +/*d1bbb044f9097442bfb4526883c52f2c*/@import url("https://fonts.googleapis.com/css?family=Open+Sans|Oswald|Oswald");body{background-color:rgba(236,239,241,1);font-family:"Open Sans",sans-serif}a{color:rgba(74,105,189,1)}a:hover{color:rgba(59,90,174,1)}body,.row > div{font-size:14px}body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:rgba(33, 34, 35, 1)}.container{max-width:1170px}#site{background-color:rgba(255, 255, 255, 1);border-radius:0;box-shadow:0 #212223}.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:rgba(74,105,189,1);color:white}.helpButton span{color:rgba(74,105,189,1)}input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:rgba(74,105,189,1)}.speechBubble:before{border-color:rgba(74,105,189,1) transparent transparent transparent}.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:rgba(59,90,174,1)}.helpButton span:hover{color:rgba(59,90,174,1)}.button:active,button[type='submit']:active,.pagination a:active{background-color:rgba(54,85,169,1)}h1,h2,h3,h4,h5,h6{color:rgba(74,105,189,1);font-family:"Oswald",sans-serif;font-weight:normal;text-transform:none}header{background-size:auto}header{background-color:rgba(255,255,255,1);height:150px;line-height:150px;text-align:center}@media (max-width: 767px) {header{height:75px;line-height:75px;}}header{background-image:url("../file/source/galerie/landscape/desert.jpg");background-position:center center;background-repeat:no-repeat}header span{color:rgba(33,34,35,1);font-family:"Oswald",sans-serif;font-weight:normal;font-size:2em;text-transform:none}nav,nav a{background-color:rgba(74,105,189,1)}nav a,#toggle span,nav a:hover{color:rgba(255, 255, 255, 1)}nav a:hover{background-color:rgba(59,90,174,1)}nav a.active{background-color:rgba(54,85,169,1)}#menu{text-align:left}#toggle span,#menu a{padding:15px 10px;font-weight:normal;font-size:1em;text-transform:none}footer{background-color:rgba(255,255,255,1);color:rgba(33, 34, 35, 1)}footer a{color:rgba(33, 34, 35, 1)}footer .container > div{margin:10px 0}#footerSocials{text-align:center}#footerText{text-align:center}#footerCopyright{text-align:center} \ No newline at end of file diff --git a/site/file/thumb/icones/jome_blue.png b/site/file/thumb/icones/home_blue.png similarity index 100% rename from site/file/thumb/icones/jome_blue.png rename to site/file/thumb/icones/home_blue.png