diff --git a/resources/assets/js/components/page-display.js b/resources/assets/js/components/page-display.js index a76160247..e7dacea64 100644 --- a/resources/assets/js/components/page-display.js +++ b/resources/assets/js/components/page-display.js @@ -136,7 +136,7 @@ class PageDisplay { // Fix the tree as a sidebar function stickTree() { - $sidebar.width($bookTreeParent.width() - 32); + $sidebar.css('width', $bookTreeParent.width()); $sidebar.addClass("fixed"); isFixed = true; } diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss index c742d020d..0ee934b3f 100644 --- a/resources/assets/sass/_grid.scss +++ b/resources/assets/sass/_grid.scss @@ -135,7 +135,6 @@ body.flexbox { z-index: 5; position: fixed; top: 0; - padding-right: $-m; padding-top: $-m; width: 30%; left: 0; diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index c28d7219f..a979363c0 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -95,88 +95,66 @@ } // Sidebar list -.book-tree { - transition: ease-in-out 240ms; - transition-property: right, border; -} -.book-tree h4 { - padding: $-m $-s 0 $-s; - i { - padding-right: $-s; +.book-tree .book.entity-list-item { + font-size: 0.6rem; + h4 { + font-size: 1rem; + margin: 0; } } .book-tree .sidebar-page-list { list-style: none; margin: $-xs 0 0; padding-left: 0; - border-left: 5px solid $color-book; - li a { - display: block; - border-bottom: none; - padding: $-xs 0 $-xs $-s; - &:hover { - text-decoration: none; - } - } - li a i { - padding-right: $-xs + 2px; - } - li, a { - display: block; - } - a.bold { - color: #EEE !important; - fill: #EEE !important; - } + padding-right: 0; + position: relative; ul { list-style: none; + padding-left: 1rem; + padding-right: 0; + } + .entity-icon { + font-size: 12px; + z-index: 2; + background-color: #FFF; + } + .entity-list-item-name { + font-size: 1em; margin: 0; } - .book { - color: $color-book !important; - fill: $color-book !important; - &.selected { - background-color: rgba($color-book, 0.29); - } + .entity-list-item { + font-size: 0.8rem; } - .chapter { - color: $color-chapter !important; - fill: $color-chapter !important; - &.selected { - background-color: rgba($color-chapter, 0.12); - } + .entity-list-item.selected { + background-color: #EEE; } - .page { - color: $color-page !important; - fill: $color-page !important; - border-bottom: none; - &.selected { - background-color: rgba($color-page, 0.1); - } + .chapter-child-menu { + font-size: 12px; + padding-left: 2rem; + margin-top: -.2rem; } [chapter-toggle] { - padding-left: $-s; + padding-left: 1.5rem; + padding-bottom: .2rem; } - .list-item-chapter { - border-left: 5px solid $color-chapter; - margin: 10px 10px; + &:after, .sub-menu:after { + content: ''; display: block; + position: absolute; + left: 1.6rem; + top: 1rem; + bottom: 1rem; + border-left: 2px solid #DDD; + opacity: 0.6; + z-index: 1; } - .list-item-page { - border-bottom: none; - border-left: 5px solid $color-page; - margin: 10px 10px; - } - .list-item-page.draft { - border-left: 5px solid $color-page-draft; - } - .page.draft .page, .list-item-page.draft a.page { - color: $color-page-draft !important; - fill: $color-page-draft !important; - } - .sub-menu { +} + +.chapter-child-menu { + ul.sub-menu { display: none; padding-left: 0; + position: relative; } [chapter-toggle].open + .sub-menu { display: block; diff --git a/resources/views/chapters/child-menu.blade.php b/resources/views/chapters/child-menu.blade.php new file mode 100644 index 000000000..36c7f9a24 --- /dev/null +++ b/resources/views/chapters/child-menu.blade.php @@ -0,0 +1,12 @@ +
\ No newline at end of file diff --git a/resources/views/pages/_breadcrumbs.blade.php b/resources/views/pages/_breadcrumbs.blade.php index 8bbda0411..f10f7ebe8 100644 --- a/resources/views/pages/_breadcrumbs.blade.php +++ b/resources/views/pages/_breadcrumbs.blade.php @@ -1,14 +1,5 @@ - \ No newline at end of file +@include('partials.breadcrumbs', [ + 'page' => $page, + 'chapter' => $page->hasChapter() ? $page->chapter : null, + 'book' => $page->book, +]) \ No newline at end of file diff --git a/resources/views/partials/book-tree.blade.php b/resources/views/partials/book-tree.blade.php index b0e5bff64..29e313fb4 100644 --- a/resources/views/partials/book-tree.blade.php +++ b/resources/views/partials/book-tree.blade.php @@ -1,36 +1,21 @@{{ $entity->getExcerpt() }}
-{{ $entity->getExcerpt() }}
+