enzostvs's picture
enzostvs HF staff
wip API get
97ec6f2
raw
history blame
No virus
1.22 kB
<script lang="ts">
import Reaction from "$lib/components/community/reactions/Reaction.svelte";
import Add from "$lib/components/community/reactions/Add.svelte";
import type { CommunityCard } from "$lib/type";
export let card: CommunityCard;
</script>
<div
class="cursor-pointer group bg-neutral-700 rounded-xl h-[310px] relative flex items-start justify-between flex-col p-5 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
>
<div class="w-full h-full absolute top-0 left-0 -z-[1] rounded-xl overflow-hidden">
<div class="w-full h-full bg-center bg-cover transition-all duration-200 group-hover:scale-110 " style="background-image: url('{card.image}');"></div>
</div>
<div class="bg-black/40 backdrop-blur-sm border border-white/30 rounded-lg px-6 py-3 text-white transition-all duration-200 opacity-0 group-hover:opacity-100">
<p class="text-white font-semibold text-base">{card.prompt}</p>
<p class="text-white/75 font-regular text-sm">{card.model_name}</p>
</div>
<div class="flex items-center justify-start gap-2">
{#each card.reactions as reaction}
<Reaction emoji={reaction.emoji} count={reaction?.users?.length} />
{/each}
<Add />
</div>
</div>