NOW MANAGED ON CODEBERG
Updated and aligned entity dashboard elements
Dan Brownd66fab8bee70
diff --git a/resources/assets/sass/_forms.scss b/resources/assets/sass/_forms.scssindex b35caae55..9e4ef702d 100644--- a/resources/assets/sass/_forms.scss+++ b/resources/assets/sass/_forms.scss@@ -325,6 +325,10 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] {&.flexible input {width: 100%;}+ .search-box-cancel {+ left: auto;+ right: 0;+ }}.outline > input {diff --git a/resources/assets/sass/styles.scss b/resources/assets/sass/styles.scssindex bdc57d8fc..424074a0d 100644--- a/resources/assets/sass/styles.scss+++ b/resources/assets/sass/styles.scss@@ -96,17 +96,6 @@ $loadingSize: 10px;}}--// Search results-.search-results > h3 a {- font-size: 0.66em;- color: $primary;- padding-left: $-m;- i {- padding-right: $-s;- }-}-// Back to top link$btt-size: 40px;[back-to-top] {diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.phpindex fbf928102..b33cb6715 100644--- a/resources/views/books/show.blade.php+++ b/resources/views/books/show.blade.php@@ -45,14 +45,7 @@@endif</div>- <div class="search-results" v-cloak v-show="searching">- {{--TODO--}}- <h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small">@icon('close'){{ trans('entities.search_clear') }}</a></h3>- <div v-if="!searchResults">- @include('partials.loading-icon')- </div>- <div v-html="searchResults"></div>- </div>+ @include('partials.entity-dashboard-search-results')</div>@stop@@ -133,20 +126,14 @@@section('left')+ @include('partials.entity-dashboard-search-box')+@if($book->tags->count() > 0)<div class="mb-xl">@include('components.tag-list', ['entity' => $book])</div>@endif- <div class="mb-xl">- <form v-on:submit.prevent="searchBook" class="search-box flexible">- <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">- <button type="submit">@icon('search')</button>- <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button">@icon('close')</button>- </form>- </div>-@if(count($activity) > 0)<div class="mb-xl"><h5>{{ trans('entities.recent_activity') }}</h5>diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.phpindex 399a4d662..878a935df 100644--- a/resources/views/chapters/show.blade.php+++ b/resources/views/chapters/show.blade.php@@ -44,14 +44,7 @@@endif</div>- <div class="search-results" v-cloak v-show="searching">- {{--TODO--}}- <h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" @click="clearSearch()" class="text-small">@icon('close'){{ trans('entities.search_clear') }}</a></h3>- <div v-if="!searchResults">- @include('partials.loading-icon')- </div>- <div v-html="searchResults"></div>- </div>+ @include('partials.entity-dashboard-search-results')</div>@stop@@ -137,20 +130,14 @@@section('left')+ @include('partials.entity-dashboard-search-box')+@if($chapter->tags->count() > 0)<div class="mb-xl">@include('components.tag-list', ['entity' => $chapter])</div>@endif- <div class="mb-xl">- <form @submit.prevent="searchBook" class="search-box flexible">- <input v-model="searchTerm" @change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">- <button type="submit">@icon('search')</button>- <button v-if="searching" v-cloak class="text-neg" @click="clearSearch()" type="button">@icon('close')</button>- </form>- </div>-@include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])@stopdiff --git a/resources/views/partials/entity-dashboard-search-box.blade.php b/resources/views/partials/entity-dashboard-search-box.blade.phpnew file mode 100644index 000000000..99d37c5f8--- /dev/null+++ b/resources/views/partials/entity-dashboard-search-box.blade.php@@ -0,0 +1,7 @@+<div class="mb-xl">+ <form v-on:submit.prevent="searchBook" class="search-box flexible">+ <input v-model="searchTerm" v-on:change="checkSearchForm" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">+ <button type="submit">@icon('search')</button>+ <button v-if="searching" v-cloak class="search-box-cancel text-neg" v-on:click="clearSearch" type="button">@icon('close')</button>+ </form>+</div>\ No newline at end of filediff --git a/resources/views/partials/entity-dashboard-search-results.blade.php b/resources/views/partials/entity-dashboard-search-results.blade.phpnew file mode 100644index 000000000..68c6f53ad--- /dev/null+++ b/resources/views/partials/entity-dashboard-search-results.blade.php@@ -0,0 +1,15 @@+<div class="search-results" v-cloak v-show="searching">+ <div class="grid half v-center">+ <h3 class="text-muted px-none">+ {{ trans('entities.search_results') }}+ </h3>+ <div class="text-right">+ <a v-if="searching" v-on:click="clearSearch" class="button outline">{{ trans('entities.search_clear') }}</a>+ </div>+ </div>++ <div v-if="!searchResults">+ @include('partials.loading-icon')+ </div>+ <div class="book-contents" v-html="searchResults"></div>+</div>\ No newline at end of file