Modification : adaptation de la bannière

This commit is contained in:
fredtempez 2018-08-31 22:35:39 +02:00
parent 7e7319c0d6
commit 4fa669c13c
15 changed files with 68 additions and 161 deletions

View File

@ -1,5 +1,10 @@
# ChangeLog # ChangeLog
Préversion 8.3.13 :
* Modifications :
- Bannière responsive
- Options de position des menus selon la position de la bannière
## version 8.3.12 : ## version 8.3.12 :
* Modification : * Modification :
- bouton de retour dans la page d'un article de blog - bouton de retour dans la page d'un article de blog

View File

@ -24,7 +24,7 @@ class common {
const GROUP_MEMBER = 1; const GROUP_MEMBER = 1;
const GROUP_MODERATOR = 2; const GROUP_MODERATOR = 2;
const GROUP_ADMIN = 3; const GROUP_ADMIN = 3;
const ZWII_VERSION = '8.3.12'; const ZWII_VERSION = '8.3.12a';
public static $actions = []; public static $actions = [];
public static $coreModuleIds = [ public static $coreModuleIds = [
@ -325,9 +325,8 @@ class common {
'textColor' => 'rgba(33, 34, 35, 1)', 'textColor' => 'rgba(33, 34, 35, 1)',
'textHide' => false, 'textHide' => false,
'textTransform' => 'none', 'textTransform' => 'none',
// Menu Image 'linkHome' => 'false',
'linkHome' => 'false' 'imageContainer' => 'auto'
// Menu Image
], ],
'link' => [ 'link' => [
'textColor' => 'rgba(74, 105, 189, 1)' 'textColor' => 'rgba(74, 105, 189, 1)'
@ -862,6 +861,13 @@ class common {
$this->setData(['core', 'dataVersion', 826]); $this->setData(['core', 'dataVersion', 826]);
$this->SaveData(); $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,6 +976,7 @@ class core extends common {
$css .= 'header{margin:20px 20px 0 20px}'; $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']) . '}'; $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']) . '}';
if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) { 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']) . '}'; $css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';

View File

@ -286,6 +286,9 @@ body > header {
} }
header { header {
position: relative; position: relative;
margin:0;
padding:0;
} }
header span { header span {
display: inline-block; display: inline-block;

View File

@ -123,13 +123,18 @@ class theme extends common {
'20px 15px' => 'Grande', '20px 15px' => 'Grande',
'25px 15px' => 'Très grande' '25px 15px' => 'Très grande'
]; ];
public static $menuPositions = [ public static $menuPositionsSite = [
'hide' => 'Caché',
'site-first' => 'Dans le site avant la bannière', 'site-first' => 'Dans le site avant la bannière',
'site-second' => 'Dans le site après la bannière', 'site-second' => 'Dans le site après la bannière',
'body-top' => 'Au-dessus et en-dehors du site', '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-first' => 'Au dessus du site avant la bannière',
'body-second' => 'Au dessus du site après 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 = [ public static $radius = [
@ -181,6 +186,12 @@ class theme extends common {
'container-large' => 'sur la largeur de la page' 'container-large' => 'sur la largeur de la page'
]; ];
public static $headerWide = [
'auto' => 'Automatique',
'cover' => 'Recouvrir',
'contain' => 'Dimensionner'
];
/** /**
* Mode avancé * Mode avancé
*/ */
@ -293,10 +304,10 @@ class theme extends common {
'textColor' => $this->getInput('themeHeaderTextColor'), 'textColor' => $this->getInput('themeHeaderTextColor'),
'textHide' => $this->getInput('themeHeaderTextHide', helper::FILTER_BOOLEAN), 'textHide' => $this->getInput('themeHeaderTextHide', helper::FILTER_BOOLEAN),
'textTransform' => $this->getInput('themeHeaderTextTransform'), 'textTransform' => $this->getInput('themeHeaderTextTransform'),
// Menu Image 'linkHome' => $this->getInput('themeHeaderlinkHome',helper::FILTER_BOOLEAN),
'linkHome' => $this->getInput('themeHeaderlinkHome',helper::FILTER_BOOLEAN) 'imageContainer' => $this->getInput('themeHeaderImageContainer')
// Menu Image
]]); ]]);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'notification' => 'Modifications enregistrées', 'notification' => 'Modifications enregistrées',

