From: Dan Brown Date: Sat, 30 Jan 2021 22:03:16 +0000 (+0000) Subject: Merge branch 'footer-links' of git://github.com/james-geiger/BookStack into james... X-Git-Tag: v21.04~1^2~15 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/a6633642232efd164d4708967ab59e498fbff896?hp=-c Merge branch 'footer-links' of git://github.com/james-geiger/BookStack into james-geiger-footer-links --- a6633642232efd164d4708967ab59e498fbff896 diff --combined resources/lang/en/settings.php index 414650d21,ba1fdfbae..878a9991f --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@@ -37,6 -37,10 +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.', @@@ -68,7 -72,7 +72,7 @@@ 'maint' => 'Maintenance', 'maint_image_cleanup' => 'Cleanup Images', 'maint_image_cleanup_desc' => "Scans page & revision content to check which images and drawings are currently in use and which images are redundant. Ensure you create a full database and image backup before running this.", - 'maint_image_cleanup_ignore_revisions' => 'Ignore images in revisions', + 'maint_delete_images_only_in_revisions' => 'Also delete images that only exist in old page revisions', 'maint_image_cleanup_run' => 'Run Cleanup', 'maint_image_cleanup_warning' => ':count potentially unused images were found. Are you sure you want to delete these images?', 'maint_image_cleanup_success' => ':count potentially unused images found and deleted!', @@@ -80,41 -84,6 +84,41 @@@ 'maint_send_test_email_mail_subject' => 'Test Email', 'maint_send_test_email_mail_greeting' => 'Email delivery seems to work!', 'maint_send_test_email_mail_text' => 'Congratulations! As you received this email notification, your email settings seem to be configured properly.', + 'maint_recycle_bin_desc' => 'Deleted shelves, books, chapters & pages are sent to the recycle bin so they can be restored or permanently deleted. Older items in the recycle bin may be automatically removed after a while depending on system configuration.', + 'maint_recycle_bin_open' => 'Open Recycle Bin', + + // Recycle Bin + 'recycle_bin' => 'Recycle Bin', + 'recycle_bin_desc' => 'Here you can restore items that have been deleted or choose to permanently remove them from the system. This list is unfiltered unlike similar activity lists in the system where permission filters are applied.', + 'recycle_bin_deleted_item' => 'Deleted Item', + 'recycle_bin_deleted_by' => 'Deleted By', + 'recycle_bin_deleted_at' => 'Deletion Time', + 'recycle_bin_permanently_delete' => 'Permanently Delete', + 'recycle_bin_restore' => 'Restore', + 'recycle_bin_contents_empty' => 'The recycle bin is currently empty', + 'recycle_bin_empty' => 'Empty Recycle Bin', + 'recycle_bin_empty_confirm' => 'This will permanently destroy all items in the recycle bin including content contained within each item. Are you sure you want to empty the recycle bin?', + 'recycle_bin_destroy_confirm' => 'This action will permanently delete this item, along with any child elements listed below, from the system and you will not be able to restore this content. Are you sure you want to permanently delete this item?', + 'recycle_bin_destroy_list' => 'Items to be Destroyed', + 'recycle_bin_restore_list' => 'Items to be Restored', + 'recycle_bin_restore_confirm' => 'This action will restore the deleted item, including any child elements, to their original location. If the original location has since been deleted, and is now in the recycle bin, the parent item will also need to be restored.', + 'recycle_bin_restore_deleted_parent' => 'The parent of this item has also been deleted. These will remain deleted until that parent is also restored.', + 'recycle_bin_destroy_notification' => 'Deleted :count total items from the recycle bin.', + 'recycle_bin_restore_notification' => 'Restored :count total items from the recycle bin.', + + // Audit Log + 'audit' => 'Audit Log', + 'audit_desc' => 'This audit log displays a list of activities tracked in the system. This list is unfiltered unlike similar activity lists in the system where permission filters are applied.', + 'audit_event_filter' => 'Event Filter', + 'audit_event_filter_no_filter' => 'No Filter', + 'audit_deleted_item' => 'Deleted Item', + 'audit_deleted_item_name' => 'Name: :name', + 'audit_table_user' => 'User', + 'audit_table_event' => 'Event', + 'audit_table_related' => 'Related Item or Detail', + 'audit_table_date' => 'Activity Date', + 'audit_date_from' => 'Date Range From', + 'audit_date_to' => 'Date Range To', // Role Settings 'roles' => 'Roles', @@@ -141,7 -110,6 +145,7 @@@ 'role_access_api' => 'Access system API', 'role_manage_settings' => 'Manage app settings', 'role_asset' => 'Asset Permissions', + 'roles_system_warning' => 'Be aware that access to any of the above three permissions can allow a user to alter their own privileges or the privileges of others in the system. Only assign roles with these permissions to trusted users.', 'role_asset_desc' => 'These permissions control default access to the assets within the system. Permissions on Books, Chapters and Pages will override these permissions.', 'role_asset_admins' => 'Admins are automatically given access to all content but these options may show or hide UI options.', 'role_all' => 'All', @@@ -157,7 -125,6 +161,7 @@@ 'user_profile' => 'User Profile', 'users_add_new' => 'Add New User', 'users_search' => 'Search Users', + 'users_latest_activity' => 'Latest Activity', 'users_details' => 'User Details', 'users_details_desc' => 'Set a display name and an email address for this user. The email address will be used for logging into the application.', 'users_details_desc_no_email' => 'Set a display name for this user so others can recognise them.', @@@ -175,10 -142,7 +179,10 @@@ 'users_delete_named' => 'Delete user :userName', 'users_delete_warning' => 'This will fully delete this user with the name \':userName\' from the system.', 'users_delete_confirm' => 'Are you sure you want to delete this user?', - 'users_delete_success' => 'Users successfully removed', + 'users_migrate_ownership' => 'Migrate Ownership', + 'users_migrate_ownership_desc' => 'Select a user here if you want another user to become the owner of all items currently owned by this user.', + 'users_none_selected' => 'No user selected', + 'users_delete_success' => 'User successfully removed', 'users_edit' => 'Edit User', 'users_edit_profile' => 'Edit Profile', 'users_edit_success' => 'User successfully updated', @@@ -204,7 -168,7 +208,7 @@@ 'user_api_token_name_desc' => 'Give your token a readable name as a future reminder of its intended purpose.', 'user_api_token_expiry' => 'Expiry Date', 'user_api_token_expiry_desc' => 'Set a date at which this token expires. After this date, requests made using this token will no longer work. Leaving this field blank will set an expiry 100 years into the future.', - 'user_api_token_create_secret_message' => 'Immediately after creating this token a "Token ID"" & "Token Secret" will be generated and displayed. The secret will only be shown a single time so be sure to copy the value to somewhere safe and secure before proceeding.', + 'user_api_token_create_secret_message' => 'Immediately after creating this token a "Token ID" & "Token Secret" will be generated and displayed. The secret will only be shown a single time so be sure to copy the value to somewhere safe and secure before proceeding.', 'user_api_token_create_success' => 'API token successfully created', 'user_api_token_update_success' => 'API token successfully updated', 'user_api_token' => 'API Token', @@@ -212,8 -176,8 +216,8 @@@ 'user_api_token_id_desc' => 'This is a non-editable system generated identifier for this token which will need to be provided in API requests.', 'user_api_token_secret' => 'Token Secret', 'user_api_token_secret_desc' => 'This is a system generated secret for this token which will need to be provided in API requests. This will only be displayed this one time so copy this value to somewhere safe and secure.', - 'user_api_token_created' => 'Token Created :timeAgo', - 'user_api_token_updated' => 'Token Updated :timeAgo', + 'user_api_token_created' => 'Token created :timeAgo', + 'user_api_token_updated' => 'Token updated :timeAgo', 'user_api_token_delete' => 'Delete Token', 'user_api_token_delete_warning' => 'This will fully delete this API token with the name \':tokenName\' from the system.', 'user_api_token_delete_confirm' => 'Are you sure you want to delete this API token?', @@@ -225,7 -189,6 +229,7 @@@ 'language_select' => [ 'en' => 'English', 'ar' => 'العربية', + 'bg' => 'Bǎlgarski', 'cs' => 'Česky', 'da' => 'Dansk', 'de' => 'Deutsch (Sie)', @@@ -233,13 -196,11 +237,13 @@@ 'es' => 'Español', 'es_AR' => 'Español Argentina', 'fr' => 'Français', + 'he' => 'עברית', 'hu' => 'Magyar', 'it' => 'Italian', 'ja' => '日本語', 'ko' => '한국어', 'nl' => 'Nederlands', + 'nb' => 'Norsk (Bokmål)', 'pl' => 'Polski', 'pt_BR' => 'Português do Brasil', 'ru' => 'Русский', diff --combined resources/sass/_html.scss index 57869d652,e123ee286..026295669 --- a/resources/sass/_html.scss +++ b/resources/sass/_html.scss @@@ -15,14 -15,15 +15,18 @@@ html &.flexbox { overflow-y: hidden; } + &.dark-mode { + background-color: #111; + } } body { font-size: $fs-m; line-height: 1.6; - color: #444; + @include lightDark(color, #444, #AAA); -webkit-font-smoothing: antialiased; - } + background-color: #F2F2F2; + height: 100%; + display: flex; + flex-direction: column; -} ++} diff --combined resources/sass/_layout.scss index 4873ff2da,bb600abc2..c12cae256 --- a/resources/sass/_layout.scss +++ b/resources/sass/_layout.scss @@@ -4,10 -4,10 +4,10 @@@ */ .container { max-width: $xxl; - margin-left: auto; - margin-right: auto; - padding-left: $-m; - padding-right: $-m; + margin-inline-start: auto; + margin-inline-end: auto; + padding-inline-start: $-m; + padding-inline-end: $-m; &.small { max-width: 840px; } @@@ -49,9 -49,6 +49,9 @@@ &.v-center { align-items: center; } + &.v-end { + align-items: end; + } &.no-gap { grid-row-gap: 0; grid-column-gap: 0; @@@ -95,6 -92,10 +95,10 @@@ } } + #content { + flex: 1 0 auto; + } + /** * Flexbox layout system */ @@@ -121,40 -122,9 +125,40 @@@ body.flexbox position: relative; } +.flex-container-row { + display: flex; + flex-direction: row; + &.v-center { + align-items: center; + } +} + +.flex-container-column { + display: flex; + flex-direction: column; +} + +.flex-container-column.wrap, .flex-container-row.wrap { + flex-wrap: wrap; +} + .flex { min-height: 0; flex: 1; + &.fit-content { + flex-basis: auto; + flex-grow: 0; + } +} + +.justify-flex-end { + justify-content: flex-end; +} +.justify-center { + justify-content: center; +} +.items-center { + align-items: center; } @@@ -162,24 -132,20 +166,24 @@@ * Display and float utilities */ .block { - display: block; + display: block !important; position: relative; } .inline { - display: inline; + display: inline !important; } .block.inline { - display: inline-block; + display: inline-block !important; } .hidden { - display: none; + display: none !important; +} + +.fill-height { + height: 100%; } .float { @@@ -222,12 -188,12 +226,12 @@@ /** * Fixes */ -.clearfix:before, -.clearfix:after { +.clearfix::before, +.clearfix::after { content: " "; display: table; } -.clearfix:after { +.clearfix::after { clear: both; } @@@ -236,8 -202,8 +240,8 @@@ */ .tri-layout-container { display: grid; - margin-left: $-xl; - margin-right: $-xl; + margin-inline-start: $-xl; + margin-inline-end: $-xl; grid-template-columns: 1fr 4fr 1fr; grid-template-areas: "a b c"; grid-column-gap: $-xxl; @@@ -261,7 -227,7 +265,7 @@@ ". b b"; grid-template-columns: 1fr 3fr; grid-template-rows: min-content min-content 1fr; - padding-right: $-l; + padding-inline-end: $-l; } } @include between($l, $xxl) { @@@ -279,7 -245,6 +283,7 @@@ min-height: 50vh; overflow-y: scroll; overflow-x: hidden; + height: 100%; scrollbar-width: none; -ms-overflow-style: none; &::-webkit-scrollbar { @@@ -297,11 -262,11 +301,11 @@@ grid-template-areas: none; grid-template-columns: 1fr; grid-column-gap: 0; - padding-right: $-xs; - padding-left: $-xs; + padding-inline-end: $-xs; + padding-inline-start: $-xs; .tri-layout-left-contents, .tri-layout-right-contents { - padding-left: $-m; - padding-right: $-m; + padding-inline-start: $-m; + padding-inline-end: $-m; } .tri-layout-left > *, .tri-layout-right > * { display: none; @@@ -355,7 -320,7 +359,7 @@@ @include smaller-than($m) { .tri-layout-container { - margin-left: 0; - margin-right: 0; + margin-inline-start: 0; + margin-inline-end: 0; } -} +} diff --combined resources/sass/styles.scss index 78d94f977,b512e5b5c..614b7f295 --- a/resources/sass/styles.scss +++ b/resources/sass/styles.scss @@@ -15,9 -15,15 +15,10 @@@ @import "codemirror"; @import "components"; @import "header"; + @import "footer"; @import "lists"; @import "pages"; -[v-cloak] { - display: none; opacity: 0; - animation-name: none !important; -} - // Jquery Sortable Styles .dragged { position: absolute; @@@ -31,7 -37,7 +32,7 @@@ body.dragging, body.dragging * // User Avatar Images .avatar { border-radius: 100%; - background-color: #EEE; + @include lightDark(background-color, #eee, #000); width: 30px; height: 30px; &.med { @@@ -49,11 -55,6 +50,11 @@@ &.square { border-radius: 3px; } + &[src$="user_avatar.png"] { + @include whenDark { + filter: invert(1); + } + } } // Loading icon @@@ -74,7 -75,7 +75,7 @@@ $loadingSize: 10px animation-duration: 1.4s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(.62, .28, .23, .99); - margin-right: 4px; + margin-inline-end: 4px; background-color: var(--color-page); animation-delay: 0.3s; } @@@ -89,7 -90,7 +90,7 @@@ animation-delay: 0.6s; } > span { - margin-left: $-s; + margin-inline-start: $-s; font-style: italic; color: #888; vertical-align: top; @@@ -110,7 -111,7 +111,7 @@@ $btt-size: 40px svg { width: $btt-size / 1.5; height: $btt-size / 1.5; - margin-right: 4px; + margin-inline-end: 4px; } width: $btt-size; height: $btt-size; @@@ -135,12 -136,10 +136,12 @@@ .contained-search-box { display: flex; + height: 38px; input, button { border-radius: 0; - border: 1px solid #DDD; - margin-left: -1px; + border: 1px solid #ddd; + @include lightDark(border-color, #ddd, #000); + margin-inline-start: -1px; } input { flex: 5; @@@ -159,14 -158,10 +160,14 @@@ background-color: $negative; color: #EEE; } + svg { + margin: 0; + } } .entity-selector { border: 1px solid #DDD; + @include lightDark(border-color, #ddd, #111); border-radius: 3px; overflow: hidden; font-size: 0.8em; @@@ -182,12 -177,12 +183,12 @@@ .entity-list { overflow-y: scroll; height: 400px; - background-color: #EEEEEE; - margin-right: 0; - margin-left: 0; + @include lightDark(background-color, #eee, #222); + margin-inline-end: 0; + margin-inline-start: 0; } .entity-list-item { - background-color: #FFF; + @include lightDark(background-color, #fff, #222); } .entity-list-item p { margin-bottom: 0; @@@ -258,29 -253,27 +259,29 @@@ } .list-sort { display: inline-grid; - margin-left: $-s; + margin-inline-start: $-s; grid-template-columns: minmax(120px, max-content) 40px; font-size: 0.9rem; border: 2px solid #DDD; + @include lightDark(border-color, #ddd, #444); border-radius: 4px; } .list-sort-label { font-weight: bold; display: inline-block; - color: #555; + @include lightDark(color, #555, #888); } .list-sort-type { - text-align: left; + text-align: start; } .list-sort-type, .list-sort-dir { padding: $-xs $-s; cursor: pointer; } .list-sort-dir { - border-left: 2px solid #DDD; - fill: #888; + border-inline-start: 2px solid #DDD; + color: #888; + @include lightDark(border-color, #ddd, #444); .svg-icon { transition: transform ease-in-out 120ms; } @@@ -288,15 -281,4 +289,15 @@@ transform: rotate(180deg); } } +} + +table.table .table-user-item { + display: grid; + grid-template-columns: 42px 1fr; + align-items: center; +} +table.table .table-entity-item { + display: grid; + grid-template-columns: 36px 1fr; + align-items: center; } diff --combined resources/views/base.blade.php index a5404a365,9a3e6f906..29e4acee7 --- a/resources/views/base.blade.php +++ b/resources/views/base.blade.php @@@ -1,7 -1,5 +1,7 @@@ - + {{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }} @@@ -25,6 -23,7 +25,6 @@@ @stack('translations') - @@@ -35,6 -34,8 +35,8 @@@ @yield('content') + @include('common.footer') +