$entities = $this->viewService->getPopular(20, 0, $entityNames);
}
- return view('partials/entity-list', ['entities' => $entities]);
+ return view('search/entity-ajax-list', ['entities' => $entities]);
}
}
});
-
-function elemExists(selector) {
- return document.querySelector(selector) !== null;
-}
-
// Page specific items
require('./pages/page-show');
.page-list {
h3 {
- margin: $-l 0 $-m 0;
+ margin: $-l 0 $-xs 0;
+ font-size: 1.666em;
}
a.chapter {
color: $color-chapter;
.inset-list {
display: none;
overflow: hidden;
- // padding-left: $-m;
margin-bottom: $-l;
}
h4 {
max-width: 100%;
height:auto;
}
- h1, h2, h3, h4, h5, h6 {
+ h1, h2, h3, h4, h5, h6, pre {
clear: left;
}
hr {
color: $color-chapter;
}
}
+.faded .text-book:hover {
+ color: $color-book !important;
+}
+.faded .text-chapter:hover {
+ color: $color-chapter !important;
+}
+.faded .text-page:hover {
+ color: $color-page !important;
+}
span.highlight {
//background-color: rgba($primary, 0.2);
}
.entity-list-item.selected {
- h3, i, p ,a {
+ h3, i, p ,a, span {
color: #EEE;
}
}
<div class="chapter entity-list-item" data-entity-type="chapter" data-entity-id="{{$chapter->id}}">
<h3>
+ @if (isset($showPath) && $showPath)
+ <a href="{{ $chapter->book->getUrl() }}" class="text-book">
+ <i class="zmdi zmdi-book"></i>{{ $chapter->book->name }}
+ </a>
+ <span class="text-muted"> » </span>
+ @endif
<a href="{{ $chapter->getUrl() }}" class="text-chapter">
<i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->name }}
</a>
<div class="breadcrumbs">
<a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
<span class="sep">»</span>
- <a href="{{$chapter->getUrl()}}" class="text-page text-button"><i class="zmdi zmdi-file-text"></i>{{ $chapter->getShortName() }}</a>
+ <a href="{{$chapter->getUrl()}}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{ $chapter->getShortName() }}</a>
</div>
</div>
</div>
--- /dev/null
+<div class="entity-list @if(isset($style)){{ $style }}@endif" ng-non-bindable>
+ @if(count($entities) > 0)
+ @foreach($entities as $index => $entity)
+ @if($entity->isA('page'))
+ @include('pages/list-item', ['page' => $entity])
+ @elseif($entity->isA('book'))
+ @include('books/list-item', ['book' => $entity])
+ @elseif($entity->isA('chapter'))
+ @include('chapters/list-item', ['chapter' => $entity, 'hidePages' => true, 'showPath' => true])
+ @endif
+
+ @if($index !== count($entities) - 1)
+ <hr>
+ @endif
+
+ @endforeach
+ @else
+ <p class="text-muted">
+ No items available
+ </p>
+ @endif
+</div>
\ No newline at end of file