10.2.dev7 encore le thme admin : bouton couleur du texte auto

This commit is contained in:
Fred Tempez 2020-05-26 09:10:56 +02:00
parent 3266154989
commit 2a769406ff
4 changed files with 19 additions and 24 deletions

View File

@ -36,7 +36,7 @@ class common {
const THUMBS_WIDTH = 640;
// Numéro de version
const ZWII_VERSION = '10.2.000.dev6';
const ZWII_VERSION = '10.2.00.dev7';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];
@ -1271,7 +1271,7 @@ class common {
$this->setData(['core', 'dataVersion', 10000]);
}
// Version 10.0.092
// Version 10.0.92
if ($this->getData(['core', 'dataVersion']) < 10092) {
// Suppression du dossier fullpage
if (is_dir('core/vendor/fullpage')) {
@ -1288,7 +1288,7 @@ class common {
unlink ('core/vendor/tinymce/templates/fullPageSlides.html'); }
$this->setData(['core', 'dataVersion', 10092]);
}
// Version 10.0.093
// Version 10.0.93
if ($this->getData(['core', 'dataVersion']) < 10093) {
// Déplacement du fichier admin.css dans data
if (file_exists('core/layout/admin.css')) {
@ -1304,7 +1304,11 @@ class common {
// Réorganisation du thème
$this->setData(['theme','text','linkTextColor',$this->getData(['theme','link', 'textColor'])]);
}
// Version 10.2.00
if ($this->getData(['core', 'dataVersion']) < 10200) {
$this->deleteData(['admin','colorButtonText']);
$this->setData(['core', 'dataVersion', 10200]);
}
}
}
@ -1422,7 +1426,7 @@ class core extends common {
$css .= 'h1,h2,h3,h4,h5,h6{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'title', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}';
// Les blocs
$colors = helper::colorVariants($this->getData(['theme', 'block', 'backgroundColor']));
$css .= '.block {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) . ';}.block h4 {background:'. $colors['normal'] . ';color:' . $colors['text'] .';}';
$css .= '.block {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) . ';}.block h4 {background-color:'. $colors['normal'] . ';color:' . $colors['text'] .';}';
// Bannière
$colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
if($this->getData(['theme', 'header', 'margin'])) {
@ -1524,13 +1528,13 @@ class core extends common {
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButton']));
$css .= 'input[type="checkbox"]:checked + label::before,.speechBubble{ background-color:' . $colors['normal'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}';
$css .= '.speechBubble::before {border-color:' . $colors['normal'] . ' transparent transparent transparent;}';
$css .= '.button {background-color:' . $colors['normal'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}.button:hover {background-color:' . $colors['darken'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}.button:active {background-color:' . $colors['veryDarken'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}';
$css .= '.button {background-color:' . $colors['normal'] . ';color:' . $colors['text'] . ';}.button:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGrey']));
$css .= '.button.buttonGrey {background-color: ' . $colors['normal'] . ';color: ' . $this->getData(['admin','colorButtonText']) . ';}.button.buttonGrey:hover {background-color:' . $colors['darken'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}.button.buttonGrey:active {background-color:' . $colors['veryDarken'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}';
$css .= '.button.buttonGrey {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGrey:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonGrey:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonRed']));
$css .= '.button.buttonRed {background-color: ' . $colors['normal'] . ';color: ' . $this->getData(['admin','colorButtonText']) . ';}.button.buttonRed:hover {background-color:' . $colors['darken'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}.button.buttonRed:active {background-color:' . $colors['veryDarken'] . ';color:' . $this->getData(['admin','colorButtonText']) . ';}';
$css .= '.button.buttonRed {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonRed:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonRed:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGreen']));
$css .= 'button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $this->getData(['admin','colorButtonText']) . '}button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $this->getData(['admin','colorButtonText']) .';}button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' . $this->getData(['admin','colorButtonText']) .';}';
$css .= 'button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . '}button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundBlockColor']));
$css .= '.block {border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}.block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
$css .= 'table tr,input[type=email],input[type=text],input[type=password],select,textarea:not(.editorWysiwyg),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}';

View File

