Skip to content

Commit 924e4da

Browse files
committed
feat(ui): improve text to image view
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 7f637f0 commit 924e4da

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

core/http/views/text2image.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="container mx-auto px-4 py-8 flex-grow" x-data="{ component: 'menu' }">
1111

1212
<!-- Hero Section -->
13-
<div class="bg-gradient-to-r from-blue-900/30 to-indigo-900/30 rounded-2xl shadow-xl p-8 mb-10">
13+
<div class="bg-gradient-to-r from-blue-900/30 to-indigo-900/30 rounded-2xl shadow-xl p-8 mb-6">
1414
<div class="max-w-4xl mx-auto text-center">
1515
<h1 class="text-4xl md:text-5xl font-bold text-white mb-4">
1616
<span class="bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-indigo-400">
@@ -35,15 +35,16 @@ <h1 class="text-4xl md:text-5xl font-bold text-white mb-4">
3535
</div>
3636
</div>
3737

38-
<!-- Model Selection and Controls -->
39-
<div class="bg-gray-800/90 border border-gray-700/50 rounded-xl p-6 mb-8 shadow-lg">
40-
<div class="flex flex-col md:flex-row items-center justify-between gap-4">
41-
<!-- Model Selector -->
42-
<div class="w-full md:w-auto">
43-
<label for="model-select" class="block text-sm font-medium text-gray-300 mb-2">Select a Model</label>
38+
<!-- Model Selection - Positioned between hero and generation form -->
39+
<div class="bg-gray-800/90 border border-gray-700/50 rounded-xl p-5 mb-6 shadow-lg">
40+
<div class="flex items-center">
41+
<div class="text-lg font-medium text-blue-400 mr-4">
42+
<i class="fas fa-palette mr-2"></i>Select Model:
43+
</div>
44+
<div class="flex-grow">
4445
<select x-data="{ link : '' }" x-model="link" x-init="$watch('link', value => window.location = link)"
4546
id="model-select"
46-
class="bg-gray-900 text-white border border-gray-700 focus:border-blue-500 focus:ring focus:ring-blue-500 focus:ring-opacity-50 rounded-lg shadow-sm p-2.5 pr-10 appearance-none w-full md:w-64 transition-colors duration-200"
47+
class="bg-gray-900 text-white border border-gray-700 focus:border-blue-500 focus:ring focus:ring-blue-500 focus:ring-opacity-50 rounded-lg shadow-sm p-2.5 pr-10 appearance-none w-full max-w-md transition-colors duration-200"
4748
>
4849
<option value="" disabled class="text-gray-400">Select a model</option>
4950
{{ $model:=.Model}}
@@ -59,7 +60,7 @@ <h1 class="text-4xl md:text-5xl font-bold text-white mb-4">
5960
<option value="text2image/{{.}}" {{ if eq . $model }} selected {{ end }} class="bg-gray-800 text-white">{{.}}</option>
6061
{{end}}
6162
</select>
62-
</div>
63+
</div>
6364
</div>
6465
</div>
6566

@@ -96,7 +97,7 @@ <h2 class="text-2xl font-bold text-white mb-6">Generate an Image</h2>
9697
<div class="mt-6 border-t border-gray-700/50 pt-6">
9798
<h3 class="text-xl font-semibold text-gray-200 mb-4">Generated Image</h3>
9899
<div class="container mx-auto flex justify-center">
99-
<div id="result" class="mx-auto bg-gray-900/50 border border-gray-700/50 rounded-xl p-4 min-h-[300px] flex items-center justify-center">
100+
<div id="result" class="mx-auto bg-gray-900/50 border border-gray-700/50 rounded-xl p-4 min-h-[300px] w-full flex items-center justify-center">
100101
<p class="text-gray-400 italic">Your generated image will appear here</p>
101102
</div>
102103
</div>

0 commit comments

Comments
 (0)