-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c1c6e8
commit 88b9b32
Showing
4 changed files
with
72 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<div class="animate-pulse"> | ||
<div class="h-full w-full overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-700"> | ||
<div class="h-48 w-64 object-cover"></div> | ||
<!-- Image loading skeleton --> | ||
</div> | ||
</div> |
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
31 changes: 31 additions & 0 deletions
31
src/lib/components/search/result/ResultImagePreview.svelte
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,31 @@ | ||
<script lang="ts"> | ||
// types | ||
import type { ResultType } from '$lib/types/result'; | ||
// parameters | ||
export let result: ResultType; | ||
</script> | ||
|
||
<div id="image-preview-{result.Rank}" class="px-4 pt-4 pb-10 w-full lg:sticky lg:top-0"> | ||
<a href={result.URL}> | ||
<img | ||
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" | ||
/> | ||
</a> | ||
<a href={result.ImageResult.SourceURL}> | ||
<h1 id="title-{result.Rank}" class="pt-5 text-hearchco-primary text-xl hover:underline"> | ||
{result.Title} | ||
</h1> | ||
</a> | ||
<p id="description-{result.Rank}" class="text-justify text-sm text-gray-600 dark:text-gray-200"> | ||
{result.Description} | ||
</p> | ||
<div id="engines-{result.Rank}" class="pt-2 text-right text-xs text-gray-800 dark:text-gray-400"> | ||
{#each result.EngineRanks as engineRank (engineRank.SearchEngine)} | ||
<span class="mx-0.5">{engineRank.SearchEngine}</span> | ||
{/each} | ||
</div> | ||
</div> |
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