enzostvs HF staff commited on
Commit
a764df6
·
1 Parent(s): f6be94e

card is bigger

Browse files
src/lib/components/community/Card.svelte CHANGED
@@ -1,19 +1,26 @@
1
  <script lang="ts">
2
  import type { CommunityCard } from "$lib/type";
 
 
3
  import Reactions from "./reactions/Reactions.svelte";
4
 
5
  export let card: CommunityCard;
6
  </script>
7
 
8
  <div
9
- 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]"
10
  >
11
  <div class="w-full h-full absolute top-0 left-0 -z-[1] rounded-xl overflow-hidden">
12
  <div class="w-full h-full bg-center bg-cover transition-all duration-200 group-hover:scale-110 " style="background-image: url('https://huggingface.co/datasets/enzostvs/loras-studio/resolve/main/{card.image}?expose=true');"></div>
13
  </div>
14
- <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 w-full">
15
- <p class="text-white font-semibold text-base">{card.prompt}</p>
16
- <p class="text-white/75 font-regular text-sm">{card.model.id}</p>
 
 
 
 
 
17
  </div>
18
  <div class="flex items-center justify-start gap-2">
19
  <Reactions reactions={card.reactions} gallery_id={card.id} />
 
1
  <script lang="ts">
2
  import type { CommunityCard } from "$lib/type";
3
+ import Button from "$lib/components/Button.svelte";
4
+
5
  import Reactions from "./reactions/Reactions.svelte";
6
 
7
  export let card: CommunityCard;
8
  </script>
9
 
10
  <div
11
+ class="cursor-pointer group bg-neutral-700 rounded-xl h-[400px] relative flex items-start justify-between flex-col p-5 transition-all duration-200 brightness-75 hover:brightness-100 z-[1] overflow-hidden"
12
  >
13
  <div class="w-full h-full absolute top-0 left-0 -z-[1] rounded-xl overflow-hidden">
14
  <div class="w-full h-full bg-center bg-cover transition-all duration-200 group-hover:scale-110 " style="background-image: url('https://huggingface.co/datasets/enzostvs/loras-studio/resolve/main/{card.image}?expose=true');"></div>
15
  </div>
16
+ <div class="group-hover:opacity-100 opacity-0 translate-y-full group-hover:translate-y-0 transition-all duration-200 flex flex-col gap-4 w-full">
17
+ <div class="bg-black/40 backdrop-blur-sm border border-white/30 rounded-lg px-6 py-3 text-white transition-all duration-200 w-full">
18
+ <p class="text-white font-semibold text-lg">{card.prompt}</p>
19
+ <p class="text-white/75 font-regular text-base">{card.model.id}</p>
20
+ </div>
21
+ <Button theme="light" size="md" href={`/generate?model=${card.model.id}`}>
22
+ Try it now
23
+ </Button>
24
  </div>
25
  <div class="flex items-center justify-start gap-2">
26
  <Reactions reactions={card.reactions} gallery_id={card.id} />
src/routes/gallery/+page.svelte CHANGED
@@ -70,7 +70,7 @@
70
  <div class="mt-5 max-w-sm">
71
  <Input value={form.search} placeholder="Search an image" onChange={handleChangeSearch} />
72
  </div>
73
- <div class="mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-5 gap-5 mt-8 lg:mt-10">
74
  {#each data.cards as card}
75
  <Card card={card} />
76
  {/each}
 
70
  <div class="mt-5 max-w-sm">
71
  <Input value={form.search} placeholder="Search an image" onChange={handleChangeSearch} />
72
  </div>
73
+ <div class="mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-4 gap-5 mt-8 lg:mt-10">
74
  {#each data.cards as card}
75
  <Card card={card} />
76
  {/each}