mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-04 17:04:32 +08:00
Added sidebar highlighting and fixed code elements. Fixes #18
This commit is contained in:
@ -78,11 +78,17 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc
|
||||
|
||||
.title-input.page-title {
|
||||
font-size: 0.8em;
|
||||
.input {
|
||||
border: 1px solid #BBB;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
input[type="text"] {
|
||||
max-width: 840px;
|
||||
margin: 0 auto;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.title-input.page-title input[type="text"]{
|
||||
//border: 2px dotted #BBB;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.description-input textarea {
|
||||
|
@ -133,14 +133,15 @@ blockquote {
|
||||
.code-base {
|
||||
background-color: #F8F8F8;
|
||||
font-family: monospace;
|
||||
font-size: 0.88em;
|
||||
font-size: 0.80em;
|
||||
border: 1px solid #DDD;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
code {
|
||||
@extend .code-base;
|
||||
display: block;
|
||||
display: inline;
|
||||
padding: 1px 3px;
|
||||
white-space:pre;
|
||||
line-height: 1.2em;
|
||||
margin-bottom: 1.2em;
|
||||
|
@ -270,10 +270,15 @@ h1, h2, h3, h4, h5, h6 {
|
||||
.book-tree .sidebar-page-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
margin-top: $-xl;
|
||||
border-left: 5px solid #7BD06E;
|
||||
li a {
|
||||
display: block;
|
||||
border-bottom: 1px solid #3A3939;
|
||||
border-bottom: none;
|
||||
&:hover {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
li, a {
|
||||
display: block;
|
||||
@ -290,19 +295,32 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
.book {
|
||||
color: #7BD06E !important;
|
||||
&.selected {
|
||||
background-color: rgba(123, 208, 110, 0.29);
|
||||
}
|
||||
}
|
||||
.chapter {
|
||||
color: #D2A64B !important;
|
||||
&.selected {
|
||||
background-color: rgba(239, 169, 42, 0.27);
|
||||
}
|
||||
}
|
||||
.list-item-chapter {
|
||||
border-left: 5px solid #D2A64B;
|
||||
margin: 10px 10px;
|
||||
display: block;
|
||||
}
|
||||
.list-item-page {
|
||||
border-bottom: none;
|
||||
}
|
||||
.page {
|
||||
color: #4599DC !important;
|
||||
border-left: 5px solid #4599DC;
|
||||
margin: 10px 10px;
|
||||
border-bottom: none;
|
||||
&.selected {
|
||||
background-color: rgba(118, 164, 202, 0.41);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
<li><a href="/users"><i class="zmdi zmdi-accounts"></i>Users</a></li>
|
||||
<li><a href="/logout"><i class="zmdi zmdi-run zmdi-hc-flip-horizontal"></i>Logout</a></li>
|
||||
</ul>
|
||||
@if(isset($book) && !isset($books))
|
||||
@if(isset($book) && isset($current) && !isset($books))
|
||||
<div class="book-tree">
|
||||
@include('pages/sidebar-tree-list', ['book' => $book])
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
{{ csrf_field() }}
|
||||
<div class="title-input page-title clearfix">
|
||||
<div class="input">
|
||||
@include('form/text', ['name' => 'name', 'placeholder' => 'Enter Page Title'])
|
||||
@include('form/text', ['name' => 'name', 'placeholder' => 'Page Title'])
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit-area">
|
||||
@ -38,7 +38,7 @@
|
||||
menubar: false,
|
||||
height: 700,
|
||||
plugins: "image table textcolor paste link imagetools fullscreen",
|
||||
toolbar: "undo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image link | fontsizeselect fullscreen",
|
||||
toolbar: "undo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image link | fullscreen",
|
||||
content_style: "body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}",
|
||||
file_browser_callback: function(field_name, url, type, win) {
|
||||
ImageManager.show(function(image) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
<ul class="sidebar-page-list menu">
|
||||
<li class="book-header"><a href="{{$book->getUrl()}}" class="book"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li>
|
||||
<li class="book-header"><a href="{{$book->getUrl()}}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li>
|
||||
@foreach($book->children() as $bookChild)
|
||||
<li class="list-item-{{is_a($bookChild, 'Oxbow\Chapter') ? 'chapter' : 'page' }}">
|
||||
<a href="{{$bookChild->getUrl()}}" class="{{is_a($bookChild, 'Oxbow\Chapter') ? 'chapter' : 'page' }}">
|
||||
<a href="{{$bookChild->getUrl()}}" class="{{is_a($bookChild, 'Oxbow\Chapter') ? 'chapter' : 'page' }} {{ $current->matches($bookChild)? 'selected' : '' }}">
|
||||
@if(is_a($bookChild, 'Oxbow\Chapter'))
|
||||
<i class="zmdi zmdi-collection-bookmark chapter-toggle"></i>
|
||||
@else
|
||||
@ -14,10 +14,10 @@
|
||||
|
||||
@if(is_a($bookChild, 'Oxbow\Chapter') && count($bookChild->pages) > 0)
|
||||
<ul class="menu">
|
||||
@foreach($bookChild->pages as $page)
|
||||
@foreach($bookChild->pages as $childPage)
|
||||
<li class="list-item-page">
|
||||
<a href="{{$page->getUrl()}}" class="page">
|
||||
<i class="zmdi zmdi-file-text"></i> {{ $page->name }}
|
||||
<a href="{{$childPage->getUrl()}}" class="page {{ $current->matches($childPage)? 'selected' : '' }}">
|
||||
<i class="zmdi zmdi-file-text"></i> {{ $childPage->name }}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
|
Reference in New Issue
Block a user