forked from deblan/side_menu
add button to set default colors
This commit is contained in:
parent
95230e9e4a
commit
32322a0ab2
|
@ -138,7 +138,9 @@
|
|||
}
|
||||
|
||||
.btn-reset {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
margin-top: 8px !important;
|
||||
margin-left: 5px !important;
|
||||
margin-top: 17px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
|
|
@ -113,8 +113,14 @@ class Admin implements ISettings
|
|||
'defaults' => [
|
||||
'background-color' => $darkenPrimaryColor,
|
||||
'background-color-to' => $darkenPrimaryColor,
|
||||
'current-app-background-color' => $darkenPrimaryColor2,
|
||||
'text-color' => $textColor,
|
||||
'loader-color' => $lightenPrimaryColor,
|
||||
'dark-mode-background-color' => $darkenPrimaryColor,
|
||||
'dark-mode-background-color-to' => $darkenPrimaryColor,
|
||||
'dark-mode-current-app-background-color' => $darkenPrimaryColor2,
|
||||
'dark-mode-text-color' => $textColor,
|
||||
'dark-mode-loader-color' => $textColor,
|
||||
],
|
||||
'background-color' => $backgroundColor,
|
||||
'background-color-to' => $backgroundColorTo,
|
||||
|
|
|
@ -67,11 +67,10 @@ $choicesSizes = [
|
|||
class="side-menu-setting side-menu-setting-live"
|
||||
value="<?php print_unescaped($_['background-color-to']); ?>">
|
||||
|
||||
<button class="btn btn-info btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-background-color' => $_['defaults']['background-color'],
|
||||
'side-menu-background-color-to' => $_['defaults']['background-color-to'],
|
||||
])) ?>"><?php p($l->t('Set default')); ?></button>
|
||||
|
||||
])) ?>"></div>
|
||||
<div>
|
||||
<em>
|
||||
<?php p($l->t('Transparent')); ?>
|
||||
|
@ -107,6 +106,10 @@ $choicesSizes = [
|
|||
type="color"
|
||||
class="side-menu-setting side-menu-setting-live"
|
||||
value="<?php print_unescaped($_['current-app-background-color']); ?>">
|
||||
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-current-app-background-color' => $_['defaults']['current-app-background-color'],
|
||||
])) ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -123,6 +126,10 @@ $choicesSizes = [
|
|||
type="color"
|
||||
class="side-menu-setting side-menu-setting-live"
|
||||
value="<?php print_unescaped($_['text-color']); ?>">
|
||||
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-text-color' => $_['defaults']['text-color'],
|
||||
])) ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -139,6 +146,10 @@ $choicesSizes = [
|
|||
type="color"
|
||||
class="side-menu-setting"
|
||||
value="<?php print_unescaped($_['loader-color']); ?>">
|
||||
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-loader-color' => $_['defaults']['loader-color'],
|
||||
])) ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -244,10 +255,10 @@ $choicesSizes = [
|
|||
class="side-menu-setting"
|
||||
value="<?php print_unescaped($_['dark-mode-background-color-to']); ?>">
|
||||
|
||||
<button class="btn btn-info btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-dark-mode-background-color' => $_['defaults']['dark-mode-background-color'],
|
||||
'side-menu-dark-mode-background-color-to' => $_['defaults']['dark-mode-background-color-to'],
|
||||
])) ?>"><?php p($l->t('Set default')); ?></button>
|
||||
])) ?>"></div>
|
||||
|
||||
<div>
|
||||
<em>
|
||||
|
@ -278,10 +289,15 @@ $choicesSizes = [
|
|||
</div>
|
||||
<div class="side-menu-setting-form side-menu-setting-form-long">
|
||||
<input
|
||||
id="side-menu-dark-mode-current-app-background-color"
|
||||
name="dark-mode-current-app-background-color"
|
||||
type="color"
|
||||
class="side-menu-setting"
|
||||
value="<?php print_unescaped($_['dark-mode-current-app-background-color']); ?>">
|
||||
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-dark-mode-current-app-background-color' => $_['defaults']['dark-mode-current-app-background-color'],
|
||||
])) ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -293,10 +309,15 @@ $choicesSizes = [
|
|||
</div>
|
||||
<div class="side-menu-setting-form side-menu-setting-form-long">
|
||||
<input
|
||||
id="side-menu-dark-mode-text-color"
|
||||
name="dark-mode-text-color"
|
||||
type="color"
|
||||
class="side-menu-setting"
|
||||
value="<?php print_unescaped($_['dark-mode-text-color']); ?>">
|
||||
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-dark-mode-text-color' => $_['defaults']['dark-mode-text-color'],
|
||||
])) ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -308,10 +329,15 @@ $choicesSizes = [
|
|||
</div>
|
||||
<div class="side-menu-setting-form side-menu-setting-form-long">
|
||||
<input
|
||||
id="side-menu-dark-mode-loader-color"
|
||||
name="dark-mode-loader-color"
|
||||
type="color"
|
||||
class="side-menu-setting"
|
||||
value="<?php print_unescaped($_['dark-mode-loader-color']); ?>">
|
||||
|
||||
<div class="theme-undo icon icon-history btn-reset" data-reset="<?php echo htmlentities(json_encode([
|
||||
'side-menu-dark-mode-loader-color' => $_['defaults']['dark-mode-loader-color'],
|
||||
])) ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue