From f7b4fe4691dfd5b50c5d055351d32cf081824a74 Mon Sep 17 00:00:00 2001 From: Ilia Timofeev Date: Mon, 3 Jul 2023 15:01:00 +0000 Subject: [PATCH] search restyle --- client/components/common/search-results.vue | 58 ++++++++++++--------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/client/components/common/search-results.vue b/client/components/common/search-results.vue index 3e4b25ba53..6ddc436b9f 100644 --- a/client/components/common/search-results.vue +++ b/client/components/common/search-results.vue @@ -15,7 +15,7 @@ img(src='/_assets/svg/icon-no-results.svg', alt='No Results') .subheading {{$t('common:header.searchNoResult')}} template(v-if='search && search.length >= 2 && results && results.length > 0') - v-subheader.white--text {{$t('common:header.searchResultsCount', { total: response.totalHits })}} + v-subheader {{$t('common:header.searchResultsCount', { total: response.totalHits })}} v-list.search-results-items.radius-7.py-0(two-line, dense) template(v-for='(item, idx) of results') v-list-item(@click='goToPage(item); search=``', @click.middle="goToPageInNewTab(item)", :key='item.id', :class='idx === cursor ? `highlighted` : ``') @@ -27,7 +27,6 @@ .caption.grey--text(v-text='item.path') v-list-item-action v-chip(label, outlined) {{item.locale.toUpperCase()}} - v-divider(v-if='idx < results.length - 1') v-pagination.mt-3( v-if='paginationLength > 1' dark @@ -149,10 +148,10 @@ export default { window.open(`/${item.locale}/${item.path}`, '_blank') }, handleSamePageResult(resultPath) { - const resultHash = getHash(resultPath); - const currentPageHash = getHash(String(window.location)); + const resultHash = getHash(resultPath) + const currentPageHash = getHash(String(window.location)) if (resultHash === currentPageHash) { - const element = document.getElementById(resultHash); + const element = document.getElementById(resultHash) element.classList.remove('highlighted-on-select') setTimeout(() => { element.classList.add('highlighted-on-select') @@ -188,14 +187,17 @@ export default {