Theme largeur site suite

This commit is contained in:
Deltacms 2023-01-09 11:50:59 +01:00
parent 51bb1003b5
commit bc99cf32dd
2 changed files with 4 additions and 1 deletions

View File

@ -2381,7 +2381,7 @@ class core extends common {
$marginBottomSmall = $margin;
$marginBottomLarge = $margin;
}
$css .= '@media screen and (max-width: 768px) { .container { max-width: 100vw; } }';
$css .= '@media screen and (max-width: 1024px) { .container { max-width: 100vw; } }';
$css .= $this->getData(['theme', 'site', 'width']) === '100%'
? '@media (min-width: 769px) {#site{margin:0 auto ' . $marginBottomLarge . ' 0 !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' 0 !important;}}#site.light{margin:5% 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;}'
: '@media (min-width: 769px) {#site{margin: ' . $margin . ' auto ' . $marginBottomLarge . ' auto !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' auto !important;}}#site.light{margin: 5% 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;} ';

View File

@ -107,6 +107,9 @@ if ($this->getData(['core', 'dataVersion']) < 4403) {
}
if ($this->getData(['core', 'dataVersion']) < 4404) {
if( $this->getData(['theme', 'site', 'width']) === '750px') $this->setData(['theme', 'site', 'width', '75vw']);
if( $this->getData(['theme', 'site', 'width']) === '960px') $this->setData(['theme', 'site', 'width', '85vw']);
if( $this->getData(['theme', 'site', 'width']) === '1170px') $this->setData(['theme', 'site', 'width', '95vw']);
// Mise à jour
$this->setData(['core', 'dataVersion', 4404]);
}