From fe438bdb4537e621ca3e9f92256c11fa5a7dbb85 Mon Sep 17 00:00:00 2001 From: James Geiger Date: Wed, 18 Mar 2020 22:28:06 -0500 Subject: [PATCH] Add footer element, styles, and associated settings --- resources/lang/en/settings.php | 4 ++++ resources/sass/_footer.scss | 17 +++++++++++++++++ resources/sass/_html.scss | 3 +++ resources/sass/_layout.scss | 4 ++++ resources/sass/styles.scss | 1 + resources/views/base.blade.php | 2 ++ resources/views/common/footer.blade.php | 10 ++++++++++ resources/views/settings/index.blade.php | 15 +++++++++++++++ 8 files changed, 56 insertions(+) create mode 100644 resources/sass/_footer.scss create mode 100644 resources/views/common/footer.blade.php diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index 35bb09cd4..ba1fdfbae 100755 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -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.
Existing comments are not shown.', diff --git a/resources/sass/_footer.scss b/resources/sass/_footer.scss new file mode 100644 index 000000000..960911584 --- /dev/null +++ b/resources/sass/_footer.scss @@ -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 diff --git a/resources/sass/_html.scss b/resources/sass/_html.scss index e4a8c14bb..e123ee286 100644 --- a/resources/sass/_html.scss +++ b/resources/sass/_html.scss @@ -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 diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index a280e4ed1..bb600abc2 100644 --- a/resources/sass/_layout.scss +++ b/resources/sass/_layout.scss @@ -92,6 +92,10 @@ } } +#content { + flex: 1 0 auto; +} + /** * Flexbox layout system */ diff --git a/resources/sass/styles.scss b/resources/sass/styles.scss index 1f4d00f6b..b512e5b5c 100644 --- a/resources/sass/styles.scss +++ b/resources/sass/styles.scss @@ -15,6 +15,7 @@ @import "codemirror"; @import "components"; @import "header"; +@import "footer"; @import "lists"; @import "pages"; diff --git a/resources/views/base.blade.php b/resources/views/base.blade.php index 075481620..9a3e6f906 100644 --- a/resources/views/base.blade.php +++ b/resources/views/base.blade.php @@ -34,6 +34,8 @@ @yield('content') + @include('common.footer') + +
+ +

{{ trans('settings.app_footer_links_desc') }}

+
+
+ + +
+
+ + +
+
+
+