]> BookStack Code Mirror - bookstack/commitdiff
Fixed theme color elements not showing on new instance
authorDan Brown <redacted>
Sun, 12 Jun 2016 12:37:15 +0000 (13:37 +0100)
committerDan Brown <redacted>
Sun, 12 Jun 2016 12:37:15 +0000 (13:37 +0100)
Also cleaned notification session access

config/setting-defaults.php
resources/views/partials/custom-styles.blade.php
resources/views/partials/notifications.blade.php

index 17bae1848ddd1e6f47ae6ba8f37912a3390fd186..6a55a0dc33b6d12be2fde9099d72947bcb1ec769 100644 (file)
@@ -5,6 +5,8 @@
  */
 return [
 
-    'app-editor' => 'wysiwyg'
+    'app-editor' => 'wysiwyg',
+    'app-color'  => '#0288D1',
+    'app-color-light' => 'rgba(21, 101, 192, 0.15)'
 
 ];
\ No newline at end of file
index e6f8f7fc204e101b6cbafc29da485e1bc315ad92..2e23e267ba93fef4ae2b8389b52f9582caafb238 100644 (file)
@@ -1,22 +1,20 @@
-@if(Setting::get('app-color'))
-    <style>
-        header, #back-to-top, .primary-background {
-            background-color: {{ Setting::get('app-color') }} !important;
-        }
-        .faded-small, .primary-background-light {
-            background-color: {{ Setting::get('app-color-light') }};
-        }
-        .button-base, .button, input[type="button"], input[type="submit"] {
-            background-color: {{ Setting::get('app-color') }};
-        }
-        .button-base:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:focus {
-            background-color: {{ Setting::get('app-color') }};
-        }
-        .nav-tabs a.selected, .nav-tabs .tab-item.selected {
-            border-bottom-color: {{ Setting::get('app-color') }};
-        }
-        p.primary:hover, p .primary:hover, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus {
-            color: {{ Setting::get('app-color') }};
-        }
-    </style>
-@endif
\ No newline at end of file
+<style>
+    header, #back-to-top, .primary-background {
+        background-color: {{ Setting::get('app-color') }} !important;
+    }
+    .faded-small, .primary-background-light {
+        background-color: {{ Setting::get('app-color-light') }};
+    }
+    .button-base, .button, input[type="button"], input[type="submit"] {
+        background-color: {{ Setting::get('app-color') }};
+    }
+    .button-base:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:focus {
+        background-color: {{ Setting::get('app-color') }};
+    }
+    .nav-tabs a.selected, .nav-tabs .tab-item.selected {
+        border-bottom-color: {{ Setting::get('app-color') }};
+    }
+    p.primary:hover, p .primary:hover, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus {
+        color: {{ Setting::get('app-color') }};
+    }
+</style>
\ No newline at end of file
index 183934c6655f8d775691deb261454721ebc5d6bc..c079080dbb1aedef4364cc5f8aa9a533cee047b7 100644 (file)
@@ -1,12 +1,12 @@
 
-<div class="notification anim pos" @if(!Session::has('success')) style="display:none;" @endif>
-    <i class="zmdi zmdi-check-circle"></i> <span>{!! nl2br(htmlentities(Session::get('success'))) !!}</span>
+<div class="notification anim pos" @if(!session()->has('success')) style="display:none;" @endif>
+    <i class="zmdi zmdi-check-circle"></i> <span>{!! nl2br(htmlentities(session()->get('success'))) !!}</span>
 </div>
 
-<div class="notification anim warning stopped" @if(!Session::has('warning')) style="display:none;" @endif>
-    <i class="zmdi zmdi-info"></i> <span>{!! nl2br(htmlentities(Session::get('warning'))) !!}</span>
+<div class="notification anim warning stopped" @if(!session()->has('warning')) style="display:none;" @endif>
+    <i class="zmdi zmdi-info"></i> <span>{!! nl2br(htmlentities(session()->get('warning'))) !!}</span>
 </div>
 
-<div class="notification anim neg stopped" @if(!Session::has('error')) style="display:none;" @endif>
-    <i class="zmdi zmdi-alert-circle"></i> <span>{!! nl2br(htmlentities(Session::get('error'))) !!}</span>
+<div class="notification anim neg stopped" @if(!session()->has('error')) style="display:none;" @endif>
+    <i class="zmdi zmdi-alert-circle"></i> <span>{!! nl2br(htmlentities(session()->get('error'))) !!}</span>
 </div>