Spaces:
Running
Running
responsive stuffs
Browse files
src/lib/components/image-generation/Response.svelte
CHANGED
|
@@ -27,7 +27,7 @@
|
|
| 27 |
];
|
| 28 |
</script>
|
| 29 |
|
| 30 |
-
<div class="h-screen flex flex-col relative">
|
| 31 |
<div class="bg-slate-950 overflow-auto flex-1">
|
| 32 |
<div class="w-full uppercase text-zinc-400 text-sm font-semibold border-t border-slate-900 flex items-start sticky top-0 bg-slate-950">
|
| 33 |
{#each TABS as { label, icon }, idx }
|
|
|
|
| 27 |
];
|
| 28 |
</script>
|
| 29 |
|
| 30 |
+
<div class="lg:h-screen flex flex-col relative">
|
| 31 |
<div class="bg-slate-950 overflow-auto flex-1">
|
| 32 |
<div class="w-full uppercase text-zinc-400 text-sm font-semibold border-t border-slate-900 flex items-start sticky top-0 bg-slate-950">
|
| 33 |
{#each TABS as { label, icon }, idx }
|
src/lib/components/text-generation/Response.svelte
CHANGED
|
@@ -30,7 +30,7 @@
|
|
| 30 |
];
|
| 31 |
</script>
|
| 32 |
|
| 33 |
-
<div class="h-screen flex flex-col relative">
|
| 34 |
<div class="w-full jsonResponse relative">
|
| 35 |
<div class="bg-slate-950 w-full uppercase px-5 py-4 text-zinc-400 text-sm font-semibold border-b border-slate-900 flex items-center justify-start gap-2">
|
| 36 |
<Icon icon="carbon:json" class="w-5 h-5" />
|
|
|
|
| 30 |
];
|
| 31 |
</script>
|
| 32 |
|
| 33 |
+
<div class="lg:h-screen flex flex-col relative">
|
| 34 |
<div class="w-full jsonResponse relative">
|
| 35 |
<div class="bg-slate-950 w-full uppercase px-5 py-4 text-zinc-400 text-sm font-semibold border-b border-slate-900 flex items-center justify-start gap-2">
|
| 36 |
<Icon icon="carbon:json" class="w-5 h-5" />
|
src/routes/+layout.svelte
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
import '$lib/styles/tailwind.css';
|
| 4 |
</script>
|
| 5 |
|
| 6 |
-
<div class="app flex items-start justify-start">
|
| 7 |
<Sidebar />
|
| 8 |
|
| 9 |
<slot />
|
|
|
|
| 3 |
import '$lib/styles/tailwind.css';
|
| 4 |
</script>
|
| 5 |
|
| 6 |
+
<div class="app flex items-start justify-start overflow-auto h-screen lg:h-auto lg:overflow-hidden">
|
| 7 |
<Sidebar />
|
| 8 |
|
| 9 |
<slot />
|
src/routes/image-generation/+page.svelte
CHANGED
|
@@ -44,7 +44,7 @@
|
|
| 44 |
</script>
|
| 45 |
|
| 46 |
<main class="min-h-screen w-full grid grid-cols-2">
|
| 47 |
-
<div class="p-10 w-full flex flex-col gap-6">
|
| 48 |
<Form form={form} onForm={onchange} />
|
| 49 |
<div>
|
| 50 |
<button
|
|
@@ -56,8 +56,7 @@
|
|
| 56 |
</button>
|
| 57 |
</div>
|
| 58 |
</div>
|
| 59 |
-
<div class="border-l border-slate-900 bg-slate-950">
|
| 60 |
<Response loading={loading} res={data} body={bodyRequest} form={form} endpoint={form.model} />
|
| 61 |
-
response
|
| 62 |
</div>
|
| 63 |
</main>
|
|
|
|
| 44 |
</script>
|
| 45 |
|
| 46 |
<main class="min-h-screen w-full grid grid-cols-2">
|
| 47 |
+
<div class="p-6 lg:p-10 w-full flex flex-col gap-6 lg:overflow-auto lg:h-screen">
|
| 48 |
<Form form={form} onForm={onchange} />
|
| 49 |
<div>
|
| 50 |
<button
|
|
|
|
| 56 |
</button>
|
| 57 |
</div>
|
| 58 |
</div>
|
| 59 |
+
<div class="border-t lg:border-t-0 lg:border-l border-slate-900 bg-slate-950">
|
| 60 |
<Response loading={loading} res={data} body={bodyRequest} form={form} endpoint={form.model} />
|
|
|
|
| 61 |
</div>
|
| 62 |
</main>
|
src/routes/text-generation/+page.svelte
CHANGED
|
@@ -37,12 +37,12 @@
|
|
| 37 |
}
|
| 38 |
</script>
|
| 39 |
|
| 40 |
-
<main class="min-h-screen w-full grid grid-cols-2">
|
| 41 |
-
<div class="p-10 w-full flex flex-col gap-6">
|
| 42 |
<Form form={form} onForm={onchange} />
|
| 43 |
-
<div>
|
| 44 |
<button
|
| 45 |
-
class="bg-gradient-to-r from-slate-900/50 to-slate-900 border border-slate-800/40 text-white rounded-lg text-base transition-all duration-200 leading-relaxed outline-none relative py-3 px-6"
|
| 46 |
disabled={loading}
|
| 47 |
on:click={onsubmit}
|
| 48 |
>
|
|
@@ -50,8 +50,7 @@
|
|
| 50 |
</button>
|
| 51 |
</div>
|
| 52 |
</div>
|
| 53 |
-
<div class="border-l border-slate-900 bg-slate-950">
|
| 54 |
<Response loading={loading} res={data} body={bodyRequest} form={form} endpoint={form.model} />
|
| 55 |
-
response
|
| 56 |
</div>
|
| 57 |
</main>
|
|
|
|
| 37 |
}
|
| 38 |
</script>
|
| 39 |
|
| 40 |
+
<main class="min-h-screen w-full grid grid-cols-1 lg:grid-cols-2">
|
| 41 |
+
<div class="p-6 lg:p-10 w-full flex flex-col gap-6 lg:overflow-auto lg:h-screen">
|
| 42 |
<Form form={form} onForm={onchange} />
|
| 43 |
+
<div class="flex justify-end">
|
| 44 |
<button
|
| 45 |
+
class="w-full bg-gradient-to-r from-slate-900/50 to-slate-900 border border-slate-800/40 text-white rounded-lg text-base transition-all duration-200 leading-relaxed outline-none relative py-3 px-6"
|
| 46 |
disabled={loading}
|
| 47 |
on:click={onsubmit}
|
| 48 |
>
|
|
|
|
| 50 |
</button>
|
| 51 |
</div>
|
| 52 |
</div>
|
| 53 |
+
<div class="border-t lg:border-t-0 lg:border-l border-slate-900 bg-slate-950">
|
| 54 |
<Response loading={loading} res={data} body={bodyRequest} form={form} endpoint={form.model} />
|
|
|
|
| 55 |
</div>
|
| 56 |
</main>
|