]> BookStack Code Mirror - bookstack/commitdiff
Added support for custom content in HTML head
authorDan Brown <redacted>
Sun, 22 May 2016 10:01:21 +0000 (11:01 +0100)
committerDan Brown <redacted>
Sun, 22 May 2016 10:01:21 +0000 (11:01 +0100)
resources/assets/sass/_forms.scss
resources/views/base.blade.php
resources/views/settings/index.blade.php

index 4b50f6022f70e5176100c608c2644e00c1ff8680..da015ec7cfed97fa80bc10bc6db51e2edc099fb1 100644 (file)
@@ -154,6 +154,11 @@ input:checked + .toggle-switch {
 
 .form-group {
   margin-bottom: $-s;
+  textarea {
+    display: block;
+    width: 100%;
+    min-height: 64px;
+  }
 }
 
 .form-group {
index 34c64c581d6d3760dd8f632f19f65bd3c275c5e7..d09912c37d97d3963fea869a4b752e92f2fd770c 100644 (file)
     @yield('head')
 
     @include('partials/custom-styles')
+
+    <!-- Custom user content -->
+    @if(setting('app-custom-head', false))
+        {!! setting('app-custom-head') !!}
+    @endif
 </head>
 <body class="@yield('body-class')" ng-app="bookStack">
 
index ad0b6cbfb7fa687af6cdc18aa2aa42388d3bc072..1e76c16754d6655f7dc5eeca4b218e1ea0c42486 100644 (file)
@@ -25,7 +25,7 @@
                 </div>
                 <div class="form-group">
                     <label>Enable higher security image uploads?</label>
-                    <p class="small">For performance reasons, all images are public by default, This option adds a random, hard-to-guess characters in front of image names. Ensure directory indexes are not enabled to prevent easy access.</p>
+                    <p class="small">For performance reasons, all images are public. This option adds a random, hard-to-guess string in front of image urls. Ensure directory indexes are not enabled to prevent easy access.</p>
                     <div toggle-switch name="setting-app-secure-images" value="{{ setting('app-secure-images') }}"></div>
                 </div>
                 <div class="form-group">
                 </div>
             </div>
         </div>
-
-
+        <div class="form-group">
+            <label for="setting-app-custom-head">Custom HTML head content</label>
+            <p class="small">Any content added here will be inserted into the bottom of the &lt;head&gt; section of every page. This is handy for overriding styles or adding analytics code.</p>
+            <textarea name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
+        </div>
 
         <hr class="margin-top">
 
         <h3>Registration Settings</h3>
+
         <div class="row">
             <div class="col-md-6">
                 <div class="form-group">