XXXMARK commited on
Commit
3af2fbb
·
verified ·
1 Parent(s): afc6369

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +523 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Website Ai
3
- emoji: 🚀
4
- colorFrom: pink
5
- colorTo: indigo
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: website-ai
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,523 @@
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>AI Website Builder | Text to WordPress</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #6e8efb, #a777e3);
12
+ }
13
+ .preview-frame {
14
+ border: 1px solid #e2e8f0;
15
+ border-radius: 0.5rem;
16
+ transform-origin: top left;
17
+ }
18
+ .draggable {
19
+ cursor: move;
20
+ transition: all 0.2s ease;
21
+ }
22
+ .draggable:hover {
23
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
24
+ }
25
+ .resize-handle {
26
+ width: 10px;
27
+ height: 10px;
28
+ background: #4f46e5;
29
+ position: absolute;
30
+ right: 0;
31
+ bottom: 0;
32
+ cursor: nwse-resize;
33
+ }
34
+ .sidebar-item:hover {
35
+ background-color: rgba(79, 70, 229, 0.1);
36
+ }
37
+ .animate-pulse {
38
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
39
+ }
40
+ @keyframes pulse {
41
+ 0%, 100% { opacity: 1; }
42
+ 50% { opacity: 0.5; }
43
+ }
44
+ </style>
45
+ </head>
46
+ <body class="bg-gray-50 font-sans">
47
+ <div class="flex flex-col h-screen">
48
+ <!-- Header -->
49
+ <header class="gradient-bg text-white p-4 shadow-md">
50
+ <div class="container mx-auto flex justify-between items-center">
51
+ <div class="flex items-center space-x-2">
52
+ <i class="fas fa-robot text-2xl"></i>
53
+ <h1 class="text-xl font-bold">AI Website Builder</h1>
54
+ </div>
55
+ <div class="flex space-x-4">
56
+ <button class="px-4 py-2 bg-white text-indigo-600 rounded-md font-medium hover:bg-gray-100 transition">
57
+ <i class="fas fa-save mr-2"></i>Save Project
58
+ </button>
59
+ <button id="exportBtn" class="px-4 py-2 bg-indigo-700 text-white rounded-md font-medium hover:bg-indigo-800 transition">
60
+ <i class="fas fa-wordpress mr-2"></i>Export to WordPress
61
+ </button>
62
+ </div>
63
+ </div>
64
+ </header>
65
+
66
+ <!-- Main Content -->
67
+ <div class="flex flex-1 overflow-hidden">
68
+ <!-- Sidebar -->
69
+ <div class="w-64 bg-white border-r border-gray-200 p-4 overflow-y-auto">
70
+ <div class="mb-6">
71
+ <h2 class="text-lg font-semibold text-gray-800 mb-3">AI Tools</h2>
72
+ <div class="space-y-2">
73
+ <button class="sidebar-item w-full text-left px-3 py-2 rounded-md text-gray-700 hover:text-indigo-600 transition flex items-center">
74
+ <i class="fas fa-magic mr-2 text-indigo-500"></i> Generate from Text
75
+ </button>
76
+ <button class="sidebar-item w-full text-left px-3 py-2 rounded-md text-gray-700 hover:text-indigo-600 transition flex items-center">
77
+ <i class="fas fa-image mr-2 text-indigo-500"></i> AI Image Generator
78
+ </button>
79
+ <button class="sidebar-item w-full text-left px-3 py-2 rounded-md text-gray-700 hover:text-indigo-600 transition flex items-center">
80
+ <i class="fas fa-font mr-2 text-indigo-500"></i> Content Rewriter
81
+ </button>
82
+ </div>
83
+ </div>
84
+
85
+ <div class="mb-6">
86
+ <h2 class="text-lg font-semibold text-gray-800 mb-3">Elements</h2>
87
+ <div class="grid grid-cols-2 gap-2">
88
+ <div class="element-item p-3 border border-gray-200 rounded-md text-center cursor-pointer hover:bg-indigo-50 transition">
89
+ <i class="fas fa-heading text-indigo-500 mb-1"></i>
90
+ <p class="text-xs text-gray-600">Heading</p>
91
+ </div>
92
+ <div class="element-item p-3 border border-gray-200 rounded-md text-center cursor-pointer hover:bg-indigo-50 transition">
93
+ <i class="fas fa-paragraph text-indigo-500 mb-1"></i>
94
+ <p class="text-xs text-gray-600">Text</p>
95
+ </div>
96
+ <div class="element-item p-3 border border-gray-200 rounded-md text-center cursor-pointer hover:bg-indigo-50 transition">
97
+ <i class="fas fa-image text-indigo-500 mb-1"></i>
98
+ <p class="text-xs text-gray-600">Image</p>
99
+ </div>
100
+ <div class="element-item p-3 border border-gray-200 rounded-md text-center cursor-pointer hover:bg-indigo-50 transition">
101
+ <i class="fas fa-th text-indigo-500 mb-1"></i>
102
+ <p class="text-xs text-gray-600">Grid</p>
103
+ </div>
104
+ <div class="element-item p-3 border border-gray-200 rounded-md text-center cursor-pointer hover:bg-indigo-50 transition">
105
+ <i class="fas fa-play text-indigo-500 mb-1"></i>
106
+ <p class="text-xs text-gray-600">Video</p>
107
+ </div>
108
+ <div class="element-item p-3 border border-gray-200 rounded-md text-center cursor-pointer hover:bg-indigo-50 transition">
109
+ <i class="fas fa-form text-indigo-500 mb-1"></i>
110
+ <p class="text-xs text-gray-600">Form</p>
111
+ </div>
112
+ </div>
113
+ </div>
114
+
115
+ <div class="mb-6">
116
+ <h2 class="text-lg font-semibold text-gray-800 mb-3">Templates</h2>
117
+ <div class="space-y-2">
118
+ <div class="template-item p-2 border border-gray-200 rounded-md cursor-pointer hover:border-indigo-300 transition">
119
+ <img src="https://via.placeholder.com/200x120?text=Business" alt="Business Template" class="rounded-md mb-1">
120
+ <p class="text-sm text-center text-gray-600">Business</p>
121
+ </div>
122
+ <div class="template-item p-2 border border-gray-200 rounded-md cursor-pointer hover:border-indigo-300 transition">
123
+ <img src="https://via.placeholder.com/200x120?text=Portfolio" alt="Portfolio Template" class="rounded-md mb-1">
124
+ <p class="text-sm text-center text-gray-600">Portfolio</p>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+
130
+ <!-- Editor Area -->
131
+ <div class="flex-1 flex flex-col">
132
+ <!-- Toolbar -->
133
+ <div class="bg-white border-b border-gray-200 p-3 flex items-center justify-between">
134
+ <div class="flex space-x-2">
135
+ <select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
136
+ <option>Desktop</option>
137
+ <option>Tablet</option>
138
+ <option>Mobile</option>
139
+ </select>
140
+ <button class="p-2 text-gray-600 hover:text-indigo-600 hover:bg-gray-100 rounded-md">
141
+ <i class="fas fa-undo"></i>
142
+ </button>
143
+ <button class="p-2 text-gray-600 hover:text-indigo-600 hover:bg-gray-100 rounded-md">
144
+ <i class="fas fa-redo"></i>
145
+ </button>
146
+ </div>
147
+ <div class="flex space-x-2">
148
+ <button class="p-2 text-gray-600 hover:text-indigo-600 hover:bg-gray-100 rounded-md">
149
+ <i class="fas fa-eye"></i>
150
+ </button>
151
+ <button class="p-2 text-gray-600 hover:text-indigo-600 hover:bg-gray-100 rounded-md">
152
+ <i class="fas fa-code"></i>
153
+ </button>
154
+ </div>
155
+ </div>
156
+
157
+ <!-- Main Editor -->
158
+ <div class="flex-1 overflow-auto p-6 bg-gray-100">
159
+ <div class="max-w-4xl mx-auto">
160
+ <!-- AI Input Section -->
161
+ <div class="bg-white rounded-lg shadow-md p-6 mb-6">
162
+ <h2 class="text-xl font-semibold mb-4 text-gray-800">Generate Your Website with AI</h2>
163
+ <div class="mb-4">
164
+ <label class="block text-gray-700 text-sm font-medium mb-2">Describe your website</label>
165
+ <textarea id="aiPrompt" class="w-full border border-gray-300 rounded-md p-3 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" rows="4" placeholder="Example: I need a business website for my digital marketing agency. It should have a hero section, services, portfolio, and contact form..."></textarea>
166
+ </div>
167
+ <div class="flex justify-between items-center">
168
+ <div class="flex space-x-2">
169
+ <select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
170
+ <option>Professional</option>
171
+ <option>Creative</option>
172
+ <option>Minimal</option>
173
+ <option>Vibrant</option>
174
+ </select>
175
+ <select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
176
+ <option>Light Theme</option>
177
+ <option>Dark Theme</option>
178
+ </select>
179
+ </div>
180
+ <button id="generateBtn" class="px-4 py-2 bg-indigo-600 text-white rounded-md font-medium hover:bg-indigo-700 transition flex items-center">
181
+ <i class="fas fa-bolt mr-2"></i> Generate Website
182
+ </button>
183
+ </div>
184
+ </div>
185
+
186
+ <!-- Preview Area -->
187
+ <div class="relative">
188
+ <div class="flex justify-between items-center mb-3">
189
+ <h3 class="text-lg font-medium text-gray-800">Website Preview</h3>
190
+ <div class="text-sm text-gray-500">Drag and drop to edit</div>
191
+ </div>
192
+
193
+ <div id="previewContainer" class="preview-frame bg-white mx-auto w-full" style="height: 600px; overflow: auto;">
194
+ <!-- Default content or generated content will appear here -->
195
+ <div class="text-center py-20 text-gray-400" id="defaultPreviewContent">
196
+ <i class="fas fa-magic text-4xl mb-3"></i>
197
+ <p class="text-xl">Your AI-generated website will appear here</p>
198
+ <p class="text-sm mt-2">Describe your website above and click "Generate Website"</p>
199
+ </div>
200
+
201
+ <!-- Sample generated content (hidden by default) -->
202
+ <div id="generatedContent" class="hidden">
203
+ <!-- Sample Hero Section -->
204
+ <div class="draggable relative p-4 border-2 border-dashed border-transparent hover:border-indigo-300" style="min-height: 100px;">
205
+ <div class="gradient-bg text-white p-12 rounded-lg text-center">
206
+ <h1 class="text-4xl font-bold mb-4">Your Business Name</h1>
207
+ <p class="text-xl mb-8">Professional digital marketing solutions tailored for your success</p>
208
+ <button class="px-6 py-3 bg-white text-indigo-600 rounded-md font-medium hover:bg-gray-100 transition">
209
+ Get Started
210
+ </button>
211
+ </div>
212
+ <div class="absolute top-0 right-0 p-2 bg-white bg-opacity-80 rounded-bl-md">
213
+ <button class="edit-element p-1 text-gray-600 hover:text-indigo-600">
214
+ <i class="fas fa-pen"></i>
215
+ </button>
216
+ <button class="delete-element p-1 text-gray-600 hover:text-red-600">
217
+ <i class="fas fa-trash"></i>
218
+ </button>
219
+ </div>
220
+ </div>
221
+
222
+ <!-- Sample Services Section -->
223
+ <div class="draggable relative p-4 border-2 border-dashed border-transparent hover:border-indigo-300 mt-6" style="min-height: 100px;">
224
+ <div class="container mx-auto px-4">
225
+ <h2 class="text-3xl font-bold text-center mb-12">Our Services</h2>
226
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
227
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition">
228
+ <div class="text-indigo-600 mb-4">
229
+ <i class="fas fa-bullseye text-3xl"></i>
230
+ </div>
231
+ <h3 class="text-xl font-semibold mb-3">SEO Optimization</h3>
232
+ <p class="text-gray-600">Improve your search rankings and organic traffic with our proven strategies.</p>
233
+ </div>
234
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition">
235
+ <div class="text-indigo-600 mb-4">
236
+ <i class="fas fa-ad text-3xl"></i>
237
+ </div>
238
+ <h3 class="text-xl font-semibold mb-3">PPC Advertising</h3>
239
+ <p class="text-gray-600">Targeted ads that deliver measurable results and maximize your ROI.</p>
240
+ </div>
241
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition">
242
+ <div class="text-indigo-600 mb-4">
243
+ <i class="fas fa-paint-brush text-3xl"></i>
244
+ </div>
245
+ <h3 class="text-xl font-semibold mb-3">Content Creation</h3>
246
+ <p class="text-gray-600">Engaging content that resonates with your audience and drives conversions.</p>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ <div class="absolute top-0 right-0 p-2 bg-white bg-opacity-80 rounded-bl-md">
251
+ <button class="edit-element p-1 text-gray-600 hover:text-indigo-600">
252
+ <i class="fas fa-pen"></i>
253
+ </button>
254
+ <button class="delete-element p-1 text-gray-600 hover:text-red-600">
255
+ <i class="fas fa-trash"></i>
256
+ </button>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </div>
263
+ </div>
264
+ </div>
265
+
266
+ <!-- Properties Panel -->
267
+ <div class="w-72 bg-white border-l border-gray-200 p-4 overflow-y-auto">
268
+ <h2 class="text-lg font-semibold text-gray-800 mb-4">Properties</h2>
269
+
270
+ <div id="emptyProperties" class="text-center py-10 text-gray-400">
271
+ <i class="fas fa-mouse-pointer text-3xl mb-3"></i>
272
+ <p>Select an element to edit its properties</p>
273
+ </div>
274
+
275
+ <div id="elementProperties" class="hidden">
276
+ <div class="mb-6">
277
+ <h3 class="font-medium text-gray-700 mb-3 flex justify-between items-center">
278
+ <span>Section Settings</span>
279
+ <span class="text-xs bg-indigo-100 text-indigo-800 px-2 py-1 rounded">Hero Section</span>
280
+ </h3>
281
+ <div class="space-y-4">
282
+ <div>
283
+ <label class="block text-sm font-medium text-gray-700 mb-1">Background</label>
284
+ <div class="flex space-x-2">
285
+ <button class="w-8 h-8 rounded-full bg-indigo-600 border-2 border-indigo-700"></button>
286
+ <button class="w-8 h-8 rounded-full bg-white border border-gray-300"></button>
287
+ <button class="w-8 h-8 rounded-full bg-gray-800 border border-gray-900"></button>
288
+ <button class="w-8 h-8 rounded-full bg-gradient-to-r from-indigo-500 to-purple-600 border border-gray-300"></button>
289
+ </div>
290
+ </div>
291
+ <div>
292
+ <label class="block text-sm font-medium text-gray-700 mb-1">Padding</label>
293
+ <div class="grid grid-cols-4 gap-2">
294
+ <input type="number" class="border border-gray-300 rounded-md px-2 py-1 text-sm" placeholder="Top" value="48">
295
+ <input type="number" class="border border-gray-300 rounded-md px-2 py-1 text-sm" placeholder="Right" value="16">
296
+ <input type="number" class="border border-gray-300 rounded-md px-2 py-1 text-sm" placeholder="Bottom" value="48">
297
+ <input type="number" class="border border-gray-300 rounded-md px-2 py-1 text-sm" placeholder="Left" value="16">
298
+ </div>
299
+ </div>
300
+ </div>
301
+ </div>
302
+
303
+ <div class="mb-6">
304
+ <h3 class="font-medium text-gray-700 mb-3">Content</h3>
305
+ <div class="space-y-4">
306
+ <div>
307
+ <label class="block text-sm font-medium text-gray-700 mb-1">Heading</label>
308
+ <input type="text" class="w-full border border-gray-300 rounded-md px-3 py-2" value="Your Business Name">
309
+ </div>
310
+ <div>
311
+ <label class="block text-sm font-medium text-gray-700 mb-1">Subheading</label>
312
+ <textarea class="w-full border border-gray-300 rounded-md px-3 py-2" rows="2">Professional digital marketing solutions tailored for your success</textarea>
313
+ </div>
314
+ <div>
315
+ <label class="block text-sm font-medium text-gray-700 mb-1">Button Text</label>
316
+ <input type="text" class="w-full border border-gray-300 rounded-md px-3 py-2" value="Get Started">
317
+ </div>
318
+ </div>
319
+ </div>
320
+
321
+ <div class="mb-6">
322
+ <h3 class="font-medium text-gray-700 mb-3">Advanced</h3>
323
+ <div class="space-y-2">
324
+ <label class="inline-flex items-center">
325
+ <input type="checkbox" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" checked>
326
+ <span class="ml-2 text-sm text-gray-700">Full-width section</span>
327
+ </label>
328
+ <label class="inline-flex items-center">
329
+ <input type="checkbox" class="rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50">
330
+ <span class="ml-2 text-sm text-gray-700">Parallax effect</span>
331
+ </label>
332
+ </div>
333
+ </div>
334
+
335
+ <button class="w-full py-2 bg-red-100 text-red-600 rounded-md font-medium hover:bg-red-200 transition">
336
+ <i class="fas fa-trash mr-2"></i> Delete Section
337
+ </button>
338
+ </div>
339
+ </div>
340
+ </div>
341
+ </div>
342
+
343
+ <!-- Export Modal -->
344
+ <div id="exportModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
345
+ <div class="bg-white rounded-lg shadow-xl w-full max-w-md">
346
+ <div class="p-6">
347
+ <div class="flex justify-between items-center mb-4">
348
+ <h3 class="text-lg font-semibold text-gray-800">Export to WordPress</h3>
349
+ <button id="closeModal" class="text-gray-500 hover:text-gray-700">
350
+ <i class="fas fa-times"></i>
351
+ </button>
352
+ </div>
353
+
354
+ <div class="space-y-4">
355
+ <div>
356
+ <label class="block text-sm font-medium text-gray-700 mb-1">WordPress Site URL</label>
357
+ <input type="url" class="w-full border border-gray-300 rounded-md px-3 py-2" placeholder="https://yourwordpresssite.com">
358
+ </div>
359
+ <div>
360
+ <label class="block text-sm font-medium text-gray-700 mb-1">Admin Username</label>
361
+ <input type="text" class="w-full border border-gray-300 rounded-md px-3 py-2" placeholder="username">
362
+ </div>
363
+ <div>
364
+ <label class="block text-sm font-medium text-gray-700 mb-1">Application Password</label>
365
+ <input type="password" class="w-full border border-gray-300 rounded-md px-3 py-2" placeholder="••••••••">
366
+ <p class="text-xs text-gray-500 mt-1">Create in WordPress: Users > Your Profile > Application Passwords</p>
367
+ </div>
368
+
369
+ <div class="pt-4">
370
+ <button id="confirmExport" class="w-full py-2 bg-indigo-600 text-white rounded-md font-medium hover:bg-indigo-700 transition flex items-center justify-center">
371
+ <i class="fas fa-cloud-upload-alt mr-2"></i> Export Now
372
+ </button>
373
+ </div>
374
+ </div>
375
+ </div>
376
+ </div>
377
+ </div>
378
+
379
+ <!-- Loading Overlay -->
380
+ <div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
381
+ <div class="bg-white rounded-lg shadow-xl p-8 max-w-sm text-center">
382
+ <div class="animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-indigo-500 mx-auto mb-4"></div>
383
+ <h3 class="text-lg font-medium text-gray-800 mb-2">Generating Your Website</h3>
384
+ <p class="text-gray-600">Our AI is creating your perfect website. This may take a moment...</p>
385
+ </div>
386
+ </div>
387
+
388
+ <script>
389
+ // DOM Elements
390
+ const generateBtn = document.getElementById('generateBtn');
391
+ const exportBtn = document.getElementById('exportBtn');
392
+ const exportModal = document.getElementById('exportModal');
393
+ const closeModal = document.getElementById('closeModal');
394
+ const confirmExport = document.getElementById('confirmExport');
395
+ const loadingOverlay = document.getElementById('loadingOverlay');
396
+ const defaultPreviewContent = document.getElementById('defaultPreviewContent');
397
+ const generatedContent = document.getElementById('generatedContent');
398
+ const emptyProperties = document.getElementById('emptyProperties');
399
+ const elementProperties = document.getElementById('elementProperties');
400
+
401
+ // Event Listeners
402
+ generateBtn.addEventListener('click', generateWebsite);
403
+ exportBtn.addEventListener('click', showExportModal);
404
+ closeModal.addEventListener('click', hideExportModal);
405
+ confirmExport.addEventListener('click', exportToWordPress);
406
+
407
+ // Make elements draggable (simplified for demo)
408
+ document.querySelectorAll('.draggable').forEach(el => {
409
+ el.addEventListener('mousedown', initDrag);
410
+ });
411
+
412
+ // Show edit buttons on hover
413
+ document.querySelectorAll('.draggable').forEach(el => {
414
+ el.addEventListener('mouseenter', () => {
415
+ el.querySelector('.absolute').classList.remove('hidden');
416
+ });
417
+ el.addEventListener('mouseleave', () => {
418
+ el.querySelector('.absolute').classList.add('hidden');
419
+ });
420
+ });
421
+
422
+ // Functions
423
+ function generateWebsite() {
424
+ const prompt = document.getElementById('aiPrompt').value;
425
+
426
+ if (!prompt) {
427
+ alert('Please describe your website first');
428
+ return;
429
+ }
430
+
431
+ // Show loading overlay
432
+ loadingOverlay.classList.remove('hidden');
433
+
434
+ // Simulate AI generation delay
435
+ setTimeout(() => {
436
+ loadingOverlay.classList.add('hidden');
437
+
438
+ // Hide default content and show generated content
439
+ defaultPreviewContent.classList.add('hidden');
440
+ generatedContent.classList.remove('hidden');
441
+
442
+ // Show properties panel
443
+ emptyProperties.classList.add('hidden');
444
+ elementProperties.classList.remove('hidden');
445
+
446
+ // Update the preview based on the prompt (simplified for demo)
447
+ // In a real app, this would be an API call to an AI service
448
+ console.log('Generating website based on:', prompt);
449
+
450
+ }, 2000);
451
+ }
452
+
453
+ function showExportModal() {
454
+ exportModal.classList.remove('hidden');
455
+ }
456
+
457
+ function hideExportModal() {
458
+ exportModal.classList.add('hidden');
459
+ }
460
+
461
+ function exportToWordPress() {
462
+ // Show loading overlay
463
+ loadingOverlay.classList.remove('hidden');
464
+ hideExportModal();
465
+
466
+ // Simulate export process
467
+ setTimeout(() => {
468
+ loadingOverlay.classList.add('hidden');
469
+ alert('Website successfully exported to WordPress!');
470
+ }, 1500);
471
+ }
472
+
473
+ // Simplified drag functionality for demo
474
+ function initDrag(e) {
475
+ if (e.target.classList.contains('edit-element') ||
476
+ e.target.classList.contains('delete-element')) {
477
+ return;
478
+ }
479
+
480
+ const element = e.currentTarget;
481
+ let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
482
+
483
+ e = e || window.event;
484
+ e.preventDefault();
485
+
486
+ // Get the mouse cursor position at startup
487
+ pos3 = e.clientX;
488
+ pos4 = e.clientY;
489
+
490
+ document.onmouseup = closeDragElement;
491
+ document.onmousemove = elementDrag;
492
+
493
+ function elementDrag(e) {
494
+ e = e || window.event;
495
+ e.preventDefault();
496
+
497
+ // Calculate the new cursor position
498
+ pos1 = pos3 - e.clientX;
499
+ pos2 = pos4 - e.clientY;
500
+ pos3 = e.clientX;
501
+ pos4 = e.clientY;
502
+
503
+ // Set the element's new position
504
+ element.style.top = (element.offsetTop - pos2) + "px";
505
+ element.style.left = (element.offsetLeft - pos1) + "px";
506
+ }
507
+
508
+ function closeDragElement() {
509
+ // Stop moving when mouse button is released
510
+ document.onmouseup = null;
511
+ document.onmousemove = null;
512
+ }
513
+ }
514
+
515
+ // Demo: Click on elements in the sidebar to add them to the preview
516
+ document.querySelectorAll('.element-item').forEach(el => {
517
+ el.addEventListener('click', () => {
518
+ alert('In a full implementation, this would add a new element to the preview area.');
519
+ });
520
+ });
521
+ </script>
522
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=XXXMARK/website-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
523
+ </html>
prompts.txt ADDED
File without changes