From 31dbf132b932bd0777edc87605f62c3681d94b32 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 26 Mar 2022 21:36:05 +0000 Subject: [PATCH 1/3] Started playing with new settings view layout --- resources/icons/palette.svg | 1 + resources/sass/_layout.scss | 3 + resources/sass/_lists.scss | 12 +- resources/views/settings/audit.blade.php | 6 +- resources/views/settings/index.blade.php | 510 +++++++++--------- .../views/settings/maintenance.blade.php | 2 +- .../parts/navbar-with-version.blade.php | 17 - .../views/settings/parts/navbar.blade.php | 2 +- .../settings/recycle-bin/destroy.blade.php | 4 +- .../settings/recycle-bin/index.blade.php | 4 +- .../settings/recycle-bin/restore.blade.php | 4 +- .../views/settings/roles/create.blade.php | 4 +- .../views/settings/roles/delete.blade.php | 4 +- resources/views/settings/roles/edit.blade.php | 4 +- .../views/settings/roles/index.blade.php | 4 +- .../views/settings/webhooks/create.blade.php | 4 +- .../views/settings/webhooks/delete.blade.php | 4 +- .../views/settings/webhooks/edit.blade.php | 4 +- .../views/settings/webhooks/index.blade.php | 4 +- resources/views/users/create.blade.php | 4 +- resources/views/users/delete.blade.php | 4 +- resources/views/users/edit.blade.php | 4 +- resources/views/users/index.blade.php | 4 +- resources/views/users/profile.blade.php | 2 +- 24 files changed, 300 insertions(+), 315 deletions(-) create mode 100644 resources/icons/palette.svg delete mode 100644 resources/views/settings/parts/navbar-with-version.blade.php diff --git a/resources/icons/palette.svg b/resources/icons/palette.svg new file mode 100644 index 000000000..114386302 --- /dev/null +++ b/resources/icons/palette.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index 69882d40d..b1c80cb53 100644 --- a/resources/sass/_layout.scss +++ b/resources/sass/_layout.scss @@ -8,6 +8,9 @@ margin-inline-end: auto; padding-inline-start: $-m; padding-inline-end: $-m; + &.medium { + max-width: 1100px; + } &.small { max-width: 840px; } diff --git a/resources/sass/_lists.scss b/resources/sass/_lists.scss index 8febdcffc..ea10f66bf 100644 --- a/resources/sass/_lists.scss +++ b/resources/sass/_lists.scss @@ -681,7 +681,17 @@ ul.pagination { } a:hover { @include lightDark(background-color, rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05)); - border-radius: 3px; + border-radius: 4px; text-decoration: none; } + &.in-sidebar { + a { + display: block; + margin-bottom: $-xs; + } + a.active { + border-radius: 4px; + @include lightDark(background-color, rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05)); + } + } } diff --git a/resources/views/settings/audit.blade.php b/resources/views/settings/audit.blade.php index 48e46a59d..ca5dba527 100644 --- a/resources/views/settings/audit.blade.php +++ b/resources/views/settings/audit.blade.php @@ -3,11 +3,7 @@ @section('body')
-
-
- @include('settings.parts.navbar', ['selected' => 'audit']) -
-
+ @include('settings.parts.navbar', ['selected' => 'audit'])

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

diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 8b5615658..d22da360c 100644 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -1,275 +1,297 @@ @extends('layouts.simple') @section('body') -
+
- @include('settings.parts.navbar-with-version', ['selected' => 'settings']) - -
-

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

-
- {!! csrf_field() !!} - - -
- - -
-
- -

{!! trans('settings.app_public_access_desc') !!}

- @if(userCan('users-manage')) -

- {!! trans('settings.app_public_access_desc_guest') !!} -

- @endif -
-
- @include('form.toggle-switch', [ - 'name' => 'setting-app-public', - 'value' => setting('app-public'), - 'label' => trans('settings.app_public_access_toggle'), - ]) -
-
- -
-
- -

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