View File

@ -19,6 +19,7 @@ $("input, select").on("change", function() {
var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');"; var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');";
// Couleurs, image, alignement et hauteur de la bannière // 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() + "}"; css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";height:" + $("#themeHeaderHeight").val() + ";line-height:" + $("#themeHeaderHeight").val() + "}";
var themeHeaderImage = $("#themeHeaderImage").val(); var themeHeaderImage = $("#themeHeaderImage").val();
if(themeHeaderImage) { if(themeHeaderImage) {
css += "header{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeHeaderImage + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + "}"; css += "header{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeHeaderImage + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + "}";
@ -26,6 +27,8 @@ $("input, select").on("change", function() {
else { else {
css += "header{background-image:none}"; 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 // 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() + "}"; 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 // Cache le titre de la bannière

View File

@ -57,10 +57,20 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [ <?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
'checked' => $this->getData(['theme', 'header', 'textHide']) 'checked' => $this->getData(['theme', 'header', 'textHide'])
]); ?> ]); ?>
</div> </div>
<div class="col6">
<?php echo template::select('themeHeaderImageContainer', $module::$headerWide, [
'label' => 'Adaptation',
'selected' => $this->getData(['theme', 'header', 'imageContainer'])
]); ?>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -66,10 +66,18 @@
<h4>Configuration</h4> <h4>Configuration</h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::select('themeMenuPosition', $module::$menuPositions, [ <?php
if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
'label' => 'Position', 'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position']) 'selected' => $this->getData(['theme', 'menu', 'position'])
]); ?> ]);
}else{
echo template::select('themeMenuPosition', $module::$menuPositionsBody, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]); }
?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [ <?php echo template::select('themeMenuHeight', $module::$menuHeights, [

View File

@ -31,6 +31,8 @@ tinymce.init({
extended_valid_elements: "script[language|type|src]", extended_valid_elements: "script[language|type|src]",
// Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive) // Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive)
media_dimensions: false, media_dimensions: false,
// Désactiver la dimension des images
// image_dimensions: false,
// Active l'onglet avancé lors de l'ajout d'une image // Active l'onglet avancé lors de l'ajout d'une image
image_advtab: true, image_advtab: true,
// Urls absolues // Urls absolues

View File

@ -1,72 +0,0 @@
<?php
/**
* 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 <remi.jean@outlook.com>
* @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' => '<iframe src="' . helper::baseUrl(false) . 'site/file/source/' . $this->getData(['module', $this->getUrl(0), 'url']) . '"></iframe>' ,
'state' => true
]);
}
}
}

View File

@ -1,37 +0,0 @@
<?php echo template::formOpen('inclusionConfig'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('inclusionConfigBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('inclusionConfigSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>inclusion</h4>
<?php echo template::file('inclusionConfigUrl', [
'label' => 'Lien d\'inclusion',
'placeholder' => helper::baseUrl() . 'site/file/source/',
'value' => $this->getData(['module', $this->getUrl(0), 'url'])
]); ?>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Statistiques</h4>
<?php echo template::text('inclusionConfigCount', [
'disabled' => true,
'label' => 'Nombre de redirections',
'value' => helper::filter($this->getData(['module', $this->getUrl(0), 'count']), helper::FILTER_INT)
]); ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -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 <remi.jean@outlook.com>
* @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", "<?php echo helper::baseUrl(); ?>page/edit/<?php echo $this->getUrl(0); ?>");
},
function() {
$(location).attr("href", "<?php echo helper::baseUrl() . $this->getUrl(); ?>/force");
}
);
}
else
{
$(location).attr("href", "<?php echo helper::baseUrl(); ?>");
}

View File

@ -1 +0,0 @@
<!-- Page vide avec un commentaire pour ne pas afficher d'erreur 404 -->

View File

@ -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} /*dbfd32e109608b840b931aa95b68caef*/@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:200px;line-height:200px;text-align:center}header{background-image:url("../file/source/banniere ticnet.png");background-position:top 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}

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB