From 42e908c7f0396cafa05337a6c6d2924a2f9c6747 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 30 Mar 2019 14:27:00 +0000 Subject: [PATCH] Cleaned up some existing tri-column views --- package-lock.json | 12 +++++-- resources/assets/sass/_forms.scss | 3 ++ resources/assets/sass/_grid.scss | 31 ++++++++++-------- resources/assets/sass/_header.scss | 8 ++--- resources/assets/sass/_lists.scss | 32 +++++++++++++++---- resources/views/auth/login.blade.php | 2 +- resources/views/auth/register.blade.php | 2 +- resources/views/books/show.blade.php | 2 +- resources/views/books/sort.blade.php | 2 +- resources/views/chapters/show.blade.php | 2 +- resources/views/common/home.blade.php | 2 +- .../views/partials/breadcrumbs.blade.php | 6 ++-- resources/views/search/all.blade.php | 2 +- resources/views/settings/index.blade.php | 22 ++++++------- .../views/settings/maintenance.blade.php | 2 +- resources/views/tri-layout.blade.php | 6 ++-- resources/views/users/edit.blade.php | 4 +-- resources/views/users/form.blade.php | 6 ++-- 18 files changed, 90 insertions(+), 56 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4d779f6f9..1a5fef175 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2833,7 +2833,8 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", @@ -2844,7 +2845,8 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2961,7 +2963,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2973,6 +2976,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3119,6 +3123,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3240,6 +3245,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/resources/assets/sass/_forms.scss b/resources/assets/sass/_forms.scss index 77ac35963..b35caae55 100644 --- a/resources/assets/sass/_forms.scss +++ b/resources/assets/sass/_forms.scss @@ -322,6 +322,9 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] { width: 300px; max-width: 100%; } + &.flexible input { + width: 100%; + } } .outline > input { diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss index 7415be73f..5a89bf359 100644 --- a/resources/assets/sass/_grid.scss +++ b/resources/assets/sass/_grid.scss @@ -74,7 +74,6 @@ body.flexbox { width: 100%; } } - @include smaller-than($m) { .content-wrap.card { padding: $-m $-l; @@ -83,15 +82,11 @@ body.flexbox { .tri-layout-container { display: grid; - grid-template-columns: 1fr minmax(auto, 940px) 1fr; + margin-left: $-xl; + margin-right: $-xl; + grid-template-columns: 1fr 4fr 1fr; grid-template-areas: "a b c"; - .tri-layout-right-contents, .tri-layout-left-contents { - padding-right: 3vw; - padding-left: 3vw; - max-width: 460px; - margin-left: auto; - margin-right: auto; - } + grid-column-gap: $-xxl; .tri-layout-right { grid-area: c; } @@ -100,6 +95,7 @@ body.flexbox { } .tri-layout-middle { grid-area: b; + padding-top: $-m; } } @include smaller-than($xxl) { @@ -110,24 +106,29 @@ body.flexbox { grid-template-rows: max-content min-content; padding-right: $-l; .content-wrap.card { - padding: $-l $-l; + padding: $-l $-xl; } } } @include larger-than($xxl) { .tri-layout-left-contents, .tri-layout-right-contents { + padding: $-m; position: sticky; top: $-m; max-height: 100vh; min-height: 50vh; overflow-y: scroll; - overflow-x: visible; + overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; &::-webkit-scrollbar { display: none; } } + .tri-layout-middle-contents { + max-width: 940px; + margin: 0 auto; + } } @include smaller-than($l) { @@ -230,10 +231,14 @@ div[class^="col-"] img { &.right-focus { grid-template-columns: 1fr 2fr; } - &.large-gap { + &.gap-xl { grid-column-gap: $-xl; grid-row-gap: $-xl; } + &.gap-xxl { + grid-column-gap: $-xxl; + grid-row-gap: $-xxl; + } } .grid-card { @@ -296,7 +301,7 @@ div[class^="col-"] img { .grid.half.collapse-xs { grid-template-columns: 1fr 1fr; } - .grid.large-gap { + .grid.gap-xl { grid-column-gap: $-m; grid-row-gap: $-m; } diff --git a/resources/assets/sass/_header.scss b/resources/assets/sass/_header.scss index e8667e719..8452b0667 100644 --- a/resources/assets/sass/_header.scss +++ b/resources/assets/sass/_header.scss @@ -202,14 +202,11 @@ header .search-box { align-items: center; justify-content: flex-start; flex-wrap: wrap; + opacity: 0.7; .icon-list-item { width: auto; padding-top: $-xs; padding-bottom: $-xs; - &:not(:hover) { - color: #666; - fill: #888; - } } .separator { display: inline-block; @@ -218,6 +215,9 @@ header .search-box { line-height: 0.8; margin: -2px 0 0; } + &:hover { + opacity: 1; + } } .breadcrumb-listing { diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 8b7027ef2..74b0d9938 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -1,12 +1,18 @@ .book-contents .entity-list-item { .icon { - width: 30px; - border-radius: 4px; + width: 4px; + border-radius: 1px; justify-self: stretch; align-self: stretch; height: auto; } + .icon:after { + opacity: 0.5; + } + .icon svg { + display: none; + } p { margin-bottom: 0; } @@ -24,9 +30,9 @@ width: 100%; position: relative; > .icon { - width: 30px; + width: 4px; height: auto; - border-radius: 0 0 4px 4px; + border-radius: 0 0 1px 1px; align-self: stretch; flex-shrink: 0; &:before { @@ -37,8 +43,14 @@ height: 1px; background-color: currentColor; content: ''; - opacity: 0.2; + opacity: 0.5; } + &:after { + opacity: 0.5; + } + } + .icon svg { + display: none; } > .content { flex: 1; @@ -50,7 +62,6 @@ .chapter-expansion-toggle:hover { background-color: rgba(0, 0, 0, 0.06); } - } .entity-list-item.has-children { @@ -368,9 +379,16 @@ ul.pagination { } &:not(.no-hover):hover { text-decoration: none; - background-color: #DDD; + background-color: rgba(0, 0, 0, 0.1); border-radius: 4px; } + &.outline-hover { + border: 1px solid transparent; + } + &.outline-hover:hover { + background-color: transparent; + border-color: rgba(0, 0, 0, 0.1); + } } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index f5d9e998f..900958812 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -16,7 +16,7 @@ @include('auth/forms/login/' . $authMethod) -
+
@include('components.custom-checkbox', [ 'name' => 'remember', diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 1388472c2..615ade3df 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -26,7 +26,7 @@ @include('form/password', ['name' => 'password', 'placeholder' => trans('auth.password_hint')])
-
+
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index 3a4a2c192..654bb98e3 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -123,7 +123,7 @@ @endif
-
-
+

{{ trans('entities.books_sort') }}

diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php index 397d75254..2e2cead89 100644 --- a/resources/views/chapters/show.blade.php +++ b/resources/views/chapters/show.blade.php @@ -132,7 +132,7 @@ @endif
- + diff --git a/resources/views/common/home.blade.php b/resources/views/common/home.blade.php index bc7778fe5..3e1a173f7 100644 --- a/resources/views/common/home.blade.php +++ b/resources/views/common/home.blade.php @@ -7,7 +7,7 @@ @icon('expand-text'){{ trans('common.toggle_details') }}
-
+
@if(count($draftPages) > 0)
diff --git a/resources/views/partials/breadcrumbs.blade.php b/resources/views/partials/breadcrumbs.blade.php index bf77a402a..3d07e1338 100644 --- a/resources/views/partials/breadcrumbs.blade.php +++ b/resources/views/partials/breadcrumbs.blade.php @@ -3,7 +3,7 @@ {{--Show top level item--}} @if (count($crumbs) > 0 && array_first($crumbs) instanceof \BookStack\Entities\Book) - + @icon('books') {{ trans('entities.books') }} @@ -25,7 +25,7 @@ {{ $crumb }} @elseif (is_array($crumb)) - + @icon($crumb['icon']) {{ $crumb['text'] }} @@ -33,7 +33,7 @@ @if($breadcrumbCount > 0) @include('partials.breadcrumb-listing', ['entity' => $crumb]) @endif - + @icon($crumb->getType()) {{ $crumb->getShortName() }} diff --git a/resources/views/search/all.blade.php b/resources/views/search/all.blade.php index 6a6c9d198..f7668b896 100644 --- a/resources/views/search/all.blade.php +++ b/resources/views/search/all.blade.php @@ -9,7 +9,7 @@  
-
+
{{ trans('entities.search_filters') }}
diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index d063539ea..cf043544e 100644 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -21,7 +21,7 @@
-
+

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

@@ -40,7 +40,7 @@
-
+

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

@@ -54,7 +54,7 @@
-
+

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

@@ -84,7 +84,7 @@
-
+

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

@@ -99,7 +99,7 @@
-
+

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

@@ -112,7 +112,7 @@
-
+

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

@@ -131,7 +131,7 @@
-
+

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

@@ -142,7 +142,7 @@
-
+

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

@@ -183,7 +183,7 @@ {!! csrf_field() !!}
-
+

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

@@ -208,7 +208,7 @@
-
+

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

@@ -218,7 +218,7 @@
-
+

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

diff --git a/resources/views/settings/maintenance.blade.php b/resources/views/settings/maintenance.blade.php index 6e408d1f4..f7f813f26 100644 --- a/resources/views/settings/maintenance.blade.php +++ b/resources/views/settings/maintenance.blade.php @@ -16,7 +16,7 @@

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

-
+

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

diff --git a/resources/views/tri-layout.blade.php b/resources/views/tri-layout.blade.php index 5f3d381df..bb734da8e 100644 --- a/resources/views/tri-layout.blade.php +++ b/resources/views/tri-layout.blade.php @@ -9,7 +9,7 @@ {{--
--}} {{--TODO - Cleanup toolbar usage--}} -
+