From 7f95b51b00d0d5fa1e7bcf5574f2d58bddcbd504 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 9 Dec 2018 16:51:31 +0000 Subject: [PATCH] Rolled tri-layout to page edit and book-create --- resources/assets/sass/_forms.scss | 9 +- resources/assets/sass/_grid.scss | 21 ++- resources/assets/sass/_lists.scss | 3 + resources/assets/sass/_pages.scss | 19 +-- resources/assets/sass/_variables.scss | 2 +- resources/views/books/create.blade.php | 30 ++--- resources/views/books/form.blade.php | 2 +- resources/views/books/grid-item.blade.php | 5 +- resources/views/books/index.blade.php | 2 + resources/views/books/list-item.blade.php | 18 +-- resources/views/books/list.blade.php | 20 +-- resources/views/pages/show.blade.php | 127 ++++++++++-------- resources/views/partials/book-tree.blade.php | 11 +- .../views/partials/breadcrumbs.blade.php | 8 +- resources/views/simple-layout.blade.php | 1 - resources/views/tri-layout.blade.php | 4 +- 16 files changed, 138 insertions(+), 144 deletions(-) diff --git a/resources/assets/sass/_forms.scss b/resources/assets/sass/_forms.scss index 6b3ed3815..d955b7efc 100644 --- a/resources/assets/sass/_forms.scss +++ b/resources/assets/sass/_forms.scss @@ -206,11 +206,9 @@ input:checked + .toggle-switch { } .form-group[collapsible] { - margin-left: -$-m; - margin-right: -$-m; padding: 0 $-m; - border-top: 1px solid #DDD; - border-bottom: 1px solid #DDD; + border: 1px solid #DDD; + border-radius: 4px; .collapse-title { margin-left: -$-m; margin-right: -$-m; @@ -238,9 +236,6 @@ input:checked + .toggle-switch { &.open .collapse-title label:before { transform: rotate(90deg); } - &+.form-group[collapsible] { - margin-top: -($-s + 1); - } } .inline-input-style { diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss index e7ca26860..f326b2acf 100644 --- a/resources/assets/sass/_grid.scss +++ b/resources/assets/sass/_grid.scss @@ -50,6 +50,13 @@ body.flexbox { flex: 1; } +.content-wrap.card { + padding: $-l $-xxl; + margin-left: auto; + margin-right: auto; + margin-bottom: $-xl; + overflow: auto; +} .tri-layout-container { display: grid; @@ -68,17 +75,6 @@ body.flexbox { .tri-layout-middle { grid-area: b; } - .content-wrap.card { - padding: $-l $-xxl; - margin-left: auto; - margin-right: auto; - margin-bottom: $-xl; - overflow: auto; - &.thin { - width: 940px; - max-width: 100%; - } - } } @include smaller-than($xxl) { .tri-layout-container { @@ -97,6 +93,7 @@ body.flexbox { position: sticky; top: $-m; max-height: 100vh; + min-height: 50vh; overflow-y: scroll; overflow-x: visible; scrollbar-width: none; @@ -150,7 +147,7 @@ body.flexbox { } .tri-layout-left, .tri-layout-right { - opacity: 0.8; + opacity: 0.7; transition: opacity ease-in-out 120ms; &:hover { opacity: 1; diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 386113f46..d26997c8f 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -271,6 +271,9 @@ ul.pagination { color: $color-page-draft; fill: $color-page-draft; } + > .dropdown-container { + display: block; + } } .entity-list-item, .icon-list-item { diff --git a/resources/assets/sass/_pages.scss b/resources/assets/sass/_pages.scss index 3e6da03f0..8cc7c830f 100755 --- a/resources/assets/sass/_pages.scss +++ b/resources/assets/sass/_pages.scss @@ -38,11 +38,7 @@ width: 100%; max-width: 840px; margin: 0 auto; - margin-top: $-xxl; overflow-wrap: break-word; - &.flex { - margin-top: $-xl; - } .align-left { text-align: left; } @@ -342,15 +338,10 @@ } } -.comments-container { - width: 100%; - margin-top: $-xl; - margin-bottom: $-m; - h5 { - color: #888; - font-weight: normal; - margin-top: 0.5em; - } +.comments-container h5 { + color: #888; + font-weight: normal; + margin-top: 0.5em; } .comment-editor .CodeMirror, .comment-editor .CodeMirror-scroll { @@ -401,6 +392,8 @@ position: relative; overflow: hidden; padding: $-xs $-m; + color: #666; + fill: currentColor; &:after { content: ''; position: absolute; diff --git a/resources/assets/sass/_variables.scss b/resources/assets/sass/_variables.scss index 908a65536..07820c57e 100644 --- a/resources/assets/sass/_variables.scss +++ b/resources/assets/sass/_variables.scss @@ -26,7 +26,7 @@ $-s: 12px; $-xs: 6px; $-xxs: 3px; -$spacing: (('xxs', $-xxs), ('xs', $-xs), ('s', $-s), ('m', $-m), ('l', $-l), ('xl', $-xl), ('xxl', $-xxl)); +$spacing: (('none', 0), ('xxs', $-xxs), ('xs', $-xs), ('s', $-s), ('m', $-m), ('l', $-l), ('xl', $-xl), ('xxl', $-xxl)); // Fonts $text: -apple-system, BlinkMacSystemFont, diff --git a/resources/views/books/create.blade.php b/resources/views/books/create.blade.php index 2d5e6c455..b21fb3012 100644 --- a/resources/views/books/create.blade.php +++ b/resources/views/books/create.blade.php @@ -1,28 +1,24 @@ @extends('simple-layout') -@section('toolbar') -
- -
-@stop - @section('body') +
+ -
-

 

-
-

@icon('add') {{ trans('entities.books_create') }}

-
+
+

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

@include('books/form')
-
-


+ @include('components.image-manager', ['imageType' => 'cover']) @stop \ No newline at end of file diff --git a/resources/views/books/form.blade.php b/resources/views/books/form.blade.php index bf94b5b07..97ddd9681 100644 --- a/resources/views/books/form.blade.php +++ b/resources/views/books/form.blade.php @@ -41,5 +41,5 @@
{{ trans('common.cancel') }} - +
\ No newline at end of file diff --git a/resources/views/books/grid-item.blade.php b/resources/views/books/grid-item.blade.php index bfb95e33e..fd576e7ed 100644 --- a/resources/views/books/grid-item.blade.php +++ b/resources/views/books/grid-item.blade.php @@ -11,7 +11,8 @@ @endif
\ No newline at end of file diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php index 59be7e362..fcf9cb4bb 100644 --- a/resources/views/books/index.blade.php +++ b/resources/views/books/index.blade.php @@ -1,5 +1,7 @@ @extends('tri-layout') +@section('container-classes', 'mt-xl') + @section('left') @if($recents)
diff --git a/resources/views/books/list-item.blade.php b/resources/views/books/list-item.blade.php index 05d7e90ef..966f67b22 100644 --- a/resources/views/books/list-item.blade.php +++ b/resources/views/books/list-item.blade.php @@ -1,10 +1,10 @@ -
-

@icon('book'){{$book->name}}

-
- @if(isset($book->searchSnippet)) -

{!! $book->searchSnippet !!}

- @else -

{{ $book->getExcerpt() }}

- @endif + +
-
\ No newline at end of file +
+

{{ $book->name }}

+
+

{{ $book->getExcerpt() }}

+
+
+
\ No newline at end of file diff --git a/resources/views/books/list.blade.php b/resources/views/books/list.blade.php index 2155cd5c8..5e077727b 100644 --- a/resources/views/books/list.blade.php +++ b/resources/views/books/list.blade.php @@ -1,5 +1,5 @@ -
+

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

@@ -12,18 +12,8 @@ @if($view === 'list')
@foreach($books as $book) - -
-
-
-

{{ $book->name }}

-
-

{{ $book->getExcerpt() }}

-
-
-
+ @include('books.list-item', ['book' => $book]) @endforeach - {!! $books->render() !!}
@else
@@ -31,10 +21,10 @@ @include('books.grid-item', ['book' => $book]) @endforeach
-
- {!! $books->render() !!} -
@endif +
+ {!! $books->render() !!} +
@else

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

@if(userCan('books-create-all')) diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php index d47bb660d..282ae21d2 100644 --- a/resources/views/pages/show.blade.php +++ b/resources/views/pages/show.blade.php @@ -1,46 +1,7 @@ -@extends('sidebar-layout') +@extends('tri-layout') +@section('container-classes', 'mt-xl') -@section('toolbar') -
-
- @include('pages._breadcrumbs', ['page' => $page]) -
-
- -
@icon('export'){{ trans('entities.export') }}
- -
- @if(userCan('page-update', $page)) - @icon('edit'){{ trans('common.edit') }} - @endif - @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page)) - - @endif - -
-
-@stop - -@section('sidebar') +@section('left') @if($page->tags->count() > 0)
@@ -49,8 +10,8 @@ @endif @if ($page->attachments->count() > 0) -
-

@icon('attach') {{ trans('entities.pages_attachments') }}

+
+
{{ trans('entities.pages_attachments') }}
@foreach($page->attachments as $attachment)
@@ -62,8 +23,8 @@ @endif @if (isset($pageNav) && count($pageNav)) -