]> BookStack Code Mirror - bookstack/commitdiff
Improved primary color control in settings
authorDan Brown <redacted>
Sun, 27 Aug 2017 11:59:56 +0000 (12:59 +0100)
committerDan Brown <redacted>
Sun, 27 Aug 2017 11:59:56 +0000 (12:59 +0100)
resources/views/partials/custom-styles.blade.php
resources/views/settings/index.blade.php

index ffa39c50ac648c63c9a94b20662126a74dfe9f2d..c13051df4f3a363c8bbcfbf140bad183cffbca99 100644 (file)
@@ -1,5 +1,4 @@
 <style id="custom-styles" data-color="{{ setting('app-color') }}" data-color-light="{{ setting('app-color-light') }}">
-    @if(setting('app-color'))
     header, [back-to-top], .primary-background {
         background-color: {{ setting('app-color') }} !important;
     }
@@ -18,5 +17,4 @@
     .text-primary, p.primary, p .primary, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus {
         color: {{ setting('app-color') }};
     }
-    @endif
 </style>
\ No newline at end of file
index 18d8b1307b7f501165f4f1e010867bce3917c47d..cd6a25493105a6508fda83e4dc9e118cb9734eca 100644 (file)
@@ -68,8 +68,8 @@
                         <div class="form-group" id="color-control">
                             <label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
                             <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
-                            <input  type="text" value="{{ setting('app-color', '') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
-                            <input  type="hidden" value="{{ setting('app-color-light', '') }}" name="setting-app-color-light" id="setting-app-color-light" placeholder="rgba(21, 101, 192, 0.15)">
+                            <input type="text" value="{{ setting('app-color') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
+                            <input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
                         </div>
                     </div>
 
                 var hexVal = '#' + this.color.colors.HEX;
                 var rgb = this.color.colors.RND.rgb;
                 var rgbLightVal = 'rgba('+ [rgb.r, rgb.g, rgb.b, '0.15'].join(',') +')';
+
                 // Set textbox color to hex color code.
                 var isEmpty = $.trim($elm.val()).length === 0;
                 if (!isEmpty) $elm.val(hexVal);