feat: Simplify image conversion

This commit is contained in:
Bart van der Braak 2024-06-12 16:04:22 +02:00
parent c92a3697f0
commit 05c4e74420
8 changed files with 557 additions and 955 deletions

View file

@ -25,7 +25,7 @@
<div class="relative h-[500px]">
{#each images as img, i}
<enhanced:img
<img
src={img.src}
alt={img.alt}
class="absolute inset-0 h-full w-full rounded-xl object-cover opacity-0 transition-opacity duration-1000 ease-out {img.style} {index ===

View file

@ -3,7 +3,7 @@
import type { Tool } from '$lib/content/tools';
export let toolItem: Tool;
let { description, enhanced, logo, name, tagLine } = toolItem;
let { description, logo, name, tagLine } = toolItem;
</script>
<Card.Root class="mb-4 inline-block hover:bg-muted/50">
@ -13,18 +13,9 @@
{name}
</Card.Title>
<span class="text-sm font-medium">{tagLine}</span>
</div>
{#if enhanced}
<enhanced:img
src={logo}
alt="logo of {name}"
class="h-10 w-10 object-contain"
loading="lazy"
/>
{:else}
<img src={logo} alt="logo of {name}" class="h-10 w-10 object-contain" loading="lazy" />
{/if}
</Card.Header>
</div></Card.Header
>
<Card.Content class="text-sm text-muted-foreground">
{description}
</Card.Content>