Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
refactor: always having square cards
Browse files
src/lib/components/community/Card.svelte
CHANGED
@@ -46,7 +46,7 @@
|
|
46 |
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
47 |
{#if is_visible}
|
48 |
<div
|
49 |
-
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-90 hover:brightness-100 z-[1] overflow-hidden"
|
50 |
on:click={handleClick}
|
51 |
>
|
52 |
<div class="w-full h-full absolute top-0 left-0 -z-[1] rounded-xl overflow-hidden" class:!brightness-50={loading}>
|
|
|
46 |
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
47 |
{#if is_visible}
|
48 |
<div
|
49 |
+
class="cursor-pointer group bg-neutral-700 rounded-xl h-[400px] max-w-[400px] md:h-[350px] md:max-w-[350px] w-full relative flex items-start justify-between flex-col p-5 transition-all duration-200 brightness-90 hover:brightness-100 z-[1] overflow-hidden"
|
50 |
on:click={handleClick}
|
51 |
>
|
52 |
<div class="w-full h-full absolute top-0 left-0 -z-[1] rounded-xl overflow-hidden" class:!brightness-50={loading}>
|
src/routes/gallery/+page.svelte
CHANGED
@@ -86,7 +86,7 @@
|
|
86 |
<Input value={form.search} placeholder="Search an image" onChange={handleChangeSearch} />
|
87 |
</div>
|
88 |
<!-- mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5 gap-5 mt-8 lg:mt-10 -->
|
89 |
-
<div class="mx-auto
|
90 |
{#each data.cards as card}
|
91 |
<Card card={card} form={form} displayDelete={user?.is_admin} />
|
92 |
{/each}
|
|
|
86 |
<Input value={form.search} placeholder="Search an image" onChange={handleChangeSearch} />
|
87 |
</div>
|
88 |
<!-- mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5 gap-5 mt-8 lg:mt-10 -->
|
89 |
+
<div class="mx-auto flex flex-wrap gap-5 mt-8 lg:mt-10 justify-center md:justify-start">
|
90 |
{#each data.cards as card}
|
91 |
<Card card={card} form={form} displayDelete={user?.is_admin} />
|
92 |
{/each}
|