oldmonk69 commited on
Commit
cece0b1
·
verified ·
1 Parent(s): 64e4262

Update index.html (#3)

Browse files

- Update index.html (a1db08c2942e61f256ffbda0aa8fd984a9dfe136)

Files changed (1) hide show
  1. index.html +293 -437
index.html CHANGED
@@ -1,466 +1,322 @@
1
  <!DOCTYPE html>
2
- <html class="dark" lang="en">
3
  <head>
4
  <meta charset="utf-8" />
5
- <meta content="width=device-width, initial-scale=1.0" name="viewport" />
6
- <title>NeuralNomadAI - HuggingFace Demo (index.html)</title>
7
 
8
- <!-- Google Fonts -->
9
- <link href="https://fonts.googleapis.com" rel="preconnect" />
10
- <link crossorigin href="https://fonts.gstatic.com" rel="preconnect" />
11
- <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap" rel="stylesheet" />
12
 
13
- <!-- Tailwind CDN (keeps the original layout & utilities) -->
14
- <script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
15
-
16
- <!-- Local CSS for small customizations -->
17
- <link rel="stylesheet" href="style.css" />
18
  </head>
19
-
20
- <body class="bg-gray-50 dark:bg-gray-900 font-display text-gray-900 dark:text-gray-100">
21
- <div class="flex min-h-screen w-full flex-col">
22
- <!-- Header -->
23
- <header class="sticky top-0 z-50 border-b border-gray-200/50 dark:border-gray-700/50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm">
24
- <div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-3">
25
- <a href="#home" data-page="home" class="flex items-center gap-4 cursor-pointer">
26
- <svg class="h-8 w-8 text-sky-600" fill="none" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M39.5563 34.1455V13.8546C39.5563 15.708 36.8773 17.3437 32.7927 18.3189C30.2914 18.916 27.263 19.2655 24 19.2655C20.737 19.2655 17.7086 18.916 15.2073 18.3189C11.1227 17.3437 8.44365 15.708 8.44365 13.8546V34.1455C8.44365 35.9988 11.1227 37.6346 15.2073 38.6098C17.7086 39.2069 20.737 39.5564 24 39.5564C27.263 39.5564 30.2914 39.2069 32.7927 38.6098C36.8773 37.6346 39.5563 35.9988 39.5563 34.1455Z" fill="currentColor"></path></svg>
27
- <h1 class="text-lg font-bold">NeuralNomadAI</h1>
28
- </a>
29
-
30
- <nav class="hidden md:flex items-center gap-6">
31
- <a href="#home" data-page="home" class="nav-link text-sm font-medium">Home</a>
32
- <a href="#services" data-page="services" class="nav-link text-sm font-medium">Services</a>
33
- <a href="#portfolio" data-page="portfolio" class="nav-link text-sm font-medium">Portfolio</a>
34
- <a href="#contact" data-page="contact" class="nav-link text-sm font-medium">Contact</a>
35
- </nav>
36
-
37
- <div class="flex items-center gap-4">
38
- <a href="#contact" data-page="contact" class="rounded-lg bg-sky-600 px-4 py-2 text-sm font-semibold text-white">Get Started</a>
39
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  </div>
41
- </header>
42
-
43
- <main class="flex-grow">
44
- <!-- HOME (brief) -->
45
- <section id="home" class="page-content active">
46
- <div class="mx-auto max-w-7xl px-4 py-12">
47
- <div class="text-center">
48
- <h2 class="text-3xl font-bold">AI Prompt & Image Playground — Hugging Face</h2>
49
- <p class="mt-3 text-gray-600 dark:text-gray-300">This demo uses the Hugging Face Inference API. Replace the client token with a backend proxy token before production.</p>
50
- </div>
51
-
52
- <!-- Prompt Ideator -->
53
- <div class="mt-10 max-w-xl mx-auto">
54
- <h3 class="text-xl font-semibold mb-3">✨ AI Prompt Ideator</h3>
55
- <div class="flex gap-3">
56
- <input id="prompt-input" type="text" placeholder="e.g., a cat astronaut on Mars" aria-label="Prompt input"
57
- class="w-full rounded-lg border border-gray-300 p-3 bg-white dark:bg-gray-800" />
58
- <button id="generate-prompt-btn" type="button" class="rounded-lg bg-sky-600 px-4 py-2 text-white font-semibold">
59
- <span class="btn-text">Generate Prompt</span>
60
- <span class="btn-spinner hidden ml-2">⏳</span>
61
- </button>
62
- </div>
63
- <div id="prompt-result" class="mt-4 result-box hidden" role="status" aria-live="polite"></div>
64
- </div>
65
-
66
- <!-- Image Playground -->
67
- <div class="mt-12 max-w-xl mx-auto">
68
- <h3 class="text-xl font-semibold mb-3">✨ AI Image Playground</h3>
69
- <div class="flex gap-3">
70
- <input id="image-prompt-input" type="text" placeholder="e.g., futuristic city at sunset" aria-label="Image prompt input"
71
- class="w-full rounded-lg border border-gray-300 p-3 bg-white dark:bg-gray-800" />
72
- <button id="generate-image-btn" type="button" class="rounded-lg bg-sky-600 px-4 py-2 text-white font-semibold">
73
- <span class="btn-text">Generate Image</span>
74
- <span class="btn-spinner hidden ml-2">⏳</span>
75
- </button>
76
- </div>
77
 
78
- <div id="image-loading" class="mt-6 hidden text-sm text-gray-600 dark:text-gray-300">
79
- <div class="flex items-center gap-3">
80
- <svg class="animate-spin h-6 w-6 text-sky-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
81
- <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
82
- <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path>
83
- </svg>
84
- <span>Generating image — this may take 10–30s depending on the model.</span>
85
- </div>
86
- </div>
 
 
 
 
 
 
 
 
87
 
88
- <div id="image-result" class="mt-6 result-box" role="status" aria-live="polite"></div>
89
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
 
 
 
 
 
 
91
  </div>
92
- </section>
93
 
94
- <!-- SERVICES (placeholder) -->
95
- <section id="services" class="page-content">
96
- <div class="mx-auto max-w-7xl px-4 py-12">
97
- <h2 class="text-2xl font-bold">Services</h2>
98
- <p class="mt-3 text-gray-600 dark:text-gray-300">Sample content...</p>
99
  </div>
100
- </section>
101
 
102
- <!-- PORTFOLIO (placeholder) -->
103
- <section id="portfolio" class="page-content">
104
- <div class="mx-auto max-w-7xl px-4 py-12">
105
- <h2 class="text-2xl font-bold">Portfolio</h2>
106
- <p class="mt-3 text-gray-600 dark:text-gray-300">Sample content...</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  </div>
108
- </section>
109
 
110
- <!-- CONTACT (placeholder) -->
111
- <section id="contact" class="page-content">
112
- <div class="mx-auto max-w-7xl px-4 py-12">
113
- <h2 class="text-2xl font-bold">Contact</h2>
114
- <p class="mt-3 text-gray-600 dark:text-gray-300">Sample content...</p>
 
 
 
 
115
  </div>
116
- </section>
117
- </main>
118
 
119
- <footer class="border-t border-gray-200/50 dark:border-gray-700/50 bg-white/80 dark:bg-gray-900/80">
120
- <div class="mx-auto max-w-7xl px-4 py-8 text-center text-sm text-gray-600 dark:text-gray-300">
121
- © 2024 NeuralNomadAI — Hugging Face demo. Remember to proxy your API key on the server.
 
 
 
 
 
 
122
  </div>
123
- </footer>
124
- </div>
125
-
126
- <!-- JS: huggingface API integration + UI handling -->
127
- <script>
128
- // -------------------------
129
- // IMPORTANT (security):
130
- // Do NOT put real HF tokens in client-side code for production.
131
- // For quick local testing you can paste a short-lived token here,
132
- // but the recommended pattern is:
133
- // - Create a small backend endpoint (e.g. /api/hf/generate)
134
- // - The backend attaches your HF token to the request and forwards it to HF
135
- // -------------------------
136
-
137
- // If you still want to test client-side (ONLY FOR LOCAL TESTING), put a token here:
138
- // const HF_TOKEN = 'HF_API_TOKEN_HERE';
139
- // Otherwise set HF_TOKEN to empty and call a backend endpoint instead.
140
- const HF_TOKEN = ''; // <-- REPLACE WITH '' FOR PRODUCTION. Use backend proxy.
141
-
142
- // Backend proxy settings (recommended)
143
- // If you implement a backend, set PROXY_BASE to your server endpoint:
144
- // e.g. const PROXY_BASE = '/api/hf'; and implement endpoints /api/hf/text and /api/hf/image
145
- const PROXY_BASE = ''; // e.g. '/api/hf' (leave empty to call HF directly)
146
-
147
- // Model choices (you can change these)
148
- // Text generation: use a text generation model (make sure to check the model's capabilities)
149
- const HF_TEXT_MODEL = 'gpt2'; // small example; swap with a better model for real usage
150
- // Image generation: choose a model that returns image binary, e.g., "stabilityai/stable-diffusion-2"
151
- const HF_IMAGE_MODEL = 'stabilityai/stable-diffusion-2';
152
-
153
- // Utilities
154
- const escapeHtml = (unsafe) => {
155
- if (unsafe === null || unsafe === undefined) return '';
156
- return String(unsafe)
157
- .replace(/&/g, '&amp;')
158
- .replace(/</g, '&lt;')
159
- .replace(/>/g, '&gt;')
160
- .replace(/"/g, '&quot;')
161
- .replace(/'/g, '&#039;');
162
- };
163
-
164
- const formatSafeHtml = (text) => {
165
- let out = escapeHtml(text);
166
- out = out.replace(/\*\*(.+?)\*\*/g, (m, p1) => `<strong>${p1}</strong>`);
167
- out = out.replace(/\r\n|\r|\n/g, '<br>');
168
- return out;
169
- };
170
-
171
- // DOM
172
- document.addEventListener('DOMContentLoaded', () => {
173
- const promptInput = document.getElementById('prompt-input');
174
- const generatePromptBtn = document.getElementById('generate-prompt-btn');
175
- const promptResult = document.getElementById('prompt-result');
176
-
177
- const imagePromptInput = document.getElementById('image-prompt-input');
178
- const generateImageBtn = document.getElementById('generate-image-btn');
179
- const imageLoading = document.getElementById('image-loading');
180
- const imageResult = document.getElementById('image-result');
181
-
182
- // Small helpers
183
- const setButtonLoading = (button, loading = true, loadingText = 'Generating...') => {
184
- if (!button) return;
185
- const btnTextNode = button.querySelector('.btn-text');
186
- const spinner = button.querySelector('.btn-spinner');
187
- button.disabled = loading;
188
- button.classList.toggle('opacity-60', loading);
189
- button.setAttribute('aria-busy', String(loading));
190
- if (btnTextNode && loading) btnTextNode.textContent = loadingText;
191
- if (btnTextNode && !loading) {
192
- if (button.id === 'generate-prompt-btn') btnTextNode.textContent = 'Generate Prompt';
193
- if (button.id === 'generate-image-btn') btnTextNode.textContent = 'Generate Image';
194
- }
195
- if (spinner) spinner.classList.toggle('hidden', !loading);
196
- };
197
-
198
- const showError = (el, message) => {
199
- if (!el) return;
200
- el.classList.remove('hidden');
201
- el.innerHTML = `<div class="p-3 rounded bg-red-50 text-red-700 dark:bg-red-900/30">${escapeHtml(message)}</div>`;
202
- };
203
-
204
- const showHtml = (el, html) => {
205
- if (!el) return;
206
- el.classList.remove('hidden');
207
- el.innerHTML = html;
208
- };
209
-
210
- // Generic function to call Hugging Face Inference API for text
211
- // If PROXY_BASE is set, the code will call PROXY_BASE + '/text' instead.
212
- // The backend should forward the request to HF with the Authorization header.
213
- async function hfTextGenerate(prompt) {
214
- if (!prompt) throw new Error('Empty prompt');
215
- const payload = { inputs: prompt, options: { wait_for_model: true } };
216
-
217
- if (PROXY_BASE) {
218
- // call your backend proxy (recommended)
219
- const resp = await fetch(`${PROXY_BASE}/text`, {
220
- method: 'POST',
221
- headers: { 'Content-Type': 'application/json' },
222
- body: JSON.stringify({ model: HF_TEXT_MODEL, payload }),
223
- });
224
- if (!resp.ok) throw new Error(`Proxy error: ${resp.status} ${await resp.text()}`);
225
- return resp.json();
226
- }
227
 
228
- // Direct client-side call to HF Inference
229
- if (!HF_TOKEN) throw new Error('No HF token set (use a backend proxy in production)');
230
-
231
- const url = `https://api-inference.huggingface.co/models/${encodeURIComponent(HF_TEXT_MODEL)}`;
232
- const resp = await fetch(url, {
233
- method: 'POST',
234
- headers: {
235
- Authorization: `Bearer ${HF_TOKEN}`,
236
- 'Content-Type': 'application/json',
237
- },
238
- body: JSON.stringify(payload),
239
- });
240
-
241
- if (!resp.ok) {
242
- const txt = await resp.text().catch(() => '');
243
- throw new Error(`Hugging Face API error: ${resp.status} ${txt}`);
244
- }
245
-
246
- return resp.json();
247
- }
248
-
249
- // Generic function to call Hugging Face Inference API for images
250
- // Many HF image models return binary image data (image/png). We handle binary responses and JSON fallbacks.
251
- async function hfImageGenerate(prompt) {
252
- if (!prompt) throw new Error('Empty prompt');
253
-
254
- if (PROXY_BASE) {
255
- const resp = await fetch(`${PROXY_BASE}/image`, {
256
- method: 'POST',
257
- headers: { 'Content-Type': 'application/json' },
258
- body: JSON.stringify({ model: HF_IMAGE_MODEL, prompt }),
259
- });
260
- if (!resp.ok) throw new Error(`Proxy error: ${resp.status} ${await resp.text()}`);
261
- // Proxy might forward binary image or JSON with base64; try to detect
262
- const contentType = resp.headers.get('content-type') || '';
263
- if (contentType.startsWith('image/')) {
264
- const blob = await resp.blob();
265
- return { blob };
266
- } else {
267
- return resp.json();
268
- }
269
- }
270
-
271
- // Direct client-side call to HF Inference (NOT RECOMMENDED)
272
- if (!HF_TOKEN) throw new Error('No HF token set (use a backend proxy in production)');
273
-
274
- const url = `https://api-inference.huggingface.co/models/${encodeURIComponent(HF_IMAGE_MODEL)}`;
275
- const resp = await fetch(url, {
276
- method: 'POST',
277
- headers: {
278
- Authorization: `Bearer ${HF_TOKEN}`,
279
- 'Content-Type': 'application/json',
280
- },
281
- // For some image models HF expects {"inputs":"<prompt>"} or a specialized payload
282
- body: JSON.stringify({ inputs: prompt }),
283
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
 
285
- if (!resp.ok) {
286
- const txt = await resp.text().catch(() => '');
287
- throw new Error(`Hugging Face image error: ${resp.status} ${txt}`);
288
- }
 
 
 
 
 
 
 
 
 
 
 
 
289
 
290
- const contentType = resp.headers.get('content-type') || '';
291
- if (contentType.startsWith('image/')) {
292
- const blob = await resp.blob();
293
- return { blob };
294
- } else {
295
- // JSON response (could contain base64 or URLs); parse it
296
- const json = await resp.json().catch(() => null);
297
- return json;
298
- }
299
  }
300
-
301
- // Handlers
302
- const handlePromptGeneration = async () => {
303
- const input = (promptInput.value || '').trim();
304
- if (!input) {
305
- showError(promptResult, 'Please enter a short idea to expand into a prompt.');
306
- return;
307
- }
308
- promptResult.classList.add('hidden');
309
- setButtonLoading(generatePromptBtn, true, 'Generating...');
310
- try {
311
- const systemPrompt = `You are a senior prompt engineer. Expand the user's short idea into a detailed, artistic prompt suitable for image generation. The idea: "${input}"`;
312
- // Use HF text generation
313
- const resp = await hfTextGenerate(systemPrompt);
314
- // Response shapes vary: HF text models often return an array like [{generated_text: "..."}]
315
- let text = null;
316
- if (Array.isArray(resp) && resp.length > 0 && resp[0].generated_text) {
317
- text = resp[0].generated_text;
318
- } else if (resp.generated_text) {
319
- text = resp.generated_text;
320
- } else if (typeof resp === 'string') {
321
- text = resp;
322
- } else if (Array.isArray(resp) && typeof resp[0] === 'string') {
323
- text = resp[0];
324
- } else if (resp && resp[0] && resp[0].text) {
325
- text = resp[0].text;
326
- }
327
-
328
- if (!text) {
329
- showError(promptResult, 'No text returned by the model (unexpected response shape). Check console for raw output.');
330
- console.debug('HF text response (raw):', resp);
331
- } else {
332
- const safe = formatSafeHtml(text);
333
- showHtml(promptResult, safe);
334
- }
335
- } catch (err) {
336
- console.error('Prompt generation error:', err);
337
- showError(promptResult, `Error: ${err.message || err}`);
338
- } finally {
339
- setButtonLoading(generatePromptBtn, false);
340
- }
341
- };
342
-
343
- const handleImageGeneration = async () => {
344
- const prompt = (imagePromptInput.value || '').trim();
345
- if (!prompt) {
346
- showError(imageResult, 'Please enter an image prompt to generate an image.');
347
- return;
348
- }
349
- imageResult.innerHTML = '';
350
- imageLoading.classList.remove('hidden');
351
- setButtonLoading(generateImageBtn, true, 'Generating...');
352
- try {
353
- const resp = await hfImageGenerate(prompt);
354
-
355
- // If backend or HF returned binary blob
356
- if (resp && resp.blob) {
357
- const url = URL.createObjectURL(resp.blob);
358
- const img = document.createElement('img');
359
- img.src = url;
360
- img.alt = `AI generated: ${prompt}`;
361
- img.loading = 'lazy';
362
- img.decoding = 'async';
363
- img.className = 'rounded-lg shadow-lg mx-auto';
364
- imageResult.appendChild(img);
365
- return;
366
- }
367
-
368
- // HF may return JSON containing base64 or an array of output URLs.
369
- // Common shapes:
370
- // - [{generated_text: "..."}] (unlikely for images)
371
- // - { error: "..." }
372
- // - [{image_base64: "..."}, ...] or { images: ["data:image/png;..."] }
373
- // - [{ "generated_image": "<base64>" }]
374
- // We'll try a few possibilities defensively:
375
-
376
- // If it's an array with objects containing 'image' or 'base64' fields
377
- if (Array.isArray(resp)) {
378
- // try to find a base64 string
379
- const obj = resp.find(r => (r.image || r.base64 || r.image_base64 || r.generated_image));
380
- const val = obj && (obj.image || obj.base64 || obj.image_base64 || obj.generated_image);
381
- if (val && typeof val === 'string') {
382
- // if it already begins with data:, use directly; else assume base64 png
383
- const src = val.startsWith('data:') ? val : `data:image/png;base64,${val}`;
384
- const img = document.createElement('img');
385
- img.src = src;
386
- img.alt = `AI generated: ${prompt}`;
387
- img.loading = 'lazy';
388
- img.decoding = 'async';
389
- img.className = 'rounded-lg shadow-lg mx-auto';
390
- imageResult.appendChild(img);
391
- return;
392
- }
393
- }
394
-
395
- // If resp.images is an array of data URLs or URLs
396
- if (resp && (resp.images || resp.output)) {
397
- const arr = resp.images || resp.output;
398
- if (Array.isArray(arr) && arr.length > 0) {
399
- const imageUrl = arr[0];
400
- const img = document.createElement('img');
401
- img.src = imageUrl;
402
- img.alt = `AI generated: ${prompt}`;
403
- img.loading = 'lazy';
404
- img.decoding = 'async';
405
- img.className = 'rounded-lg shadow-lg mx-auto';
406
- imageResult.appendChild(img);
407
- return;
408
- }
409
- }
410
-
411
- // If resp contains a base64 string in top-level 'generated_image' or 'b64_json'
412
- const b64 = resp && (resp.generated_image || resp.b64_json || resp.image_base64 || resp.base64);
413
- if (b64 && typeof b64 === 'string') {
414
- const src = b64.startsWith('data:') ? b64 : `data:image/png;base64,${b64}`;
415
- const img = document.createElement('img');
416
- img.src = src;
417
- img.alt = `AI generated: ${prompt}`;
418
- img.loading = 'lazy';
419
- img.decoding = 'async';
420
- img.className = 'rounded-lg shadow-lg mx-auto';
421
- imageResult.appendChild(img);
422
- return;
423
- }
424
-
425
- // As last resort, show the raw JSON for debugging
426
- showHtml(imageResult, `<pre class="p-3 bg-white/80 dark:bg-gray-800/70 rounded">${escapeHtml(JSON.stringify(resp, null, 2))}</pre>`);
427
- console.debug('HF image response (raw):', resp);
428
- } catch (err) {
429
- console.error('Image generation error:', err);
430
- showError(imageResult, `Error: ${err.message || err}`);
431
- } finally {
432
- imageLoading.classList.add('hidden');
433
- setButtonLoading(generateImageBtn, false);
434
- }
435
- };
436
-
437
- // Attach listeners
438
- generatePromptBtn.addEventListener('click', handlePromptGeneration);
439
- generateImageBtn.addEventListener('click', handleImageGeneration);
440
-
441
- // Navigation (simple)
442
- const navLinks = document.querySelectorAll('[data-page]');
443
- const pages = document.querySelectorAll('.page-content');
444
- const showPage = (id) => {
445
- pages.forEach(p => p.classList.remove('active'));
446
- const el = document.getElementById(id);
447
- if (el) el.classList.add('active');
448
- };
449
- navLinks.forEach(link => {
450
- link.addEventListener('click', (e) => {
451
- e.preventDefault();
452
- const page = link.getAttribute('data-page');
453
- if (page) {
454
- history.pushState({ page }, '', `#${page}`);
455
- showPage(page);
456
- }
457
  });
458
  });
459
- window.addEventListener('popstate', (ev) => {
460
- const page = (ev.state && ev.state.page) || (location.hash && location.hash.substring(1)) || 'home';
461
- showPage(page);
 
 
 
 
462
  });
463
- });
464
  </script>
465
  </body>
466
  </html>
 
1
  <!DOCTYPE html>
2
+ <html lang="en" class="dark">
3
  <head>
4
  <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>NeuralNomadAI Creative AI Studio</title>
7
 
8
+ <!-- Google fonts -->
9
+ <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap" rel="stylesheet">
 
 
10
 
11
+ <!-- Tailwind (utility) + local CSS -->
12
+ <script src="https://cdn.tailwindcss.com?plugins=forms"></script>
13
+ <link rel="stylesheet" href="style.css">
 
 
14
  </head>
15
+ <body class="font-display bg-hero-bg text-gray-100">
16
+
17
+ <!-- NAV -->
18
+ <header class="site-header">
19
+ <div class="container nav-inner">
20
+ <div class="brand">
21
+ <div class="logo"></div>
22
+ <span class="brand-name">NeuralNomadAI</span>
23
+ </div>
24
+ <nav class="nav-links" aria-label="Primary Navigation">
25
+ <a data-page="home" class="nav-link active">Home</a>
26
+ <a data-page="services" class="nav-link">Services</a>
27
+ <a data-page="portfolio" class="nav-link">Portfolio</a>
28
+ <a data-page="pricing" class="nav-link">Pricing</a>
29
+ <a data-page="contact" class="nav-link">Contact</a>
30
+ </nav>
31
+ <div class="nav-cta">
32
+ <button class="btn btn-outline">Login</button>
33
+ <button class="btn btn-primary">Get Started</button>
34
+ </div>
35
+ </div>
36
+ </header>
37
+
38
+ <!-- HERO -->
39
+ <section id="home" class="hero-section">
40
+ <div class="hero-overlay"></div>
41
+ <div class="container hero-inner">
42
+ <h1 class="hero-title">Unleash Your Creative Vision with AI</h1>
43
+ <p class="hero-sub">NeuralNomadAI empowers creators with cutting-edge AI tools for imagery and automation, transforming ideas into stunning visuals and streamlined workflows.</p>
44
+ <div class="hero-ctas">
45
+ <a href="#contact" class="btn btn-primary large">Get Started</a>
46
+ <a href="#services" class="btn btn-muted large">Explore Features</a>
47
+ </div>
48
+ </div>
49
+ </section>
50
+
51
+ <main>
52
+ <!-- QUICK PITCH -->
53
+ <section class="container section section-compact text-center">
54
+ <h2 class="section-title">Quick Pitch</h2>
55
+ <p class="lead">NeuralNomadAI offers a suite of AI-powered tools to generate images, automate workflows, and tailor models to your brand style — all with fast turnaround and commercial rights.</p>
56
+ </section>
57
+
58
+ <!-- VISUAL SHOWCASE -->
59
+ <section class="container section">
60
+ <h2 class="section-title text-center">Visual Showcase</h2>
61
+ <div class="grid-3 gap-large mt-8">
62
+ <article class="feature-card">
63
+ <img src="assets/showcase-1.jpg" alt="AI-powered sample 1" loading="lazy" />
64
+ <h3>AI-Powered Image Generation</h3>
65
+ <p>Create stunning, unique visuals with our advanced AI image models.</p>
66
+ </article>
67
+ <article class="feature-card">
68
+ <img src="assets/showcase-2.jpg" alt="AI-powered sample 2" loading="lazy" />
69
+ <h3>Automated Workflow Tools</h3>
70
+ <p>Streamline your process with automated tasks and pipelines.</p>
71
+ </article>
72
+ <article class="feature-card">
73
+ <img src="assets/showcase-3.jpg" alt="AI-powered sample 3" loading="lazy" />
74
+ <h3>Customizable AI Models</h3>
75
+ <p>Tune models to match your artistic vision and brand voice.</p>
76
+ </article>
77
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
+ <!-- large showcase banner -->
80
+ <div class="showcase-banner mt-10">
81
+ <img src="assets/hero-showcase.jpg" alt="Large showcase" loading="lazy"/>
82
+ <button class="play-btn" aria-label="Play showcase video">▶</button>
83
+ </div>
84
+ </section>
85
+
86
+ <!-- TRUSTED / LOGOS -->
87
+ <section class="container section">
88
+ <h3 class="section-title text-center">Trusted by Creators</h3>
89
+ <div class="trusted-logos">
90
+ <div class="logo-circle"><img src="assets/logo1.png" alt="Company 1"/></div>
91
+ <div class="logo-circle"><img src="assets/logo2.png" alt="Company 2"/></div>
92
+ <div class="logo-circle"><img src="assets/logo3.png" alt="Company 3"/></div>
93
+ <div class="logo-circle"><img src="assets/logo4.png" alt="Company 4"/></div>
94
+ </div>
95
+ </section>
96
 
97
+ <!-- CTA BANNER -->
98
+ <section class="cta-banner">
99
+ <div class="container">
100
+ <h3>Ready to Transform Your Creative Process?</h3>
101
+ <a href="#contact" class="btn btn-primary">Get Started Today</a>
102
+ </div>
103
+ </section>
104
+
105
+ <!-- CONTACT + FORM -->
106
+ <section id="contact" class="container section grid-2 gap-large">
107
+ <div class="contact-card">
108
+ <h3>Hire Us on Fiverr</h3>
109
+ <p>For standardized services and quick turnarounds, find us on Fiverr.</p>
110
+ <a class="btn btn-primary" href="#" target="_blank" rel="noopener">Hire on Fiverr</a>
111
+
112
+ <hr class="divider"/>
113
+
114
+ <h3>Custom Requests</h3>
115
+ <form id="contact-form" class="contact-form" novalidate>
116
+ <label>
117
+ <span>Your Name</span>
118
+ <input name="name" type="text" placeholder="Enter your name" required>
119
+ </label>
120
+ <label>
121
+ <span>Your Email</span>
122
+ <input name="email" type="email" placeholder="Enter your email" required>
123
+ </label>
124
+ <label>
125
+ <span>Subject</span>
126
+ <input name="subject" type="text" placeholder="Enter the subject">
127
+ </label>
128
+ <label>
129
+ <span>Your Message</span>
130
+ <textarea name="message" rows="6" placeholder="Enter your message" required></textarea>
131
+ </label>
132
+ <button type="submit" class="btn btn-primary full">Send Message</button>
133
+ </form>
134
+ </div>
135
 
136
+ <aside class="contact-info">
137
+ <h3>Direct Contact & Info</h3>
138
+ <div class="info-box">
139
+ <p><strong>Email:</strong> <a href="mailto:contact@neuralnomad.ai">contact@neuralnomad.ai</a></p>
140
+ <p><strong>Business Hours:</strong> Mon–Fri, 9 AM – 6 PM (GMT)</p>
141
+ <p><strong>Availability:</strong> We are currently accepting new projects.</p>
142
  </div>
 
143
 
144
+ <h4>Follow Us</h4>
145
+ <div class="social-grid">
146
+ <a class="social">Twitter</a>
147
+ <a class="social">Instagram</a>
148
+ <a class="social">LinkedIn</a>
149
  </div>
 
150
 
151
+ <h4>What Happens Next?</h4>
152
+ <ol class="what-next">
153
+ <li><strong>Initial Contact:</strong> We review your message and reply within 24 hours.</li>
154
+ <li><strong>Project Discussion:</strong> We schedule a call to discuss details.</li>
155
+ <li><strong>Proposal & Quote:</strong> You receive a tailored proposal.</li>
156
+ <li><strong>Kick-off:</strong> We start after approval and keep you updated.</li>
157
+ </ol>
158
+ </aside>
159
+ </section>
160
+
161
+ <!-- PRICING -->
162
+ <section id="pricing" class="container section">
163
+ <h2 class="section-title text-center">Transparent Pricing</h2>
164
+ <p class="lead text-center">Choose the plan that fits your creative needs. No hidden fees.</p>
165
+
166
+ <div class="pricing-grid mt-8">
167
+ <div class="pricing-card">
168
+ <div class="price-top">Basic <span class="price-amount">$29<span class="price-unit">/month</span></span></div>
169
+ <ul class="price-features">
170
+ <li>100 AI Image Credits</li>
171
+ <li>Basic Image Editing Tools</li>
172
+ <li>Community Support</li>
173
+ </ul>
174
+ <button class="btn btn-outline full">Choose Plan</button>
175
  </div>
 
176
 
177
+ <div class="pricing-card featured">
178
+ <div class="ribbon">Popular</div>
179
+ <div class="price-top">Pro <span class="price-amount">$99<span class="price-unit">/month</span></span></div>
180
+ <ul class="price-features">
181
+ <li>Unlimited AI Image Credits</li>
182
+ <li>Advanced Editing Tools</li>
183
+ <li>Priority Support</li>
184
+ </ul>
185
+ <button class="btn btn-primary full">Choose Plan</button>
186
  </div>
 
 
187
 
188
+ <div class="pricing-card">
189
+ <div class="price-top">Enterprise <span class="price-amount">Custom</span></div>
190
+ <ul class="price-features">
191
+ <li>Custom Solutions</li>
192
+ <li>Dedicated Account Manager</li>
193
+ <li>Scalable Resources</li>
194
+ </ul>
195
+ <button class="btn btn-outline full">Contact Us</button>
196
+ </div>
197
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
 
199
+ <div class="package-table mt-10">
200
+ <h4>Package Comparison</h4>
201
+ <table>
202
+ <thead>
203
+ <tr><th>Feature</th><th>Basic</th><th>Pro</th><th>Enterprise</th></tr>
204
+ </thead>
205
+ <tbody>
206
+ <tr><td>AI Image Credits</td><td>100</td><td>Unlimited</td><td>Custom</td></tr>
207
+ <tr><td>Image Editing Tools</td><td>Basic</td><td>Advanced</td><td>Advanced</td></tr>
208
+ <tr><td>Support</td><td>Community</td><td>Priority</td><td>Dedicated</td></tr>
209
+ <tr><td>Delivery Time</td><td>Instant</td><td>Instant</td><td>Custom</td></tr>
210
+ <tr><td>Commercial Use</td><td>No</td><td>Yes</td><td>Yes</td></tr>
211
+ </tbody>
212
+ </table>
213
+ </div>
214
+ </section>
215
+
216
+ <!-- TESTIMONIALS -->
217
+ <section class="container section">
218
+ <h2 class="section-title text-center">What Our Clients Say</h2>
219
+ <div class="testimonial-grid mt-8">
220
+ <blockquote class="testimonial">
221
+ <div class="avatar">SB</div>
222
+ <div class="quote">
223
+ <strong>Sophia Bennett</strong>
224
+ <p class="date">August 15, 2023</p>
225
+ <p class="stars">★★★★★</p>
226
+ <p class="text">"NeuralNomadAI transformed my creative process. The AI imagery is stunning, and the automation tools have saved me countless hours."</p>
227
+ </div>
228
+ </blockquote>
229
+
230
+ <blockquote class="testimonial">
231
+ <div class="avatar">EC</div>
232
+ <div class="quote">
233
+ <strong>Ethan Carter</strong>
234
+ <p class="date">July 22, 2023</p>
235
+ <p class="stars">★★★★★</p>
236
+ <p class="text">"Exceptional service and results. NeuralNomadAI's AI tools are a game-changer for content creators."</p>
237
+ </div>
238
+ </blockquote>
239
+
240
+ <blockquote class="testimonial">
241
+ <div class="avatar">OH</div>
242
+ <div class="quote">
243
+ <strong>Olivia Hayes</strong>
244
+ <p class="date">June 10, 2023</p>
245
+ <p class="stars">★★★★★</p>
246
+ <p class="text">"I'm blown away by the quality and efficiency of NeuralNomadAI. A must-have for any serious creator."</p>
247
+ </div>
248
+ </blockquote>
249
+ </div>
250
+ </section>
251
+
252
+ <!-- ABOUT (brief) -->
253
+ <section class="container section">
254
+ <h2 class="section-title text-center">About NeuralNomadAI</h2>
255
+ <p class="lead text-center">We pioneer AI-driven creative solutions — blending art and technology to help creators scale and focus on what matters.</p>
256
+ <div class="capability-grid mt-8">
257
+ <div class="cap-card"><h4>AI-Powered Imagery</h4><p>Generate stunning visuals with AI.</p></div>
258
+ <div class="cap-card"><h4>Automation Tools</h4><p>Automate repetitive tasks for efficiency.</p></div>
259
+ <div class="cap-card"><h4>Creative Solutions</h4><p>Tailored solutions for diverse needs.</p></div>
260
+ <div class="cap-card"><h4>Rapid Turnaround</h4><p>Fast delivery without compromising quality.</p></div>
261
+ </div>
262
+ </section>
263
+
264
+ <!-- PORTFOLIO -->
265
+ <section id="portfolio" class="container section">
266
+ <h2 class="section-title">Featured Work</h2>
267
+ <p class="lead">Explore our portfolio of AI-driven projects.</p>
268
+
269
+ <div class="portfolio-grid mt-8">
270
+ <div class="portfolio-item"><img src="assets/portfolio-1.jpg" alt=""><h4>AI-Enhanced Photography</h4></div>
271
+ <div class="portfolio-item"><img src="assets/portfolio-2.jpg" alt=""><h4>Automated Content Creation</h4></div>
272
+ <div class="portfolio-item"><img src="assets/portfolio-3.jpg" alt=""><h4>Personalized Marketing</h4></div>
273
+ <div class="portfolio-item"><img src="assets/portfolio-4.jpg" alt=""><h4>Design Tools</h4></div>
274
+ <div class="portfolio-item"><img src="assets/portfolio-5.jpg" alt=""><h4>Interactive Installations</h4></div>
275
+ <div class="portfolio-item"><img src="assets/portfolio-6.jpg" alt=""><h4>Data Visualization</h4></div>
276
+ </div>
277
 
278
+ <div class="pagination mt-8">‹ <span class="page active">1</span> 2 3 ›</div>
279
+ </section>
280
+ </main>
281
+
282
+ <footer class="site-footer">
283
+ <div class="container">
284
+ <div class="footer-row">
285
+ <div>© 2025 NeuralNomadAI. All rights reserved.</div>
286
+ <div class="footer-links">
287
+ <a>Terms of Service</a>
288
+ <a>Privacy Policy</a>
289
+ <a>Contact Us</a>
290
+ </div>
291
+ </div>
292
+ </div>
293
+ </footer>
294
 
295
+ <!-- Optional small JS for simple navigation & form -->
296
+ <script>
297
+ // Simple single-page switching using data-page attributes
298
+ (function() {
299
+ const links = document.querySelectorAll('.nav-link');
300
+ const pages = document.querySelectorAll('.page-content'); // not used here we use anchors instead
301
+ function setActive(link) {
302
+ links.forEach(l => l.classList.remove('active'));
303
+ link.classList.add('active');
304
  }
305
+ links.forEach(l => {
306
+ l.addEventListener('click', (e) => {
307
+ links.forEach(x=>x.classList.remove('active'));
308
+ l.classList.add('active');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  });
310
  });
311
+
312
+ // Contact form simple handler
313
+ const form = document.getElementById('contact-form');
314
+ form?.addEventListener('submit', (e) => {
315
+ e.preventDefault();
316
+ alert('Thanks! Your message was received (this demo does not send emails).');
317
+ form.reset();
318
  });
319
+ })();
320
  </script>
321
  </body>
322
  </html>