[9.1.08] 100% fluide sans marge

This commit is contained in:
fredtempez 2019-05-27 11:09:18 +02:00
parent 230be5ddd2
commit 421d09a3f5
2 changed files with 3 additions and 3 deletions

View File

@ -970,7 +970,7 @@ class core extends common {
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
$css .= 'body,.block h4,input[type=\'email\'],input[type=\'text\'],input[type=\'password\'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
$css .= '.container{max-width:' . $this->getData(['theme', 'site', 'width']) . '}';
$css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site{margin:0 auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;}': '';
$css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site{margin:0 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;}': '';
$css .= $this->getData(['theme', 'site', 'width']) === '750px' ? '.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']));

View File

@ -47,9 +47,9 @@ $("input, select").on("change", function() {
// Largeur du site
css += ".container{max-width:" + $("#themeSiteWidth").val() + "}";
if ($("#themeSiteWidth").val() === "100%") {
css += "#site{margin:0 auto;} body{margin:0 auto;} #bar{margin:0 auto;}";
css += "#site{margin:0 auto;} body{margin:0 auto;} #bar{margin:0 auto;} body > header{margin:0 auto;} body > nav {margin: 0 auto;} body > footer {margin:0 auto;}";
} else {
css += "#site{margin:20px auto;} body{margin:0px 10px;} #bar{margin: 0 -10px;}";
css += "#site{margin:20px 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;} ";
}
// Couleur du site, arrondi sur les coins du site et ombre sur les bords du site