Dan Brown

Tightened and cleaned some list styles

...@@ -163,7 +163,7 @@ class SearchController extends Controller ...@@ -163,7 +163,7 @@ class SearchController extends Controller
163 $entities = $this->viewService->getPopular(20, 0, $entityNames); 163 $entities = $this->viewService->getPopular(20, 0, $entityNames);
164 } 164 }
165 165
166 - return view('partials/entity-list', ['entities' => $entities]); 166 + return view('search/entity-ajax-list', ['entities' => $entities]);
167 } 167 }
168 168
169 } 169 }
......
...@@ -118,10 +118,5 @@ $(function () { ...@@ -118,10 +118,5 @@ $(function () {
118 118
119 }); 119 });
120 120
121 -
122 -function elemExists(selector) {
123 - return document.querySelector(selector) !== null;
124 -}
125 -
126 // Page specific items 121 // Page specific items
127 require('./pages/page-show'); 122 require('./pages/page-show');
......
1 .page-list { 1 .page-list {
2 h3 { 2 h3 {
3 - margin: $-l 0 $-m 0; 3 + margin: $-l 0 $-xs 0;
4 + font-size: 1.666em;
4 } 5 }
5 a.chapter { 6 a.chapter {
6 color: $color-chapter; 7 color: $color-chapter;
...@@ -8,7 +9,6 @@ ...@@ -8,7 +9,6 @@
8 .inset-list { 9 .inset-list {
9 display: none; 10 display: none;
10 overflow: hidden; 11 overflow: hidden;
11 - // padding-left: $-m;
12 margin-bottom: $-l; 12 margin-bottom: $-l;
13 } 13 }
14 h4 { 14 h4 {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
48 max-width: 100%; 48 max-width: 100%;
49 height:auto; 49 height:auto;
50 } 50 }
51 - h1, h2, h3, h4, h5, h6 { 51 + h1, h2, h3, h4, h5, h6, pre {
52 clear: left; 52 clear: left;
53 } 53 }
54 hr { 54 hr {
......
...@@ -225,6 +225,15 @@ p.secondary, p .secondary, span.secondary, .text-secondary { ...@@ -225,6 +225,15 @@ p.secondary, p .secondary, span.secondary, .text-secondary {
225 color: $color-chapter; 225 color: $color-chapter;
226 } 226 }
227 } 227 }
228 +.faded .text-book:hover {
229 + color: $color-book !important;
230 +}
231 +.faded .text-chapter:hover {
232 + color: $color-chapter !important;
233 +}
234 +.faded .text-page:hover {
235 + color: $color-page !important;
236 +}
228 237
229 span.highlight { 238 span.highlight {
230 //background-color: rgba($primary, 0.2); 239 //background-color: rgba($primary, 0.2);
......
...@@ -246,7 +246,7 @@ $btt-size: 40px; ...@@ -246,7 +246,7 @@ $btt-size: 40px;
246 } 246 }
247 247
248 .entity-list-item.selected { 248 .entity-list-item.selected {
249 - h3, i, p ,a { 249 + h3, i, p ,a, span {
250 color: #EEE; 250 color: #EEE;
251 } 251 }
252 } 252 }
......
1 <div class="chapter entity-list-item" data-entity-type="chapter" data-entity-id="{{$chapter->id}}"> 1 <div class="chapter entity-list-item" data-entity-type="chapter" data-entity-id="{{$chapter->id}}">
2 <h3> 2 <h3>
3 + @if (isset($showPath) && $showPath)
4 + <a href="{{ $chapter->book->getUrl() }}" class="text-book">
5 + <i class="zmdi zmdi-book"></i>{{ $chapter->book->name }}
6 + </a>
7 + <span class="text-muted">&nbsp;&nbsp;&raquo;&nbsp;&nbsp;</span>
8 + @endif
3 <a href="{{ $chapter->getUrl() }}" class="text-chapter"> 9 <a href="{{ $chapter->getUrl() }}" class="text-chapter">
4 <i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->name }} 10 <i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->name }}
5 </a> 11 </a>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <div class="breadcrumbs"> 9 <div class="breadcrumbs">
10 <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> 10 <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
11 <span class="sep">&raquo;</span> 11 <span class="sep">&raquo;</span>
12 - <a href="{{$chapter->getUrl()}}" class="text-page text-button"><i class="zmdi zmdi-file-text"></i>{{ $chapter->getShortName() }}</a> 12 + <a href="{{$chapter->getUrl()}}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->getShortName() }}</a>
13 </div> 13 </div>
14 </div> 14 </div>
15 </div> 15 </div>
......
1 +<div class="entity-list @if(isset($style)){{ $style }}@endif" ng-non-bindable>
2 + @if(count($entities) > 0)
3 + @foreach($entities as $index => $entity)
4 + @if($entity->isA('page'))
5 + @include('pages/list-item', ['page' => $entity])
6 + @elseif($entity->isA('book'))
7 + @include('books/list-item', ['book' => $entity])
8 + @elseif($entity->isA('chapter'))
9 + @include('chapters/list-item', ['chapter' => $entity, 'hidePages' => true, 'showPath' => true])
10 + @endif
11 +
12 + @if($index !== count($entities) - 1)
13 + <hr>
14 + @endif
15 +
16 + @endforeach
17 + @else
18 + <p class="text-muted">
19 + No items available
20 + </p>
21 + @endif
22 +</div>
...\ No newline at end of file ...\ No newline at end of file