[9.2.10] Ajustement des marges horizontales

This commit is contained in:
fredtempez 2019-11-12 18:52:16 +01:00
parent 4523fa5837
commit 0240b342c7
4 changed files with 11 additions and 9 deletions

View File

@ -1153,14 +1153,15 @@ class core extends common {
// Pied de page
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
if($this->getData(['theme', 'footer', 'margin'])) {
$css .= 'footer{margin: 10px;padding: 10px;}';
$css .= 'footer{padding:0 10px;}';
} else {
$css .= 'footer{margin:0;padding:0}';
$css .= 'footer{padding:0}';
}
$css .= 'footer span{color:' . $this->getData(['theme', 'footer', 'textColor']) . ';font-family:"' . str_replace('+', ' ', $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{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}';
$css .= 'footer #footerbody > div {margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
$css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}';
$css .= '#footerText{text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';

View File

@ -92,10 +92,10 @@ class theme extends common {
'bold' => 'Gras'
];
public static $footerHeights = [
'5px' => 'Très petites',
'10px' => 'Petites',
'15px' => 'Moyennes',
'20px' => 'Grandes'
'5px' => 'Très petites (5px)',
'10px' => 'Petites (10px)',
'15px' => 'Moyennes (15px)',
'20px' => 'Grandes (20px)'
];
public static $footerPositions = [
'hide' => 'Caché',

View File

@ -27,6 +27,7 @@ $("input, select").on("change", function() {
// Hauteur du pied de page
//css += "#footersiteLeft, #footersiteCenter, #footersiteRight, #footerbodyLeft, #footerbodyCenter, #footerbodyRight {margin:" + $("#themeFooterHeight").val() + " 0}";
css += "footer #footersite > div{margin:" + $("#themeFooterHeight").val() + " 0}";
css += "footer #footerbody > div{margin:" + $("#themeFooterHeight").val() + " 0}";
// Alignement du contenu
css += "#footerSocials{text-align:" + $("#themeFooterSocialsAlign").val() + "}";
css += "#footerText{text-align:" + $("#themeFooterTextAlign").val() + "}";
@ -35,10 +36,10 @@ $("input, select").on("change", function() {
css += "footer span{color:" + $("#themeFooterTextColor").val() + ";font-family:'" + footerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeFooterFontWeight").val() + ";font-size:" + $("#themeFooterFontSize").val() + ";text-transform:" + $("#themeFooterTextTransform").val() + "}";
// Marge
if($("#themeFooterMargin").is(":checked")) {
css += 'footer{margin: 10px;padding: 10px;}';
css += 'footer{padding: 0 10px;}';
}
else {
css += 'footer{margin:0;padding:0}';
css += 'footer{padding:0}';
}
// Ajout du css au DOM
$("#themePreview").remove();

View File

@ -190,7 +190,7 @@
</div>
<div class="col6">
<div id="themeFooterPositionOptions">
<?php echo template::checkbox('themeFooterMargin', true, 'Alignement sur les marges', [
<?php echo template::checkbox('themeFooterMargin', true, 'Alignement sur une marge horizontale', [
'checked' => $this->getData(['theme', 'footer', 'margin'])
]); ?>
</div>