10.2.dev5 theme admin + présentation

This commit is contained in:
Fred Tempez 2020-05-26 00:03:58 +02:00
parent 43b7864b70
commit 40c35a0de7
2 changed files with 38 additions and 32 deletions

View File

@ -22,20 +22,20 @@ $("input, select").on("change", function() {
var css = "#site{background-color:" + colors.normal + ";}"; var css = "#site{background-color:" + colors.normal + ";}";
css += "body, .row > div {font:" + $("#adminFontTextSize").val() + " '" + $("#adminColorTitle").val() + "', sans-serif;}"; css += "body, .row > div {font:" + $("#adminFontTextSize").val() + " '" + $("#adminColorTitle").val() + "', sans-serif;}";
css += "body h1, h2, h3, h4, h5, h6 {font-family:'" + titleFont + "', sans-serif; color:" + $("#adminColorTitle").val() + ";}"; css += "body h1, h2, h3, h4, h5, h6 {font-family:'" + titleFont + "', sans-serif; color:" + $("#adminColorTitle").val() + ";}";
css += "body:not(.editorWysiwyg),span .zwiico-help {color:" + colors.text + ";}"; css += "body:not(.editorWysiwyg),span .zwiico-help {color:" + $("#adminColorText").val() + ";}";
css += "input[type=email],input[type=text],input[type=password],select,textarea:not(.editorWysiwyg),.inputFile{color: #222;}";
var colors = core.colorVariants($("#adminColorButton").val()); var colors = core.colorVariants($("#adminColorButton").val());
css += "input[type='checkbox']:checked + label::before,.speechBubble{ background-color:" + colors.normal + "; color:" + $("#adminColorButtonText").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 += ".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:" + colors.normal + ";color:" + $("#adminColorButtonText").val() + ";}.button:hover {background:" + colors.darken + ";color:" + $("#adminColorButtonText").val() + ";}.button:active {background:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").val() + ";}";
var colors = core.colorVariants($("#adminColorGrey").val()); var colors = core.colorVariants($("#adminColorGrey").val());
css += ".button.buttonGrey {background: " + colors.normal + ";color:" + $("#adminColorButtonText").val() + ";}.button.buttonGrey:hover {background:" + colors.darken + ";color:" + $("#adminColorButtonText").val() + "}.button.buttonGrey:active {background:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").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() + ";}";
var colors = core.colorVariants($("#adminColorRed").val()); var colors = core.colorVariants($("#adminColorRed").val());
css += ".button.buttonRed {background: " + colors.normal + ";color:" + $("#adminColorButtonText").val() + ";}.button.buttonRed:hover {background:" + colors.darken + ";color:" + $("#adminColorButtonText").val() + "}.button.buttonRed:active {background:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").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() + "}";
var colors = core.colorVariants($("#adminColorGreen").val()); 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:" + $("#adminColorButtonText").val() + "}button[type=submit]:hover {background-color: " + colors.darken + ";color:" + $("#adminColorButtonText").val() + ";}button[type=submit]:active {background:" + colors.veryDarken + ";color:" + $("#adminColorButtonText").val() + "}";
var colors = core.colorVariants($("#adminBackGroundBlockColor").val()); var colors = core.colorVariants($("#adminBackGroundBlockColor").val());
css += ".block {border: 1px solid " + $("#adminBorderBlockColor").val() + ";}.block h4 {background: " + colors.normal + ";color:" + colors.text + ";}"; 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() + ";}";
// Ajout du css au DOM // Ajout du css au DOM
$("#themePreview").remove(); $("#themePreview").remove();

View File

@ -8,11 +8,17 @@
'value' => 'Retour' 'value' => 'Retour'
]); ?> ]); ?>
</div> </div>
<div class="col2 offset6"> <div class="col2 offset4">
<?php echo template::button('configAdminTest', [
'value' => 'Bouton Standard'
]); ?>
</div>
<div class="col2 offset">
<?php echo template::button('configAdminReset', [ <?php echo template::button('configAdminReset', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/resetAdmin', 'href' => helper::baseUrl() . 'theme/resetAdmin',
'value' => 'Réinitialiser' 'value' => 'Réinitialiser',
'ico' => 'cancel'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
@ -35,24 +41,6 @@
'value' => $this->getData(['admin', 'backgroundColor']) 'value' => $this->getData(['admin', 'backgroundColor'])
]); ?> ]); ?>
</div> </div>
<div class="col4">
<?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.',
'label' => 'Arrière-plan des blocs',
'value' => $this->getData(['admin', 'backgroundBlockColor'])
]); ?>
</div>
<div class="col4">
<?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.',
'label' => 'Bordure des blocs',
'value' => $this->getData(['admin', 'borderBlockColor'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4"> <div class="col4">
<?php echo template::text('adminColorTitle', [ <?php echo template::text('adminColorTitle', [
'class' => 'colorPicker', 'class' => 'colorPicker',
@ -69,6 +57,24 @@
'value' => $this->getData(['admin', 'colorText']) 'value' => $this->getData(['admin', 'colorText'])
]); ?> ]); ?>
</div> </div>
</div>
<div class="row">
<div class="col4">
<?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.',
'label' => 'Arrière-plan des champs',
'value' => $this->getData(['admin', 'backgroundBlockColor'])
]); ?>
</div>
<div class="col4">
<?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.',
'label' => 'Bordure des champs',
'value' => $this->getData(['admin', 'borderBlockColor'])
]); ?>
</div>
<div class="col4"> <div class="col4">
<?php echo template::text('adminColorButtonText', [ <?php echo template::text('adminColorButtonText', [
'class' => 'colorPicker', 'class' => 'colorPicker',