-
-
- @include('form.toggle-switch', [ - 'name' => 'setting-app-secure-images', - 'value' => setting('app-secure-images'), - 'label' => trans('settings.app_secure_images_toggle'), - ]) -
-
- -
-
- -

{!! trans('settings.app_disable_comments_desc') !!}

-
-
- @include('form.toggle-switch', [ - 'name' => 'setting-app-disable-comments', - 'value' => setting('app-disable-comments'), - 'label' => trans('settings.app_disable_comments_toggle'), - ]) -
-
+ @include('settings.parts.navbar', ['selected' => 'settings']) +
+ -
-

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

-
- {!! csrf_field() !!} - +
+
+

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

+ + {!! csrf_field() !!} + -
+
-
-
- -

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

-
-
- - @include('form.toggle-switch', [ - 'name' => 'setting-app-name-header', - 'value' => setting('app-name-header'), - 'label' => trans('settings.app_name_header'), - ]) -
-
-
-
- -

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

-
-
- -
-
- -
-
- -

{!! trans('settings.app_logo_desc') !!}

-
-
- @include('form.image-picker', [ - 'removeName' => 'setting-app-logo', - 'removeValue' => 'none', - 'defaultImage' => url('/logo.png'), - 'currentImage' => setting('app-logo'), - 'name' => 'app_logo', - 'imageClass' => 'logo-image', - ]) -
-
- - -
-
- -

{!! trans('settings.app_primary_color_desc') !!}

-
-
- - -
- - | - +
+
+ +

{!! trans('settings.app_public_access_desc') !!}

+ @if(userCan('users-manage')) +

+ {!! trans('settings.app_public_access_desc_guest') !!} +

+ @endif +
+
+ @include('form.toggle-switch', [ + 'name' => 'setting-app-public', + 'value' => setting('app-public'), + 'label' => trans('settings.app_public_access_toggle'), + ]) +
+
+ +
+
+ +

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

+
+
+ @include('form.toggle-switch', [ + 'name' => 'setting-app-secure-images', + 'value' => setting('app-secure-images'), + 'label' => trans('settings.app_secure_images_toggle'), + ]) +
+
+ +
+
+ +

{!! trans('settings.app_disable_comments_desc') !!}

+
+
+ @include('form.toggle-switch', [ + 'name' => 'setting-app-disable-comments', + 'value' => setting('app-disable-comments'), + 'label' => trans('settings.app_disable_comments_toggle'), + ]) +
-
-
- -
-
- -

{!! trans('settings.content_colors_desc') !!}

-
+ +
+ +
+ +
+ +
+

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

+
+ {!! csrf_field() !!} + + +
+ +
+
+ +

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

+
+
+ + @include('form.toggle-switch', [ + 'name' => 'setting-app-name-header', + 'value' => setting('app-name-header'), + 'label' => trans('settings.app_name_header'), + ]) +
+
+ +
+
+ +

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

+
+
+ +
+
+ +
+
+ +

{!! trans('settings.app_logo_desc') !!}

+
+
+ @include('form.image-picker', [ + 'removeName' => 'setting-app-logo', + 'removeValue' => 'none', + 'defaultImage' => url('/logo.png'), + 'currentImage' => setting('app-logo'), + 'name' => 'app_logo', + 'imageClass' => 'logo-image', + ]) +
+
+ + +
+
+ +

{!! trans('settings.app_primary_color_desc') !!}

+
+
+ + +
+ + | + +
+ +
+
+ + +
+
+ +

{!! trans('settings.content_colors_desc') !!}

+
+
+
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'bookshelf']) + @include('settings.parts.setting-entity-color-picker', ['type' => 'book']) + @include('settings.parts.setting-entity-color-picker', ['type' => 'chapter']) +
+
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'page']) + @include('settings.parts.setting-entity-color-picker', ['type' => 'page-draft']) +
+
+
+ +
+
+ +

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

