-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve flexibility of additional search queries in autocomplete (#407)
- Loading branch information
Showing
5 changed files
with
110 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
resources/views/layouts/partials/header/autocomplete/categories.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="flex gap-5 pb-5 my-2" v-if="resultsType == 'categories'"> | ||
<div class="font-bold"> | ||
@lang('Categories') | ||
</div> | ||
<ul class="flex flex-col gap-1"> | ||
<li v-for="hit in resultsData.hits" class="w-full"> | ||
<a :href="hit._source.url" class="w-full hover:text-primary flex gap-1"> | ||
<span class="ml-2" v-html="highlight(hit, 'name')"></span> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
resources/views/layouts/partials/header/autocomplete/products.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<ul class="gap-5 grid md:grid-cols-2"> | ||
<li | ||
v-for="suggestion in suggestions" | ||
:key="suggestion.source._id"> | ||
<a :href="suggestion.source.url | url" class="flex flex-wrap flex-1" key="suggestion.source._id"> | ||
<img :src="'/storage/{{ config('rapidez.store') }}/resizes/80x80/magento/catalog/product' + suggestion.source.thumbnail + '.webp'" class="self-center object-contain w-14 aspect-square" /> | ||
<div class="flex flex-1 flex-wrap px-2"> | ||
<strong class="hyphens block w-full" v-html="highlight(suggestion, 'name')"></strong> | ||
<div class="self-end">@{{ suggestion.source.price | price }}</div> | ||
</div> | ||
</a> | ||
</li> | ||
</ul> |