@ -172,7 +172,6 @@ class init extends common {
'fontTitle' => 'Oswald',
'colorText' => 'rgba(33, 34, 35, 1)',
'colorTitle' => 'rgba(74, 105, 189, 1)',
'colorButtonText' => 'rgba(255, 255, 255, 1)',
'backgroundColorButton' => 'rgba(44, 79, 110, 1)',
'backgroundColorButtonGrey' => 'rgba(170, 180, 188, 1)',
'backgroundColorButtonRed' => 'rgba(231, 76, 60, 1)',

View File

@ -26,13 +26,13 @@ $("input, select").on("change", function() {
var colors = core.colorVariants($("#adminColorButton").val());
css += "input[type='checkbox']:checked + label::before,.speechBubble{ background-color:" + colors.normal + "; color:" + $("#adminColorButtonText").val() + ";}";
css += ".speechBubble::before {border-color:" + colors.normal + " transparent transparent transparent;}";
css += ".button {background:" + colors.normal + ";color:" + $("#adminColorButtonText").val() + ";}.button:hover {background:" + colors.darken + ";color:" + $("#adminColorButtonText").val() + ";}.button:active {background:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").val() + ";}";
css += ".button {background-color:" + colors.normal + ";color:" + colors.text + ";}.button:hover {background-color:" + colors.darken + ";color:" + colors.text + ";}.button:active {background-color:" + colors.veryDarken + ";color:" + colors.text + ";}";
var colors = core.colorVariants($("#adminColorGrey").val());
css += ".button.buttonGrey {background: " + colors.normal + ";color:" + $("#adminColorButtonText").val() + ";}.button.buttonGrey:hover {background-color:" + colors.darken + ";color:" + $("#adminColorButtonText").val() + "}.button.buttonGrey:active {background-color:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").val() + ";}";
css += ".button.buttonGrey {background-color: " + colors.normal + ";color:" + colors.text + ";}.button.buttonGrey:hover {background-color:" + colors.darken + ";color:" + colors.text + "}.button.buttonGrey:active {background-color:" + colors.veryDarken + ";color:" + colors.text + ";}";
var colors = core.colorVariants($("#adminColorRed").val());
css += ".button.buttonRed {background: " + colors.normal + ";color:" + $("#adminColorButtonText").val() + ";}.button.buttonRed:hover {background-color:" + colors.darken + ";color:" + $("#adminColorButtonText").val() + "}.button.buttonRed:active {background-color:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").val() + "}";
css += ".button.buttonRed {background-color: " + colors.normal + ";color:" + colors.text + ";}.button.buttonRed:hover {background-color:" + colors.darken + ";color:" + colors.text + "}.button.buttonRed:active {background-color:" + colors.veryDarken + ";color:" + colors.text + "}";
var colors = core.colorVariants($("#adminColorGreen").val());
css += "button[type=submit] {background-color: " + colors.normal + ";color: " + ";color:" + $("#adminColorButtonText").val() + "}button[type=submit]:hover {background-color: " + colors.darken + ";color:" + $("#adminColorButtonText").val() + ";}button[type=submit]:active {background:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").val() + "}";
css += "button[type=submit] {background-color: " + colors.normal + ";color: " + ";color:" + colors.text + "}button[type=submit]:hover {background-color: " + colors.darken + ";color:" + colors.text + ";}button[type=submit]:active {background-color:" + colors.veryDarken + ";color:" + colors.text + "}";
var colors = core.colorVariants($("#adminBackGroundBlockColor").val());
css += ".block {border: 1px solid " + $("#adminBorderBlockColor").val() + ";}.block h4 {background-color: " + colors.normal + ";color:" + colors.text + ";}";
css += "input[type=email],input[type=text],input[type=password],select,textarea:not(.editorWysiwyg),.inputFile{background-color: " + colors.normal + ";color:" + colors.text + ";border: 1px solid " + $("#adminBorderBlockColor").val() + ";}";

View File

@ -59,7 +59,7 @@
</div>
</div>
<div class="row">
<div class="col4">
<div class="col6">
<?php echo template::text('adminBackGroundBlockColor', [
'class' => 'colorPicker',
'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.',
@ -67,7 +67,7 @@
'value' => $this->getData(['admin', 'backgroundBlockColor'])
]); ?>
</div>
<div class="col4">
<div class="col6">
<?php echo template::text('adminBorderBlockColor', [
'class' => 'colorPicker',
'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.',
@ -75,14 +75,6 @@
'value' => $this->getData(['admin', 'borderBlockColor'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('adminColorButtonText', [
'class' => 'colorPicker',
'help' => 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte des boutons',
'value' => $this->getData(['admin', 'colorButtonText'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">