diff --git a/components/haditha/search-page/SearchList.vue b/components/haditha/search-page/SearchList.vue index 348a3dc..7866e1c 100644 --- a/components/haditha/search-page/SearchList.vue +++ b/components/haditha/search-page/SearchList.vue @@ -16,6 +16,9 @@ const props = defineProps({ noDataIcon: { default: "/img/haditha/no-data.png", }, + searchTerm: { + default: "", + }, }); const router = useRouter(); const route = useRoute(); @@ -23,7 +26,7 @@ const route = useRoute(); // const modal = useModal(); // const isModalOpen = ref(false); -function openModal(selectedItem) { +function goToSearchShowPage(selectedItem) { // modal.open(SearchShow, { title: "Welcome" }); // isModalOpen.value = true; @@ -39,8 +42,7 @@ function openModal(selectedItem) { slug: slug, }, query: { - firstPage: 1, - page_count: props.total, + q: props.searchTerm, }, }); } @@ -87,7 +89,7 @@ const removeFromFavorites = async (item = {}, index = 0) => { item?._source?.meta?.hadith_masoum ?? item?._source?.meta?.hadith_sanad }`" - @click.prevent="openModal(item)" + @click.prevent="goToSearchShowPage(item)" class="from-person block" > {{ @@ -106,14 +108,14 @@ const removeFromFavorites = async (item = {}, index = 0) => { {{ item?._source?.content_ar }} @@ -231,4 +250,35 @@ const SearchList = defineAsyncComponent(() => padding-bottom: 0 !important; } } + +.search-list-contianer { + max-width: 41em; /*656px*/ + width: 100%; + margin: 0 1em; + + .total { + padding: 0.5em 1.8em; + + font-family: IRANSansX; + font-weight: 400; + font-size: 0.68rem; /*11px*/ + line-height: 1rem; + letter-spacing: 0%; + text-align: right; + color: #b4c2cf; + } + .search-list { + padding: 1em 1.3em; + height: calc(100dvh - 16em); + overflow-y: auto; + + &.hadithaFavorites { + height: calc(100dvh - 8em); + } + + &:not(:last-child) { + border-bottom: 0.3px solid #d9d9d9; + } + } +} diff --git a/pages/haditha/search/[id]/[slug]/index.vue b/pages/haditha/search/[id]/[slug]/index.vue index 0f9eec9..34d1aa8 100644 --- a/pages/haditha/search/[id]/[slug]/index.vue +++ b/pages/haditha/search/[id]/[slug]/index.vue @@ -86,6 +86,9 @@ fetchData(); const goToTheSearch = (type: string) => { router.push({ name: "hadithaSearch", + query: { + q: route.query.q ?? "", + }, }); }; const goToTheChatbot = () => { diff --git a/pages/haditha/search/index.vue b/pages/haditha/search/index.vue index 91755f0..1e30028 100644 --- a/pages/haditha/search/index.vue +++ b/pages/haditha/search/index.vue @@ -769,6 +769,7 @@ const SearchList = defineAsyncComponent( no-data-icon="/img/haditha/no-data.png" :total="total" :list="loadedItems" + :searchTerm="searchTerm" >