lora-studio / src /routes /+page.svelte
enzostvs's picture
enzostvs HF staff
wip API get
97ec6f2
raw
history blame
1.38 kB
<script lang="ts">
import Button from "$lib/components/Button.svelte";
import Card from "$lib/components/community/Card.svelte";
import Input from "$lib/components/fields/Input.svelte";
import Radio from "$lib/components/fields/Radio.svelte";
export let data;
let form = {
filter: "likes"
}
const filter_options = [
{
label: "Most Liked",
value: "likes",
icon: "lucide:heart",
iconColor: "text-red-500"
},
{
label: "New",
value: "new",
icon: "lucide:zap",
iconColor: "text-yellow-500"
},
];
</script>
<svelte:head>
<title>Community Gallery</title>
<meta name="description" content="Svelte demo app" />
</svelte:head>
<h1 class="text-white font-semibold text-2xl">
Community Gallery
</h1>
<div class="flex items-center justify-between mt-5">
<Radio options={filter_options} value="{form.filter}" onChange={(filter) => form = {...form, filter }} />
<div class="flex items-center justify-end gap-5">
<Button icon="ic:round-plus" theme="dark" size="lg">Upload own Image</Button>
<Button icon="fluent:glance-horizontal-sparkles-16-filled" href="/generate" theme="pink" size="lg">Generate</Button>
</div>
</div>
<div class="mt-5 max-w-sm">
<Input placeholder="Filter by prompt, model..." />
</div>
<div class="mx-auto grid grid-cols-5 gap-5 mt-8 lg:mt-10">
{#each data.cards as card}
<Card card={card} />
{/each}
</div>