Spaces:
Runtime error
Runtime error
whole card clickable
Browse files
src/lib/components/models/Card.svelte
CHANGED
|
@@ -5,13 +5,14 @@
|
|
| 5 |
|
| 6 |
export let card: ModelCard;
|
| 7 |
</script>
|
| 8 |
-
<
|
|
|
|
| 9 |
class="w-full cursor-pointer group bg-neutral-900 rounded-xl relative flex items-start justify-between flex-col p-3 border border-neutral-800 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
|
| 10 |
>
|
| 11 |
<div class="w-full h-[350px] relative z-[1] mb-3 overflow-hidden">
|
| 12 |
<img src="{card.image}" class="w-full h-full bg-center bg-cover rounded-lg object-cover object-center bg-neutral-800" alt="{card?.title}" />
|
| 13 |
<div class="group-hover:opacity-100 opacity-0 translate-x-full group-hover:translate-x-0 transition-all duration-200 absolute right-3 bottom-3">
|
| 14 |
-
<Button theme="light" size="md"
|
| 15 |
Try it now
|
| 16 |
</Button>
|
| 17 |
</div>
|
|
@@ -29,4 +30,4 @@
|
|
| 29 |
</div>
|
| 30 |
</div>
|
| 31 |
</div>
|
| 32 |
-
</
|
|
|
|
| 5 |
|
| 6 |
export let card: ModelCard;
|
| 7 |
</script>
|
| 8 |
+
<a
|
| 9 |
+
href={`/generate?model=${card.id}`}
|
| 10 |
class="w-full cursor-pointer group bg-neutral-900 rounded-xl relative flex items-start justify-between flex-col p-3 border border-neutral-800 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
|
| 11 |
>
|
| 12 |
<div class="w-full h-[350px] relative z-[1] mb-3 overflow-hidden">
|
| 13 |
<img src="{card.image}" class="w-full h-full bg-center bg-cover rounded-lg object-cover object-center bg-neutral-800" alt="{card?.title}" />
|
| 14 |
<div class="group-hover:opacity-100 opacity-0 translate-x-full group-hover:translate-x-0 transition-all duration-200 absolute right-3 bottom-3">
|
| 15 |
+
<Button theme="light" size="md">
|
| 16 |
Try it now
|
| 17 |
</Button>
|
| 18 |
</div>
|
|
|
|
| 30 |
</div>
|
| 31 |
</div>
|
| 32 |
</div>
|
| 33 |
+
</a>
|