Added book and chapter icons to pages in global search results. Closes #19.
This commit is contained in:
parent
7039695b65
commit
965851d112
|
@ -32,6 +32,13 @@
|
||||||
.book {
|
.book {
|
||||||
border-left: 5px solid $color-book;
|
border-left: 5px solid $color-book;
|
||||||
}
|
}
|
||||||
|
.meta {
|
||||||
|
margin-top: -$-m;
|
||||||
|
font-size: 0.95em;
|
||||||
|
}
|
||||||
|
.meta span {
|
||||||
|
margin-right: $-s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.chapter-toggle {
|
.chapter-toggle {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -2,6 +2,16 @@
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{ $page->getUrl() }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ $page->name }}</a>
|
<a href="{{ $page->getUrl() }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ $page->name }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
@if(isset($showMeta) && $showMeta)
|
||||||
|
<div class="meta">
|
||||||
|
<span class="text-book"><i class="zmdi zmdi-book"></i> {{ $page->book->name }}</span>
|
||||||
|
@if($page->chapter)
|
||||||
|
<span class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i> {{ $page->chapter->name }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if(isset($page->searchSnippet))
|
@if(isset($page->searchSnippet))
|
||||||
<p class="text-muted">{!! $page->searchSnippet !!}</p>
|
<p class="text-muted">{!! $page->searchSnippet !!}</p>
|
||||||
@else
|
@else
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="page-list">
|
<div class="page-list">
|
||||||
@if(count($pages) > 0)
|
@if(count($pages) > 0)
|
||||||
@foreach($pages as $page)
|
@foreach($pages as $page)
|
||||||
@include('pages/list-item', ['page' => $page])
|
@include('pages/list-item', ['page' => $page, 'showMeta' => true])
|
||||||
<hr>
|
<hr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
|
|
Loading…
Reference in New Issue