Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
  • Loading branch information
alankrantas committed May 5, 2023
1 parent 8d2990b commit 892c923
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/components/utils/Showcase.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@
{#each [...Array(displayNum).keys()] as colIdx (colIdx + listStartWorkId)}
<div class="col position-relative" animate:flip={{ duration: 500, easing: expoOut }}>
{#if colIdx + listStartWorkId < works.length}
{#if !works[colIdx + listStartWorkId].loaded}
<p class="placeholder-glow">
<span class="placeholder w-75" />
<span class="placeholder w-75" />
<span class="placeholder w-75" />
<span class="placeholder w-75" />
<span class="placeholder w-75" />
</p>
{/if}
<a href={'#'} on:click={() => popShowcaseDetail(works[colIdx + listStartWorkId])}>
{#if !works[colIdx + listStartWorkId].loaded}
<p class="placeholder-glow">
<span class="placeholder w-75" />
<span class="placeholder w-75" />
<span class="placeholder w-75" />
</p>
{/if}
<img
loading="lazy"
class="img-thumbnail bg-light border-light rounded-4"
style={`width: 100%; object-fit: contain; visibility: ${
works[colIdx + listStartWorkId].loaded ? `visible` : `hidden`
works[colIdx + listStartWorkId].loaded ? 'visible' : 'hidden'
};`}
src={works[colIdx + listStartWorkId].imgUrl}
alt={works[colIdx + listStartWorkId].name}
Expand Down

0 comments on commit 892c923

Please sign in to comment.