+
+
+ + + +
+
+
- @include('settings.parts.setting-entity-color-picker', ['type' => 'bookshelf']) - @include('settings.parts.setting-entity-color-picker', ['type' => 'book']) - @include('settings.parts.setting-entity-color-picker', ['type' => 'chapter']) + +

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

+ @include('settings.parts.footer-links', ['name' => 'setting-app-footer-links', 'value' => setting('app-footer-links', [])])
+ +
- @include('settings.parts.setting-entity-color-picker', ['type' => 'page']) - @include('settings.parts.setting-entity-color-picker', ['type' => 'page-draft']) + +

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

+ +

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

-
-
-
-
- -

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

-
-
- - + +
+ +
+ +
+ +
+

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

+
+ {!! csrf_field() !!} + + +
+
+
+ +

{!! trans('settings.reg_enable_desc') !!}

+
+
+ @include('form.toggle-switch', [ + 'name' => 'setting-registration-enabled', + 'value' => setting('registration-enabled'), + 'label' => trans('settings.reg_enable_toggle') + ]) + + @if(in_array(config('auth.method'), ['ldap', 'saml2', 'oidc'])) +
{{ trans('settings.reg_enable_external_warning') }}
+ @endif + + + +
+ +
+
+ +

{!! trans('settings.reg_confirm_restrict_domain_desc') !!}

+
+
+ +
+
+ +
+
+ +

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

+
+
+ @include('form.toggle-switch', [ + 'name' => 'setting-registration-confirmation', + 'value' => setting('registration-confirmation'), + 'label' => trans('settings.reg_email_confirmation_toggle') + ]) +
+
+
-
- -
- -

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

- @include('settings.parts.footer-links', ['name' => 'setting-app-footer-links', 'value' => setting('app-footer-links', [])]) -
- - -
- -

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

- -

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

-
- +
+ +
+
+
-
- -
- -
- -
-

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

-
- {!! csrf_field() !!} - - -
-
-
- -

{!! trans('settings.reg_enable_desc') !!}

-
-
- @include('form.toggle-switch', [ - 'name' => 'setting-registration-enabled', - 'value' => setting('registration-enabled'), - 'label' => trans('settings.reg_enable_toggle') - ]) - - @if(in_array(config('auth.method'), ['ldap', 'saml2', 'oidc'])) -
{{ trans('settings.reg_enable_external_warning') }}
- @endif - - - -
-
- -
-
- -

{!! trans('settings.reg_confirm_restrict_domain_desc') !!}

-
-
- -
-
- -
-
- -

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

-
-
- @include('form.toggle-switch', [ - 'name' => 'setting-registration-confirmation', - 'value' => setting('registration-confirmation'), - 'label' => trans('settings.reg_email_confirmation_toggle') - ]) -
-
- -
- -
- -
-
diff --git a/resources/views/settings/maintenance.blade.php b/resources/views/settings/maintenance.blade.php index ea94413f2..a2a9ebc81 100644 --- a/resources/views/settings/maintenance.blade.php +++ b/resources/views/settings/maintenance.blade.php @@ -3,7 +3,7 @@ @section('body')
- @include('settings.parts.navbar-with-version', ['selected' => 'maintenance']) + @include('settings.parts.navbar', ['selected' => 'maintenance'])

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

diff --git a/resources/views/settings/parts/navbar-with-version.blade.php b/resources/views/settings/parts/navbar-with-version.blade.php deleted file mode 100644 index bec41146b..000000000 --- a/resources/views/settings/parts/navbar-with-version.blade.php +++ /dev/null @@ -1,17 +0,0 @@ -{{-- -$selected - String name of the selected tab -$version - Version of bookstack to display ---}} -
-
- @include('settings.parts.navbar', ['selected' => $selected]) -
-
-
-
-
- \ No newline at end of file diff --git a/resources/views/settings/parts/navbar.blade.php b/resources/views/settings/parts/navbar.blade.php index f2fad378c..e229f5e65 100644 --- a/resources/views/settings/parts/navbar.blade.php +++ b/resources/views/settings/parts/navbar.blade.php @@ -1,5 +1,5 @@ -