]> BookStack Code Mirror - bookstack/commitdiff
Add footer element, styles, and associated settings 1973/head
authorJames Geiger <redacted>
Thu, 19 Mar 2020 03:28:06 +0000 (22:28 -0500)
committerJames Geiger <redacted>
Thu, 19 Mar 2020 03:28:06 +0000 (22:28 -0500)
resources/lang/en/settings.php
resources/sass/_footer.scss [new file with mode: 0644]
resources/sass/_html.scss
resources/sass/_layout.scss
resources/sass/styles.scss
resources/views/base.blade.php
resources/views/common/footer.blade.php [new file with mode: 0644]
resources/views/settings/index.blade.php

index 35bb09cd40c3f87ec7d19372e4f73d6dfd1b3694..ba1fdfbae6d6f7e584a5806c76d750a1d74e3ec6 100755 (executable)
@@ -37,6 +37,10 @@ return [
     'app_homepage' => 'Application Homepage',
     'app_homepage_desc' => 'Select a view to show on the homepage instead of the default view. Page permissions are ignored for selected pages.',
     'app_homepage_select' => 'Select a page',
+    'app_footer_links' => 'Footer Links',
+    'app_footer_links_desc' => 'Certain countries may require that websites include a privacy policy or terms of service.  You may provide links to those here, which will then be displayed at the bottom of each page.',
+    'app_privacy_policy' => 'Privacy Policy',
+    'app_terms_of_service' => 'Terms of Service',
     'app_disable_comments' => 'Disable Comments',
     'app_disable_comments_toggle' => 'Disable comments',
     'app_disable_comments_desc' => 'Disables comments across all pages in the application. <br> Existing comments are not shown.',
diff --git a/resources/sass/_footer.scss b/resources/sass/_footer.scss
new file mode 100644 (file)
index 0000000..9609115
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ * Includes the footer links.
+ */
+
+ footer {
+    flex-shrink: 0;
+    padding: .5em;
+    text-align: center;
+  }
+  
+  footer a {
+    margin: 0 .5em;
+  }
+  
+  body.flexbox footer {
+    display: none;
+  }
\ No newline at end of file
index e4a8c14bb8faf0b75bc3abeb0e1ad0d10320eb46..e123ee286d5a0f4a4b06428585787417db251d2a 100644 (file)
@@ -23,4 +23,7 @@ body {
   color: #444;
   -webkit-font-smoothing: antialiased;
   background-color: #F2F2F2;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
 }
\ No newline at end of file
index a280e4ed1f25514ad689b590dda7522d3aba2caa..bb600abc22a846c062c713f84ad168c9e45f57b2 100644 (file)
   }
 }
 
+#content {
+  flex: 1 0 auto;
+}
+
 /**
  * Flexbox layout system
  */
index 1f4d00f6b9606b1ebe15d94b0c5b8788dd747b6e..b512e5b5c9759a5719a2b3dc7a6933a245746649 100644 (file)
@@ -15,6 +15,7 @@
 @import "codemirror";
 @import "components";
 @import "header";
+@import "footer";
 @import "lists";
 @import "pages";
 
index 07548162067404fa82061695c6753fe5bd15e27c..9a3e6f906fada8b09e49c208d74daa9f58294f07 100644 (file)
@@ -34,6 +34,8 @@
         @yield('content')
     </div>
 
+    @include('common.footer')
+
     <div back-to-top class="primary-background print-hidden">
         <div class="inner">
             @icon('chevron-up') <span>{{ trans('common.back_to_top') }}</span>
diff --git a/resources/views/common/footer.blade.php b/resources/views/common/footer.blade.php
new file mode 100644 (file)
index 0000000..a056f6d
--- /dev/null
@@ -0,0 +1,10 @@
+@if(setting('app-privacy-policy') | setting('app-terms-of-service'))
+<footer>
+    @if(setting('app-privacy-policy'))
+        <a href="{{ setting('app-privacy-policy') }}">{{ trans('settings.app_privacy_policy') }}</a>
+    @endif
+    @if(setting('app-terms-of-service'))
+        <a href="{{ setting('app-terms-of-service') }}">{{ trans('settings.app_terms_of_service') }}</a>
+    @endif
+</footer>
+@endif
\ No newline at end of file
index 07ca1fcc19f5555c9691a9f92f686a9d27cdf849..4f29968bb70c08fb4deff82cfe21bdc321806701 100644 (file)
                         </div>
                     </div>
 
+                    <div>
+                        <label for="setting-app-privacy-link" class="setting-list-label">{{ trans('settings.app_footer_links') }}</label>
+                        <p class="small">{{ trans('settings.app_footer_links_desc') }}</p>
+                        <div class="grid half pt-m">
+                            <div>
+                                <label for="setting-app-privacy-policy" class="text-dark">{{ trans('settings.app_privacy_policy') }}</label>
+                                <input type="text" value="{{ setting('app-privacy-policy', '') }}" name="setting-app-privacy-policy" id="setting-app-privacy-policy">
+                            </div>
+                            <div>
+                                <label for="setting-app-terms-of-service" class="text-dark">{{ trans('settings.app_terms_of_service') }}</label>
+                                <input type="text" value="{{ setting('app-terms-of-service', '') }}" name="setting-app-terms-of-service" id="setting-app-terms-of-service">
+                            </div>
+                        </div>
+                    </div>
+
 
                     <div>
                         <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>