MateusFF commited on
Commit
9a4dd6d
·
verified ·
1 Parent(s): 218f305

<v-row align="center">

Browse files

<v-col cols="10">
<v-select
v-model="image1.selectedModel"
:items="getImage1ModelsKeys"
label="Modelo"
density="compact"
hide-details
variant="outlined"
class="mb-2"
>
</v-select>
</v-col>
<v-col class="ma-0 pa-0" align-self='center' cols="2">
<v-btn color="primary" density='compact' icon='mdi-information-outline' size='medium'
@click="console.log('wee')" :disabled="!image1.selectedModel">
</v-btn>
</v-col>
</v-row>

I need a button with a mdi info icon, that shows a modal/dialog with a description of the selected model. The button must be inside the select box, side by side the text showing the model name

Files changed (4) hide show
  1. README.md +8 -5
  2. index.html +230 -19
  3. script.js +235 -0
  4. style.css +138 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Model Intellect Hub
3
- emoji: 🐢
4
- colorFrom: pink
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Model Intellect Hub 🔮
3
+ colorFrom: blue
4
+ colorTo: yellow
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
index.html CHANGED
@@ -1,19 +1,230 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Model Intellect Hub</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script>
12
+ tailwind.config = {
13
+ darkMode: 'class',
14
+ theme: {
15
+ extend: {
16
+ colors: {
17
+ primary: {
18
+ 50: '#f0f9ff',
19
+ 100: '#e0f2fe',
20
+ 200: '#bae6fd',
21
+ 300: '#7dd3fc',
22
+ 400: '#38bdf8',
23
+ 500: '#0ea5e9',
24
+ 600: '#0284c7',
25
+ 700: '#0369a1',
26
+ 800: '#075985',
27
+ 900: '#0c4a6e',
28
+ },
29
+ secondary: {
30
+ 50: '#fdf4ff',
31
+ 100: '#fae8ff',
32
+ 200: '#f5d0fe',
33
+ 300: '#f0abfc',
34
+ 400: '#e879f9',
35
+ 500: '#d946ef',
36
+ 600: '#c026d3',
37
+ 700: '#a21caf',
38
+ 800: '#86198f',
39
+ 900: '#701a75',
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ </script>
46
+ </head>
47
+ <body class="bg-gray-50 dark:bg-gray-900 min-h-screen transition-colors duration-300">
48
+ <div class="container mx-auto px-4 py-8 max-w-4xl">
49
+ <!-- Header -->
50
+ <header class="mb-8 text-center">
51
+ <h1 class="text-3xl md:text-4xl font-bold text-gray-800 dark:text-white mb-2">
52
+ <span class="bg-gradient-to-r from-primary-500 to-secondary-500 bg-clip-text text-transparent">
53
+ Model Intellect Hub
54
+ </span>
55
+ 🔮
56
+ </h1>
57
+ <p class="text-gray-600 dark:text-gray-400">Explore AI models with intelligent insights</p>
58
+ </header>
59
+
60
+ <!-- Main Card -->
61
+ <div class="bg-white dark:bg-gray-800 rounded-2xl shadow-xl p-6 md:p-8 border border-gray-100 dark:border-gray-700">
62
+ <div class="flex items-center gap-3 mb-6">
63
+ <div class="w-10 h-10 rounded-xl bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center">
64
+ <i data-feather="image" class="text-white w-5 h-5"></i>
65
+ </div>
66
+ <div>
67
+ <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Image Generation Model</h2>
68
+ <p class="text-sm text-gray-500 dark:text-gray-400">Configure your AI image generation settings</p>
69
+ </div>
70
+ </div>
71
+
72
+ <!-- Model Selector Component -->
73
+ <div class="space-y-4">
74
+ <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
75
+ Select Model
76
+ </label>
77
+
78
+ <!-- Custom Select with Integrated Info Button -->
79
+ <div class="relative group">
80
+ <div class="flex items-stretch">
81
+ <!-- Select Dropdown -->
82
+ <div class="relative flex-1">
83
+ <select
84
+ id="modelSelect"
85
+ class="w-full appearance-none bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-l-xl px-4 py-3 pr-10 text-gray-700 dark:text-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-all duration-200 cursor-pointer"
86
+ >
87
+ <option value="" disabled selected>Choose a model...</option>
88
+ <option value="stable-diffusion-xl">Stable Diffusion XL</option>
89
+ <option value="dall-e-3">DALL-E 3</option>
90
+ <option value="midjourney-v6">Midjourney V6</option>
91
+ <option value="imagen-3">Imagen 3</option>
92
+ <option value="firefly-3">Adobe Firefly 3</option>
93
+ <option value="leonardo-phoenix">Leonardo Phoenix</option>
94
+ </select>
95
+ <!-- Custom Arrow -->
96
+ <div class="absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none">
97
+ <i data-feather="chevron-down" class="w-5 h-5 text-gray-400"></i>
98
+ </div>
99
+ </div>
100
+
101
+ <!-- Info Button -->
102
+ <button
103
+ id="infoBtn"
104
+ disabled
105
+ class="px-4 bg-gray-100 dark:bg-gray-700 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-xl flex items-center justify-center transition-all duration-200 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-primary-50 dark:hover:bg-primary-900/20 hover:border-primary-300 dark:hover:border-primary-700 group/btn"
106
+ >
107
+ <i data-feather="info" class="w-5 h-5 text-gray-500 dark:text-gray-400 group-hover/btn:text-primary-500 transition-colors"></i>
108
+ </button>
109
+ </div>
110
+
111
+ <!-- Floating Label Animation -->
112
+ <div class="absolute -top-2 left-3 px-1 bg-white dark:bg-gray-800 text-xs text-primary-500 font-medium opacity-0 transition-opacity duration-200" id="floatingLabel">
113
+ Modelo
114
+ </div>
115
+ </div>
116
+
117
+ <!-- Selected Model Display -->
118
+ <div id="selectedDisplay" class="hidden mt-4 p-4 bg-gradient-to-r from-primary-50 to-secondary-50 dark:from-primary-900/20 dark:to-secondary-900/20 rounded-xl border border-primary-100 dark:border-primary-800">
119
+ <div class="flex items-center gap-3">
120
+ <div class="w-8 h-8 rounded-lg bg-primary-500 flex items-center justify-center">
121
+ <i data-feather="check" class="text-white w-4 h-4"></i>
122
+ </div>
123
+ <div>
124
+ <p class="text-sm text-gray-500 dark:text-gray-400">Selected Model</p>
125
+ <p id="selectedModelName" class="font-semibold text-gray-800 dark:text-white"></p>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+
131
+ <!-- Additional Settings -->
132
+ <div class="mt-8 pt-6 border-t border-gray-100 dark:border-gray-700">
133
+ <h3 class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-4">Quick Settings</h3>
134
+ <div class="grid grid-cols-2 gap-4">
135
+ <button class="p-3 rounded-xl border border-gray-200 dark:border-gray-600 hover:border-primary-300 dark:hover:border-primary-700 hover:bg-primary-50 dark:hover:bg-primary-900/10 transition-all text-left">
136
+ <i data-feather="sliders" class="w-4 h-4 text-primary-500 mb-2"></i>
137
+ <p class="text-sm font-medium text-gray-700 dark:text-gray-300">Advanced</p>
138
+ </button>
139
+ <button class="p-3 rounded-xl border border-gray-200 dark:border-gray-600 hover:border-secondary-300 dark:hover:border-secondary-700 hover:bg-secondary-50 dark:hover:bg-secondary-900/10 transition-all text-left">
140
+ <i data-feather="zap" class="w-4 h-4 text-secondary-500 mb-2"></i>
141
+ <p class="text-sm font-medium text-gray-700 dark:text-gray-300">Turbo Mode</p>
142
+ </button>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+ <!-- Modal/Dialog -->
149
+ <div id="modelModal" class="fixed inset-0 z-50 hidden">
150
+ <!-- Backdrop -->
151
+ <div class="absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300 opacity-0" id="modalBackdrop"></div>
152
+
153
+ <!-- Modal Content -->
154
+ <div class="absolute inset-0 flex items-center justify-center p-4">
155
+ <div class="bg-white dark:bg-gray-800 rounded-2xl shadow-2xl max-w-md w-full transform scale-95 opacity-0 transition-all duration-300" id="modalContent">
156
+ <!-- Modal Header -->
157
+ <div class="relative p-6 pb-4">
158
+ <div class="absolute top-4 right-4">
159
+ <button id="closeModal" class="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">
160
+ <i data-feather="x" class="w-5 h-5 text-gray-500 dark:text-gray-400"></i>
161
+ </button>
162
+ </div>
163
+
164
+ <div class="flex items-center gap-4">
165
+ <div class="w-14 h-14 rounded-2xl bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center shadow-lg shadow-primary-500/25">
166
+ <i data-feather="cpu" class="text-white w-7 h-7"></i>
167
+ </div>
168
+ <div>
169
+ <h3 id="modalTitle" class="text-xl font-bold text-gray-800 dark:text-white">Model Name</h3>
170
+ <span id="modalVersion" class="text-xs font-medium px-2 py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-600 dark:text-primary-400">v1.0</span>
171
+ </div>
172
+ </div>
173
+ </div>
174
+
175
+ <!-- Modal Body -->
176
+ <div class="px-6 pb-6">
177
+ <p id="modalDescription" class="text-gray-600 dark:text-gray-300 leading-relaxed mb-6">
178
+ Model description goes here...
179
+ </p>
180
+
181
+ <!-- Specs Grid -->
182
+ <div class="grid grid-cols-2 gap-3 mb-6">
183
+ <div class="p-3 bg-gray-50 dark:bg-gray-700/50 rounded-xl">
184
+ <p class="text-xs text-gray-500 dark:text-gray-400 mb-1">Resolution</p>
185
+ <p id="modalResolution" class="font-semibold text-gray-800 dark:text-white">1024×1024</p>
186
+ </div>
187
+ <div class="p-3 bg-gray-50 dark:bg-gray-700/50 rounded-xl">
188
+ <p class="text-xs text-gray-500 dark:text-gray-400 mb-1">Speed</p>
189
+ <p id="modalSpeed" class="font-semibold text-gray-800 dark:text-white">Fast</p>
190
+ </div>
191
+ <div class="p-3 bg-gray-50 dark:bg-gray-700/50 rounded-xl">
192
+ <p class="text-xs text-gray-500 dark:text-gray-400 mb-1">Style</p>
193
+ <p id="modalStyle" class="font-semibold text-gray-800 dark:text-white">Photorealistic</p>
194
+ </div>
195
+ <div class="p-3 bg-gray-50 dark:bg-gray-700/50 rounded-xl">
196
+ <p class="text-xs text-gray-500 dark:text-gray-400 mb-1">License</p>
197
+ <p id="modalLicense" class="font-semibold text-gray-800 dark:text-white">Commercial</p>
198
+ </div>
199
+ </div>
200
+
201
+ <!-- Tags -->
202
+ <div id="modalTags" class="flex flex-wrap gap-2">
203
+ <!-- Tags injected via JS -->
204
+ </div>
205
+ </div>
206
+
207
+ <!-- Modal Footer -->
208
+ <div class="px-6 pb-6 pt-2 flex gap-3">
209
+ <button id="useModelBtn" class="flex-1 bg-gradient-to-r from-primary-500 to-secondary-500 hover:from-primary-600 hover:to-secondary-600 text-white font-medium py-3 px-4 rounded-xl transition-all duration-200 shadow-lg shadow-primary-500/25 hover:shadow-primary-500/40 transform hover:-translate-y-0.5">
210
+ Use This Model
211
+ </button>
212
+ <button id="docsBtn" class="px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
213
+ <i data-feather="external-link" class="w-5 h-5 text-gray-600 dark:text-gray-400"></i>
214
+ </button>
215
+ </div>
216
+ </div>
217
+ </div>
218
+ </div>
219
+
220
+ <!-- Theme Toggle -->
221
+ <button id="themeToggle" class="fixed bottom-6 right-6 p-3 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 hover:scale-110 transition-transform">
222
+ <i data-feather="sun" class="w-5 h-5 text-amber-500 hidden dark:block"></i>
223
+ <i data-feather="moon" class="w-5 h-5 text-primary-500 block dark:hidden"></i>
224
+ </button>
225
+
226
+ <script src="script.js"></script>
227
+ <script>feather.replace();</script>
228
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
229
+ </body>
230
+ </html>
script.js ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Model data with descriptions and specs
2
+ const modelData = {
3
+ 'stable-diffusion-xl': {
4
+ name: 'Stable Diffusion XL',
5
+ version: 'SDXL 1.0',
6
+ description: 'Open-source latent diffusion model capable of generating photo-realistic images given any text input. Features enhanced composition and improved face generation with a native 1024×1024 resolution.',
7
+ resolution: '1024×1024',
8
+ speed: 'Medium',
9
+ style: 'Versatile',
10
+ license: 'Open Source',
11
+ tags: ['Open Source', 'Customizable', 'Local Run', 'Community']
12
+ },
13
+ 'dall-e-3': {
14
+ name: 'DALL-E 3',
15
+ version: 'Latest',
16
+ description: 'OpenAI\'s most advanced image generation model with exceptional prompt understanding and text rendering capabilities. Produces highly detailed, accurate images that closely follow complex prompts.',
17
+ resolution: '1024×1024',
18
+ speed: 'Fast',
19
+ style: 'Photorealistic',
20
+ license: 'Commercial',
21
+ tags: ['OpenAI', 'Text Rendering', 'API', 'Enterprise']
22
+ },
23
+ 'midjourney-v6': {
24
+ name: 'Midjourney V6',
25
+ version: 'Alpha',
26
+ description: 'Latest iteration with unprecedented realism, coherent text generation, and improved prompt accuracy. Known for stunning artistic quality and aesthetic appeal in generated imagery.',
27
+ resolution: 'Up to 2048×2048',
28
+ speed: 'Medium',
29
+ style: 'Artistic',
30
+ license: 'Commercial',
31
+ tags: ['Discord', 'Artistic', 'High Quality', 'Trending']
32
+ },
33
+ 'imagen-3': {
34
+ name: 'Imagen 3',
35
+ version: 'v3.0',
36
+ description: 'Google DeepMind\'s highest quality text-to-image model with exceptional detail, lighting, and fewer distracting artifacts. Excels at rendering text and following complex prompts.',
37
+ resolution: '1024×1024',
38
+ speed: 'Fast',
39
+ style: 'Photorealistic',
40
+ license: 'Commercial',
41
+ tags: ['Google', 'Safe', 'Reliable', 'Enterprise']
42
+ },
43
+ 'firefly-3': {
44
+ name: 'Adobe Firefly 3',
45
+ version: 'v3.0',
46
+ description: 'Adobe\'s creative generative AI designed for safe commercial use. Integrated with Creative Cloud, featuring structure reference and style reference for precise control.',
47
+ resolution: '1024×1024',
48
+ speed: 'Fast',
49
+ style: 'Commercial',
50
+ license: 'Commercial Safe',
51
+ tags: ['Adobe', 'Creative Cloud', 'Safe', 'Designers']
52
+ },
53
+ 'leonardo-phoenix': {
54
+ name: 'Leonardo Phoenix',
55
+ version: 'Phoenix',
56
+ description: 'Leonardo.ai\'s flagship model with exceptional coherence, prompt adherence, and native 1536×1536 resolution. Features Alchemy for premium quality enhancement.',
57
+ resolution: '1536×1536',
58
+ speed: 'Medium',
59
+ style: 'Game Assets',
60
+ license: 'Commercial',
61
+ tags: ['Gaming', 'Assets', 'Fine-tune', 'Community']
62
+ }
63
+ };
64
+
65
+ // DOM Elements
66
+ const modelSelect = document.getElementById('modelSelect');
67
+ const infoBtn = document.getElementById('infoBtn');
68
+ const modal = document.getElementById('modelModal');
69
+ const modalBackdrop = document.getElementById('modalBackdrop');
70
+ const modalContent = document.getElementById('modalContent');
71
+ const closeModal = document.getElementById('closeModal');
72
+ const floatingLabel = document.getElementById('floatingLabel');
73
+ const selectedDisplay = document.getElementById('selectedDisplay');
74
+ const selectedModelName = document.getElementById('selectedModelName');
75
+ const themeToggle = document.getElementById('themeToggle');
76
+
77
+ // Modal content elements
78
+ const modalTitle = document.getElementById('modalTitle');
79
+ const modalVersion = document.getElementById('modalVersion');
80
+ const modalDescription = document.getElementById('modalDescription');
81
+ const modalResolution = document.getElementById('modalResolution');
82
+ const modalSpeed = document.getElementById('modalSpeed');
83
+ const modalStyle = document.getElementById('modalStyle');
84
+ const modalLicense = document.getElementById('modalLicense');
85
+ const modalTags = document.getElementById('modalTags');
86
+
87
+ // State
88
+ let currentModel = null;
89
+
90
+ // Initialize
91
+ document.addEventListener('DOMContentLoaded', () => {
92
+ feather.replace();
93
+ initTheme();
94
+ });
95
+
96
+ // Theme handling
97
+ function initTheme() {
98
+ const savedTheme = localStorage.getItem('theme') || 'light';
99
+ if (savedTheme === 'dark') {
100
+ document.documentElement.classList.add('dark');
101
+ }
102
+ }
103
+
104
+ themeToggle.addEventListener('click', () => {
105
+ document.documentElement.classList.toggle('dark');
106
+ const isDark = document.documentElement.classList.contains('dark');
107
+ localStorage.setItem('theme', isDark ? 'dark' : 'light');
108
+ feather.replace();
109
+ });
110
+
111
+ // Select change handler
112
+ modelSelect.addEventListener('change', (e) => {
113
+ const value = e.target.value;
114
+ currentModel = value;
115
+
116
+ if (value) {
117
+ // Enable info button
118
+ infoBtn.disabled = false;
119
+
120
+ // Show floating label
121
+ floatingLabel.classList.add('show-label');
122
+
123
+ // Show selected display
124
+ const model = modelData[value];
125
+ selectedModelName.textContent = model.name;
126
+ selectedDisplay.classList.remove('hidden');
127
+ selectedDisplay.classList.add('selected-show');
128
+
129
+ // Add focus ring animation
130
+ modelSelect.parentElement.classList.add('focus-ring-animate');
131
+ setTimeout(() => {
132
+ modelSelect.parentElement.classList.remove('focus-ring-animate');
133
+ }, 300);
134
+ } else {
135
+ infoBtn.disabled = true;
136
+ floatingLabel.classList.remove('show-label');
137
+ selectedDisplay.classList.add('hidden');
138
+ }
139
+ });
140
+
141
+ // Info button click handler
142
+ infoBtn.addEventListener('click', () => {
143
+ if (!currentModel) return;
144
+
145
+ const model = modelData[currentModel];
146
+ if (!model) return;
147
+
148
+ // Populate modal
149
+ modalTitle.textContent = model.name;
150
+ modalVersion.textContent = model.version;
151
+ modalDescription.textContent = model.description;
152
+ modalResolution.textContent = model.resolution;
153
+ modalSpeed.textContent = model.speed;
154
+ modalStyle.textContent = model.style;
155
+ modalLicense.textContent = model.license;
156
+
157
+ // Populate tags
158
+ modalTags.innerHTML = model.tags.map((tag, i) => `
159
+ <span class="px-3 py-1 text-xs font-medium rounded-full bg-gradient-to-r from-primary-100 to-secondary-100 dark:from-primary-900/50 dark:to-secondary-900/50 text-primary-700 dark:text-primary-300 border border-primary-200 dark:border-primary-800 tag-pop" style="animation-delay: ${i * 50}ms">
160
+ ${tag}
161
+ </span>
162
+ `).join('');
163
+
164
+ // Show modal
165
+ openModal();
166
+ });
167
+
168
+ // Modal functions
169
+ function openModal() {
170
+ modal.classList.remove('hidden');
171
+ // Trigger reflow
172
+ void modal.offsetWidth;
173
+
174
+ modalBackdrop.classList.remove('opacity-0');
175
+ modalContent.classList.remove('scale-95', 'opacity-0');
176
+ modalContent.classList.add('scale-100', 'opacity-100');
177
+ }
178
+
179
+ function closeModalFunc() {
180
+ modalBackdrop.classList.add('opacity-0');
181
+ modalContent.classList.remove('scale-100', 'opacity-100');
182
+ modalContent.classList.add('scale-95', 'opacity-0');
183
+
184
+ setTimeout(() => {
185
+ modal.classList.add('hidden');
186
+ }, 300);
187
+ }
188
+
189
+ // Close modal handlers
190
+ closeModal.addEventListener('click', closeModalFunc);
191
+ modalBackdrop.addEventListener('click', closeModalFunc);
192
+
193
+ // Close on escape key
194
+ document.addEventListener('keydown', (e) => {
195
+ if (e.key === 'Escape' && !modal.classList.contains('hidden')) {
196
+ closeModalFunc();
197
+ }
198
+ });
199
+
200
+ // Use model button
201
+ document.getElementById('useModelBtn').addEventListener('click', () => {
202
+ closeModalFunc();
203
+ // Add a subtle confirmation animation
204
+ modelSelect.parentElement.classList.add('focus-ring-animate');
205
+ setTimeout(() => {
206
+ modelSelect.parentElement.classList.remove('focus-ring-animate');
207
+ }, 300);
208
+ });
209
+
210
+ // Docs button
211
+ document.getElementById('docsBtn').addEventListener('click', () => {
212
+ const urls = {
213
+ 'stable-diffusion-xl': 'https://stability.ai/stable-diffusion',
214
+ 'dall-e-3': 'https://openai.com/dall-e-3',
215
+ 'midjourney-v6': 'https://www.midjourney.com',
216
+ 'imagen-3': 'https://deepmind.google/technologies/imagen-3/',
217
+ 'firefly-3': 'https://www.adobe.com/products/firefly.html',
218
+ 'leonardo-phoenix': 'https://leonardo.ai'
219
+ };
220
+
221
+ if (currentModel && urls[currentModel]) {
222
+ window.open(urls[currentModel], '_blank');
223
+ }
224
+ });
225
+
226
+ // Add hover effect to info button
227
+ infoBtn.addEventListener('mouseenter', () => {
228
+ if (!infoBtn.disabled) {
229
+ infoBtn.classList.add('btn-glow');
230
+ }
231
+ });
232
+
233
+ infoBtn.addEventListener('mouseleave', () => {
234
+ infoBtn.classList.remove('btn-glow');
235
+ });
style.css CHANGED
@@ -1,28 +1,147 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom scrollbar */
2
+ ::-webkit-scrollbar {
3
+ width: 8px;
4
+ height: 8px;
5
  }
6
 
7
+ ::-webkit-scrollbar-track {
8
+ background: transparent;
 
9
  }
10
 
11
+ ::-webkit-scrollbar-thumb {
12
+ background: #cbd5e1;
13
+ border-radius: 4px;
 
 
14
  }
15
 
16
+ ::-webkit-scrollbar-thumb:hover {
17
+ background: #94a3b8;
 
 
 
 
18
  }
19
 
20
+ .dark ::-webkit-scrollbar-thumb {
21
+ background: #475569;
22
  }
23
+
24
+ .dark ::-webkit-scrollbar-thumb:hover {
25
+ background: #64748b;
26
+ }
27
+
28
+ /* Select styling enhancements */
29
+ select {
30
+ background-image: none !important;
31
+ }
32
+
33
+ /* Focus ring animation */
34
+ .focus-ring-animate {
35
+ animation: focusPulse 0.3s ease-out;
36
+ }
37
+
38
+ @keyframes focusPulse {
39
+ 0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
40
+ 100% { box-shadow: 0 0 0 4px rgba(14, 165, 233, 0); }
41
+ }
42
+
43
+ /* Modal animations */
44
+ .modal-enter {
45
+ animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
46
+ }
47
+
48
+ .modal-exit {
49
+ animation: modalOut 0.2s ease-out forwards;
50
+ }
51
+
52
+ @keyframes modalIn {
53
+ from {
54
+ opacity: 0;
55
+ transform: scale(0.95) translateY(10px);
56
+ }
57
+ to {
58
+ opacity: 1;
59
+ transform: scale(1) translateY(0);
60
+ }
61
+ }
62
+
63
+ @keyframes modalOut {
64
+ from {
65
+ opacity: 1;
66
+ transform: scale(1) translateY(0);
67
+ }
68
+ to {
69
+ opacity: 0;
70
+ transform: scale(0.95) translateY(10px);
71
+ }
72
+ }
73
+
74
+ /* Gradient text animation */
75
+ .gradient-text-animate {
76
+ background-size: 200% auto;
77
+ animation: gradientShift 3s ease infinite;
78
+ }
79
+
80
+ @keyframes gradientShift {
81
+ 0%, 100% { background-position: 0% center; }
82
+ 50% { background-position: 100% center; }
83
+ }
84
+
85
+ /* Button hover glow */
86
+ .btn-glow:hover {
87
+ box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
88
+ }
89
+
90
+ /* Tag animation */
91
+ .tag-pop {
92
+ animation: tagPop 0.3s ease-out;
93
+ }
94
+
95
+ @keyframes tagPop {
96
+ 0% { transform: scale(0); opacity: 0; }
97
+ 70% { transform: scale(1.1); }
98
+ 100% { transform: scale(1); opacity: 1; }
99
+ }
100
+
101
+ /* Smooth transitions */
102
+ .transition-smooth {
103
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
104
+ }
105
+
106
+ /* Glass effect */
107
+ .glass {
108
+ background: rgba(255, 255, 255, 0.7);
109
+ backdrop-filter: blur(10px);
110
+ -webkit-backdrop-filter: blur(10px);
111
+ }
112
+
113
+ .dark .glass {
114
+ background: rgba(15, 23, 42, 0.7);
115
+ }
116
+
117
+ /* Custom select dropdown styling */
118
+ select option {
119
+ padding: 12px;
120
+ font-size: 14px;
121
+ }
122
+
123
+ /* Info button active state */
124
+ #infoBtn:not(:disabled):active {
125
+ transform: scale(0.95);
126
+ }
127
+
128
+ /* Floating label show */
129
+ .show-label {
130
+ opacity: 1 !important;
131
+ }
132
+
133
+ /* Selected display animation */
134
+ .selected-show {
135
+ animation: slideDown 0.3s ease-out;
136
+ }
137
+
138
+ @keyframes slideDown {
139
+ from {
140
+ opacity: 0;
141
+ transform: translateY(-10px);
142
+ }
143
+ to {
144
+ opacity: 1;
145
+ transform: translateY(0);
146
+ }
147
+ }