Skip to content

Commit

Permalink
fix(images): remove default selection and fix height of preview
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksasiriski committed Mar 3, 2024
1 parent 88b9b32 commit 1c60097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/search/result/ResultImagePreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
id="link-{result.Rank}"
src={result.ImageResult.ThumbnailURL}
alt={result.Title}
class="w-full h-auto hover:ring-2 hover:ring-hearchco-primary object-cover transform transition duration-200 ease-in-out"
class="mx-auto h-[50vh] w-auto hover:ring-2 hover:ring-hearchco-primary object-cover transform transition duration-200 ease-in-out"
/>
</a>
<a href={result.ImageResult.SourceURL}>
Expand Down
4 changes: 3 additions & 1 deletion src/lib/components/search/result/Results.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
export let query;
export let results: ResultType[];
let imgResultPreview: ResultType | undefined = results[0];
let imgResultPreview: ResultType | undefined;
// variables
const category = categoryFrom(query);
Expand Down Expand Up @@ -63,6 +63,8 @@
{/if}

<style>
/* equivalent to tailwindcss lg:w-2/3 */
/* needed for class:<class>=<boolean> */
@media (min-width: 1024px) {
.tw-w-2-3 {
@apply w-2/3;
Expand Down

0 comments on commit 1c60097

Please sign in to comment.