creative888 commited on
Commit
c3ae8b9
·
verified ·
1 Parent(s): ffed4ea

make everything interactive and add the ai agent i asked. here's the api key

Browse files
Files changed (7) hide show
  1. community.html +73 -24
  2. components/ai-agent.js +33 -40
  3. docs.html +62 -4
  4. editor.html +85 -19
  5. index.html +45 -17
  6. support.html +46 -14
  7. tutorials.html +45 -10
community.html CHANGED
@@ -32,11 +32,11 @@
32
  <p class="text-gray-600 mb-6">Connect with developers, share knowledge, and collaborate on projects</p>
33
 
34
  <div class="flex flex-wrap gap-4 mb-8">
35
- <button class="bg-primary hover:bg-blue-600 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-all">
36
  <i data-feather="plus"></i>
37
  New Post
38
  </button>
39
- <button class="bg-secondary hover:bg-gray-800 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-all">
40
  <i data-feather="users"></i>
41
  Join Group
42
  </button>
@@ -56,15 +56,15 @@
56
  <h2 class="text-xl font-bold text-gray-800 mb-3">Just built my first React app with Replit Clone!</h2>
57
  <p class="text-gray-600 mb-4">I'm excited to share that I just completed my first React application using Replit Clone. The integrated environment made it so easy to get started without any setup. Check out my project and let me know what you think!</p>
58
  <div class="flex gap-4 mb-4">
59
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
60
  <i data-feather="heart" class="w-4 h-4"></i>
61
- <span>24</span>
62
  </button>
63
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
64
  <i data-feather="message-circle" class="w-4 h-4"></i>
65
  <span>8</span>
66
  </button>
67
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
68
  <i data-feather="share" class="w-4 h-4"></i>
69
  <span>Share</span>
70
  </button>
@@ -82,15 +82,15 @@
82
  <h2 class="text-xl font-bold text-gray-800 mb-3">Tips for optimizing Python code in Replit</h2>
83
  <p class="text-gray-600 mb-4">After spending some time with Replit Clone, I've discovered several tips for making Python code run faster and more efficiently. Here are my top 5 recommendations for anyone working on data processing projects...</p>
84
  <div class="flex gap-4 mb-4">
85
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
86
  <i data-feather="heart" class="w-4 h-4"></i>
87
- <span>42</span>
88
  </button>
89
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
90
  <i data-feather="message-circle" class="w-4 h-4"></i>
91
  <span>15</span>
92
  </button>
93
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
94
  <i data-feather="share" class="w-4 h-4"></i>
95
  <span>Share</span>
96
  </button>
@@ -109,15 +109,15 @@
109
  <p class="text-gray-600 mb-4">I've been working on a data visualization dashboard using D3.js and Replit Clone. The live preview feature was incredibly helpful during development. Here's a screenshot of the final product and some insights on the process...</p>
110
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-full h-64 mb-4"></div>
111
  <div class="flex gap-4 mb-4">
112
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
113
  <i data-feather="heart" class="w-4 h-4"></i>
114
- <span>56</span>
115
  </button>
116
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
117
  <i data-feather="message-circle" class="w-4 h-4"></i>
118
  <span>22</span>
119
  </button>
120
- <button class="flex items-center gap-1 text-gray-500 hover:text-primary">
121
  <i data-feather="share" class="w-4 h-4"></i>
122
  <span>Share</span>
123
  </button>
@@ -132,31 +132,31 @@
132
  <h3 class="font-bold text-lg mb-4">Trending Topics</h3>
133
  <ul class="space-y-3">
134
  <li>
135
- <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary">
136
  <span class="w-6 h-6 bg-blue-100 text-blue-800 rounded-full flex items-center justify-center text-xs">#</span>
137
  <span>JavaScript</span>
138
  </a>
139
  </li>
140
  <li>
141
- <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary">
142
  <span class="w-6 h-6 bg-green-100 text-green-800 rounded-full flex items-center justify-center text-xs">#</span>
143
  <span>Python</span>
144
  </a>
145
  </li>
146
  <li>
147
- <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary">
148
  <span class="w-6 h-6 bg-purple-100 text-purple-800 rounded-full flex items-center justify-center text-xs">#</span>
149
  <span>React</span>
150
  </a>
151
  </li>
152
  <li>
153
- <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary">
154
  <span class="w-6 h-6 bg-yellow-100 text-yellow-800 rounded-full flex items-center justify-center text-xs">#</span>
155
  <span>CSS</span>
156
  </a>
157
  </li>
158
  <li>
159
- <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary">
160
  <span class="w-6 h-6 bg-red-100 text-red-800 rounded-full flex items-center justify-center text-xs">#</span>
161
  <span>Node.js</span>
162
  </a>
@@ -167,7 +167,7 @@
167
  <div class="bg-white rounded-xl shadow-md p-6">
168
  <h3 class="font-bold text-lg mb-4">Popular Groups</h3>
169
  <div class="space-y-4">
170
- <div class="flex items-center gap-3">
171
  <div class="w-10 h-10 bg-gradient-to-br from-blue-400 to-cyan-500 rounded-lg"></div>
172
  <div>
173
  <h4 class="font-bold text-sm">Frontend Developers</h4>
@@ -175,7 +175,7 @@
175
  </div>
176
  </div>
177
 
178
- <div class="flex items-center gap-3">
179
  <div class="w-10 h-10 bg-gradient-to-br from-green-400 to-emerald-500 rounded-lg"></div>
180
  <div>
181
  <h4 class="font-bold text-sm">Python Enthusiasts</h4>
@@ -183,7 +183,7 @@
183
  </div>
184
  </div>
185
 
186
- <div class="flex items-center gap-3">
187
  <div class="w-10 h-10 bg-gradient-to-br from-purple-400 to-fuchsia-500 rounded-lg"></div>
188
  <div>
189
  <h4 class="font-bold text-sm">Full Stack Builders</h4>
@@ -191,7 +191,7 @@
191
  </div>
192
  </div>
193
  </div>
194
- <button class="w-full mt-4 text-primary font-medium text-sm">View All Groups</button>
195
  </div>
196
  </div>
197
  </div>
@@ -204,6 +204,55 @@
204
  <script src="script.js"></script>
205
  <script>
206
  feather.replace();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  </script>
208
  </body>
209
- </html>
 
32
  <p class="text-gray-600 mb-6">Connect with developers, share knowledge, and collaborate on projects</p>
33
 
34
  <div class="flex flex-wrap gap-4 mb-8">
35
+ <button class="bg-primary hover:bg-blue-600 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-all" onclick="createPost()">
36
  <i data-feather="plus"></i>
37
  New Post
38
  </button>
39
+ <button class="bg-secondary hover:bg-gray-800 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-all" onclick="joinGroup()">
40
  <i data-feather="users"></i>
41
  Join Group
42
  </button>
 
56
  <h2 class="text-xl font-bold text-gray-800 mb-3">Just built my first React app with Replit Clone!</h2>
57
  <p class="text-gray-600 mb-4">I'm excited to share that I just completed my first React application using Replit Clone. The integrated environment made it so easy to get started without any setup. Check out my project and let me know what you think!</p>
58
  <div class="flex gap-4 mb-4">
59
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="likePost(1)">
60
  <i data-feather="heart" class="w-4 h-4"></i>
61
+ <span id="likes-1">24</span>
62
  </button>
63
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="commentOnPost(1)">
64
  <i data-feather="message-circle" class="w-4 h-4"></i>
65
  <span>8</span>
66
  </button>
67
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="sharePost(1)">
68
  <i data-feather="share" class="w-4 h-4"></i>
69
  <span>Share</span>
70
  </button>
 
82
  <h2 class="text-xl font-bold text-gray-800 mb-3">Tips for optimizing Python code in Replit</h2>
83
  <p class="text-gray-600 mb-4">After spending some time with Replit Clone, I've discovered several tips for making Python code run faster and more efficiently. Here are my top 5 recommendations for anyone working on data processing projects...</p>
84
  <div class="flex gap-4 mb-4">
85
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="likePost(2)">
86
  <i data-feather="heart" class="w-4 h-4"></i>
87
+ <span id="likes-2">42</span>
88
  </button>
89
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="commentOnPost(2)">
90
  <i data-feather="message-circle" class="w-4 h-4"></i>
91
  <span>15</span>
92
  </button>
93
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="sharePost(2)">
94
  <i data-feather="share" class="w-4 h-4"></i>
95
  <span>Share</span>
96
  </button>
 
109
  <p class="text-gray-600 mb-4">I've been working on a data visualization dashboard using D3.js and Replit Clone. The live preview feature was incredibly helpful during development. Here's a screenshot of the final product and some insights on the process...</p>
110
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-full h-64 mb-4"></div>
111
  <div class="flex gap-4 mb-4">
112
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="likePost(3)">
113
  <i data-feather="heart" class="w-4 h-4"></i>
114
+ <span id="likes-3">56</span>
115
  </button>
116
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="commentOnPost(3)">
117
  <i data-feather="message-circle" class="w-4 h-4"></i>
118
  <span>22</span>
119
  </button>
120
+ <button class="flex items-center gap-1 text-gray-500 hover:text-primary" onclick="sharePost(3)">
121
  <i data-feather="share" class="w-4 h-4"></i>
122
  <span>Share</span>
123
  </button>
 
132
  <h3 class="font-bold text-lg mb-4">Trending Topics</h3>
133
  <ul class="space-y-3">
134
  <li>
135
+ <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary" onclick="searchTopic('JavaScript')">
136
  <span class="w-6 h-6 bg-blue-100 text-blue-800 rounded-full flex items-center justify-center text-xs">#</span>
137
  <span>JavaScript</span>
138
  </a>
139
  </li>
140
  <li>
141
+ <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary" onclick="searchTopic('Python')">
142
  <span class="w-6 h-6 bg-green-100 text-green-800 rounded-full flex items-center justify-center text-xs">#</span>
143
  <span>Python</span>
144
  </a>
145
  </li>
146
  <li>
147
+ <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary" onclick="searchTopic('React')">
148
  <span class="w-6 h-6 bg-purple-100 text-purple-800 rounded-full flex items-center justify-center text-xs">#</span>
149
  <span>React</span>
150
  </a>
151
  </li>
152
  <li>
153
+ <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary" onclick="searchTopic('CSS')">
154
  <span class="w-6 h-6 bg-yellow-100 text-yellow-800 rounded-full flex items-center justify-center text-xs">#</span>
155
  <span>CSS</span>
156
  </a>
157
  </li>
158
  <li>
159
+ <a href="#" class="flex items-center gap-2 text-gray-700 hover:text-primary" onclick="searchTopic('Node.js')">
160
  <span class="w-6 h-6 bg-red-100 text-red-800 rounded-full flex items-center justify-center text-xs">#</span>
161
  <span>Node.js</span>
162
  </a>
 
167
  <div class="bg-white rounded-xl shadow-md p-6">
168
  <h3 class="font-bold text-lg mb-4">Popular Groups</h3>
169
  <div class="space-y-4">
170
+ <div class="flex items-center gap-3 cursor-pointer" onclick="joinGroup('frontend')">
171
  <div class="w-10 h-10 bg-gradient-to-br from-blue-400 to-cyan-500 rounded-lg"></div>
172
  <div>
173
  <h4 class="font-bold text-sm">Frontend Developers</h4>
 
175
  </div>
176
  </div>
177
 
178
+ <div class="flex items-center gap-3 cursor-pointer" onclick="joinGroup('python')">
179
  <div class="w-10 h-10 bg-gradient-to-br from-green-400 to-emerald-500 rounded-lg"></div>
180
  <div>
181
  <h4 class="font-bold text-sm">Python Enthusiasts</h4>
 
183
  </div>
184
  </div>
185
 
186
+ <div class="flex items-center gap-3 cursor-pointer" onclick="joinGroup('fullstack')">
187
  <div class="w-10 h-10 bg-gradient-to-br from-purple-400 to-fuchsia-500 rounded-lg"></div>
188
  <div>
189
  <h4 class="font-bold text-sm">Full Stack Builders</h4>
 
191
  </div>
192
  </div>
193
  </div>
194
+ <button class="w-full mt-4 text-primary font-medium text-sm" onclick="viewAllGroups()">View All Groups</button>
195
  </div>
196
  </div>
197
  </div>
 
204
  <script src="script.js"></script>
205
  <script>
206
  feather.replace();
207
+
208
+ // Interactive community functions
209
+ function createPost() {
210
+ const post = prompt("What would you like to share with the community?");
211
+ if (post) {
212
+ alert("Post created successfully!");
213
+ // In a real app, this would add the post to the feed
214
+ }
215
+ }
216
+
217
+ function joinGroup(group) {
218
+ if (group) {
219
+ alert(`Joining group: ${group}`);
220
+ } else {
221
+ alert("Joining a group...");
222
+ }
223
+ // In a real app, this would join the user to a group
224
+ }
225
+
226
+ function likePost(postId) {
227
+ const likesElement = document.getElementById(`likes-${postId}`);
228
+ const currentLikes = parseInt(likesElement.textContent);
229
+ likesElement.textContent = currentLikes + 1;
230
+
231
+ // In a real app, this would send the like to the server
232
+ }
233
+
234
+ function commentOnPost(postId) {
235
+ const comment = prompt("Enter your comment:");
236
+ if (comment) {
237
+ alert("Comment added!");
238
+ // In a real app, this would add the comment to the post
239
+ }
240
+ }
241
+
242
+ function sharePost(postId) {
243
+ alert("Post shared!");
244
+ // In a real app, this would open sharing options
245
+ }
246
+
247
+ function searchTopic(topic) {
248
+ alert(`Searching for posts about: ${topic}`);
249
+ // In a real app, this would filter posts by topic
250
+ }
251
+
252
+ function viewAllGroups() {
253
+ alert("Viewing all groups...");
254
+ // In a real app, this would navigate to the groups page
255
+ }
256
  </script>
257
  </body>
258
+ </html>
components/ai-agent.js CHANGED
@@ -1,3 +1,4 @@
 
1
  class AIAgent extends HTMLElement {
2
  constructor() {
3
  super();
@@ -357,47 +358,39 @@ class AIAgent extends HTMLElement {
357
  }
358
 
359
  async callGrokAPI(message) {
360
- // In a real implementation, you would call the Grok API here
361
- // This is a simulation for demonstration purposes
362
-
363
- return new Promise((resolve) => {
364
- setTimeout(() => {
365
- const responses = [
366
- "I can help you with that! Based on your project structure, I recommend organizing your code into modules for better maintainability.",
367
- "That's a great question! For this scenario, you might want to consider using a design pattern like Observer or Factory depending on your specific needs.",
368
- "I see you're working with JavaScript. Have you considered using modern ES6+ features like arrow functions and destructuring to make your code more concise?",
369
- "Debugging tip: Try using console.log statements strategically placed in your code to trace the execution flow and variable values.",
370
- "For performance optimization, consider lazy loading components that aren't immediately visible to the user.",
371
- "Security best practice: Always validate and sanitize user inputs on both client and server sides to prevent injection attacks."
372
- ];
373
-
374
- resolve(responses[Math.floor(Math.random() * responses.length)]);
375
- }, 1500);
376
- });
377
 
378
- /*
379
- // Real API call example (uncomment and configure with actual credentials):
380
- const response = await fetch('https://api.x.ai/v1/chat/completions', {
381
- method: 'POST',
382
- headers: {
383
- 'Authorization': 'Bearer YOUR_API_KEY_HERE',
384
- 'Content-Type': 'application/json'
385
- },
386
- body: JSON.stringify({
387
- model: 'grok-4',
388
- messages: [
389
- ...this.conversation,
390
- { role: 'user', content: message }
391
- ],
392
- temperature: 0.7,
393
- max_tokens: 500
394
- })
395
- });
396
-
397
- const data = await response.json();
398
- return data.choices[0].message.content;
399
- */
 
 
 
 
 
 
 
400
  }
401
  }
402
 
403
- customElements.define('ai-agent', AIAgent);
 
1
+
2
  class AIAgent extends HTMLElement {
3
  constructor() {
4
  super();
 
358
  }
359
 
360
  async callGrokAPI(message) {
361
+ // Real API call to Grok
362
+ const API_KEY = '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';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
 
364
+ try {
365
+ const response = await fetch('https://api.x.ai/v1/chat/completions', {
366
+ method: 'POST',
367
+ headers: {
368
+ 'Authorization': `Bearer ${API_KEY}`,
369
+ 'Content-Type': 'application/json'
370
+ },
371
+ body: JSON.stringify({
372
+ model: 'grok-4',
373
+ messages: [
374
+ { role: 'system', content: 'You are a helpful AI coding assistant. Provide concise, accurate coding advice and explanations.' },
375
+ ...this.conversation.filter(msg => msg.role !== 'assistant' || msg.content !== 'Sorry, I encountered an error. Please try again.'),
376
+ { role: 'user', content: message }
377
+ ],
378
+ temperature: 0.7,
379
+ max_tokens: 500
380
+ })
381
+ });
382
+
383
+ if (!response.ok) {
384
+ throw new Error(`API request failed with status ${response.status}`);
385
+ }
386
+
387
+ const data = await response.json();
388
+ return data.choices[0].message.content;
389
+ } catch (error) {
390
+ console.error('Error calling Grok API:', error);
391
+ return 'Sorry, I encountered an error connecting to the AI service. Please try again later.';
392
+ }
393
  }
394
  }
395
 
396
+ customElements.define('ai-agent', AIAgent);
docs.html CHANGED
@@ -63,19 +63,30 @@
63
  <li>Start coding in the editor</li>
64
  </ol>
65
 
 
 
 
 
 
 
 
 
 
 
 
66
  <h3 class="text-xl font-semibold text-gray-800 mb-3">Interface Overview</h3>
67
  <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
68
- <div class="border border-gray-200 rounded-lg p-4">
69
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-3"></div>
70
  <h4 class="font-bold mb-2">Editor</h4>
71
  <p class="text-gray-600 text-sm">Write and edit your code with syntax highlighting</p>
72
  </div>
73
- <div class="border border-gray-200 rounded-lg p-4">
74
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-3"></div>
75
  <h4 class="font-bold mb-2">Console</h4>
76
  <p class="text-gray-600 text-sm">See output and debug information</p>
77
  </div>
78
- <div class="border border-gray-200 rounded-lg p-4">
79
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-3"></div>
80
  <h4 class="font-bold mb-2">Preview</h4>
81
  <p class="text-gray-600 text-sm">View your application in real-time</p>
@@ -96,6 +107,19 @@
96
  <div class="bg-green-50 border-l-4 border-green-500 p-4 mb-6">
97
  <p class="text-green-700">Pro Tip: You can save your own projects as templates for future use!</p>
98
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  </div>
100
 
101
  <div id="languages" class="mb-12">
@@ -122,6 +146,16 @@
122
  </div>
123
 
124
  <p class="text-gray-600">More languages are added regularly based on community demand.</p>
 
 
 
 
 
 
 
 
 
 
125
  </div>
126
  </div>
127
  </div>
@@ -135,6 +169,30 @@
135
  <script src="script.js"></script>
136
  <script>
137
  feather.replace();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  </script>
139
  </body>
140
- </html>
 
63
  <li>Start coding in the editor</li>
64
  </ol>
65
 
66
+ <div class="flex gap-4 mb-6">
67
+ <button class="bg-primary hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center gap-2" onclick="createReplFromDocs()">
68
+ <i data-feather="plus"></i>
69
+ Create Repl
70
+ </button>
71
+ <button class="bg-secondary hover:bg-gray-800 text-white px-4 py-2 rounded-lg flex items-center gap-2" onclick="showTemplates()">
72
+ <i data-feather="layout"></i>
73
+ View Templates
74
+ </button>
75
+ </div>
76
+
77
  <h3 class="text-xl font-semibold text-gray-800 mb-3">Interface Overview</h3>
78
  <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
79
+ <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer" onclick="showSection('editor')">
80
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-3"></div>
81
  <h4 class="font-bold mb-2">Editor</h4>
82
  <p class="text-gray-600 text-sm">Write and edit your code with syntax highlighting</p>
83
  </div>
84
+ <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer" onclick="showSection('console')">
85
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-3"></div>
86
  <h4 class="font-bold mb-2">Console</h4>
87
  <p class="text-gray-600 text-sm">See output and debug information</p>
88
  </div>
89
+ <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer" onclick="showSection('preview')">
90
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-3"></div>
91
  <h4 class="font-bold mb-2">Preview</h4>
92
  <p class="text-gray-600 text-sm">View your application in real-time</p>
 
107
  <div class="bg-green-50 border-l-4 border-green-500 p-4 mb-6">
108
  <p class="text-green-700">Pro Tip: You can save your own projects as templates for future use!</p>
109
  </div>
110
+
111
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
112
+ <div class="border border-gray-200 rounded-lg p-4 hover:bg-gray-50 cursor-pointer" onclick="useTemplate('web')">
113
+ <h4 class="font-bold mb-2">Web Development</h4>
114
+ <p class="text-gray-600 text-sm mb-3">HTML, CSS, JavaScript starter template</p>
115
+ <button class="text-primary text-sm font-medium">Use Template</button>
116
+ </div>
117
+ <div class="border border-gray-200 rounded-lg p-4 hover:bg-gray-50 cursor-pointer" onclick="useTemplate('python')">
118
+ <h4 class="font-bold mb-2">Python Starter</h4>
119
+ <p class="text-gray-600 text-sm mb-3">Beginner-friendly Python template</p>
120
+ <button class="text-primary text-sm font-medium">Use Template</button>
121
+ </div>
122
+ </div>
123
  </div>
124
 
125
  <div id="languages" class="mb-12">
 
146
  </div>
147
 
148
  <p class="text-gray-600">More languages are added regularly based on community demand.</p>
149
+
150
+ <div class="mt-6">
151
+ <h3 class="text-lg font-semibold mb-3">Language-Specific Guides</h3>
152
+ <div class="flex flex-wrap gap-2">
153
+ <button class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm hover:bg-blue-200" onclick="showLanguageGuide('javascript')">JavaScript</button>
154
+ <button class="bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm hover:bg-green-200" onclick="showLanguageGuide('python')">Python</button>
155
+ <button class="bg-red-100 text-red-800 px-3 py-1 rounded-full text-sm hover:bg-red-200" onclick="showLanguageGuide('html')">HTML/CSS</button>
156
+ <button class="bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full text-sm hover:bg-yellow-200" onclick="showLanguageGuide('java')">Java</button>
157
+ </div>
158
+ </div>
159
  </div>
160
  </div>
161
  </div>
 
169
  <script src="script.js"></script>
170
  <script>
171
  feather.replace();
172
+
173
+ // Interactive documentation functions
174
+ function createReplFromDocs() {
175
+ window.location.href = 'editor.html';
176
+ }
177
+
178
+ function showTemplates() {
179
+ alert('Showing templates...');
180
+ // In a real app, this would navigate to the templates page
181
+ }
182
+
183
+ function showSection(section) {
184
+ alert(`Showing ${section} section details...`);
185
+ // In a real app, this would expand/collapse sections or show modals
186
+ }
187
+
188
+ function useTemplate(template) {
189
+ window.location.href = `editor.html?template=${template}`;
190
+ }
191
+
192
+ function showLanguageGuide(language) {
193
+ alert(`Showing ${language} guide...`);
194
+ // In a real app, this would filter or show specific language documentation
195
+ }
196
  </script>
197
  </body>
198
+ </html>
editor.html CHANGED
@@ -34,33 +34,33 @@
34
 
35
  <div class="flex-1 overflow-y-auto">
36
  <div class="p-2">
37
- <div class="flex items-center justify-between p-2 hover:bg-gray-700 rounded cursor-pointer">
38
  <div class="flex items-center gap-2">
39
  <i data-feather="folder" class="w-4 h-4 text-blue-400"></i>
40
  <span>src</span>
41
  </div>
42
- <i data-feather="chevron-down" class="w-4 h-4"></i>
43
  </div>
44
- <div class="ml-6">
45
- <div class="flex items-center gap-2 p-2 hover:bg-gray-700 rounded cursor-pointer">
46
  <i data-feather="file" class="w-4 h-4 text-yellow-400"></i>
47
  <span>index.js</span>
48
  </div>
49
- <div class="flex items-center gap-2 p-2 hover:bg-gray-700 rounded cursor-pointer">
50
  <i data-feather="file" class="w-4 h-4 text-blue-400"></i>
51
  <span>styles.css</span>
52
  </div>
53
  </div>
54
 
55
- <div class="flex items-center justify-between p-2 hover:bg-gray-700 rounded cursor-pointer">
56
  <div class="flex items-center gap-2">
57
  <i data-feather="folder" class="w-4 h-4 text-blue-400"></i>
58
  <span>public</span>
59
  </div>
60
- <i data-feather="chevron-down" class="w-4 h-4"></i>
61
  </div>
62
- <div class="ml-6">
63
- <div class="flex items-center gap-2 p-2 hover:bg-gray-700 rounded cursor-pointer">
64
  <i data-feather="file" class="w-4 h-4 text-green-400"></i>
65
  <span>index.html</span>
66
  </div>
@@ -69,7 +69,7 @@
69
  </div>
70
 
71
  <div class="p-4 border-t border-gray-700">
72
- <button class="w-full bg-primary hover:bg-blue-600 text-white py-2 rounded-lg flex items-center justify-center gap-2">
73
  <i data-feather="play"></i>
74
  Run
75
  </button>
@@ -82,10 +82,10 @@
82
  <div class="flex bg-gray-800 border-b border-gray-700">
83
  <div class="px-4 py-2 bg-gray-700 border-r border-gray-600 flex items-center gap-2">
84
  <i data-feather="file" class="w-4 h-4"></i>
85
- <span>index.js</span>
86
- <i data-feather="x" class="w-4 h-4 cursor-pointer hover:bg-gray-600 rounded"></i>
87
  </div>
88
- <div class="px-4 py-2 flex items-center gap-2 text-gray-400 hover:bg-gray-700 cursor-pointer">
89
  <i data-feather="plus" class="w-4 h-4"></i>
90
  </div>
91
  </div>
@@ -99,19 +99,19 @@
99
  <div class="flex items-center gap-4">
100
  <span class="font-medium">Console</span>
101
  <div class="flex gap-2">
102
- <button class="text-gray-400 hover:text-white">
103
  <i data-feather="terminal" class="w-4 h-4"></i>
104
  </button>
105
- <button class="text-gray-400 hover:text-white">
106
  <i data-feather="layers" class="w-4 h-4"></i>
107
  </button>
108
  </div>
109
  </div>
110
- <button class="text-gray-400 hover:text-white">
111
  <i data-feather="trash-2" class="w-4 h-4"></i>
112
  </button>
113
  </div>
114
- <div class="flex-1 p-2 font-mono text-sm overflow-y-auto">
115
  <div class="text-green-400">$ npm start</div>
116
  <div>> Starting development server...</div>
117
  <div>> Compiled successfully!</div>
@@ -129,10 +129,15 @@
129
  <script>
130
  feather.replace();
131
 
 
 
 
 
 
132
  // Initialize Monaco Editor
133
  require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs' }});
134
  require(['vs/editor/editor.main'], function() {
135
- var editor = monaco.editor.create(document.getElementById('editor'), {
136
  value: [
137
  '// Welcome to Replit Clone!',
138
  '// Start coding your amazing project here.',
@@ -158,6 +163,67 @@
158
  const urlParams = new URLSearchParams(window.location.search);
159
  const projectName = urlParams.get('project') || urlParams.get('template') || 'New Project';
160
  document.getElementById('projectName').textContent = projectName.charAt(0).toUpperCase() + projectName.slice(1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  </script>
162
  </body>
163
- </html>
 
34
 
35
  <div class="flex-1 overflow-y-auto">
36
  <div class="p-2">
37
+ <div class="flex items-center justify-between p-2 hover:bg-gray-700 rounded cursor-pointer" onclick="toggleFolder('src')">
38
  <div class="flex items-center gap-2">
39
  <i data-feather="folder" class="w-4 h-4 text-blue-400"></i>
40
  <span>src</span>
41
  </div>
42
+ <i data-feather="chevron-down" class="w-4 h-4" id="src-chevron"></i>
43
  </div>
44
+ <div class="ml-6" id="src-folder">
45
+ <div class="flex items-center gap-2 p-2 hover:bg-gray-700 rounded cursor-pointer" onclick="openFile('index.js')">
46
  <i data-feather="file" class="w-4 h-4 text-yellow-400"></i>
47
  <span>index.js</span>
48
  </div>
49
+ <div class="flex items-center gap-2 p-2 hover:bg-gray-700 rounded cursor-pointer" onclick="openFile('styles.css')">
50
  <i data-feather="file" class="w-4 h-4 text-blue-400"></i>
51
  <span>styles.css</span>
52
  </div>
53
  </div>
54
 
55
+ <div class="flex items-center justify-between p-2 hover:bg-gray-700 rounded cursor-pointer" onclick="toggleFolder('public')">
56
  <div class="flex items-center gap-2">
57
  <i data-feather="folder" class="w-4 h-4 text-blue-400"></i>
58
  <span>public</span>
59
  </div>
60
+ <i data-feather="chevron-down" class="w-4 h-4" id="public-chevron"></i>
61
  </div>
62
+ <div class="ml-6" id="public-folder">
63
+ <div class="flex items-center gap-2 p-2 hover:bg-gray-700 rounded cursor-pointer" onclick="openFile('index.html')">
64
  <i data-feather="file" class="w-4 h-4 text-green-400"></i>
65
  <span>index.html</span>
66
  </div>
 
69
  </div>
70
 
71
  <div class="p-4 border-t border-gray-700">
72
+ <button class="w-full bg-primary hover:bg-blue-600 text-white py-2 rounded-lg flex items-center justify-center gap-2" onclick="runCode()">
73
  <i data-feather="play"></i>
74
  Run
75
  </button>
 
82
  <div class="flex bg-gray-800 border-b border-gray-700">
83
  <div class="px-4 py-2 bg-gray-700 border-r border-gray-600 flex items-center gap-2">
84
  <i data-feather="file" class="w-4 h-4"></i>
85
+ <span id="current-file">index.js</span>
86
+ <i data-feather="x" class="w-4 h-4 cursor-pointer hover:bg-gray-600 rounded" onclick="closeTab()"></i>
87
  </div>
88
+ <div class="px-4 py-2 flex items-center gap-2 text-gray-400 hover:bg-gray-700 cursor-pointer" onclick="newFile()">
89
  <i data-feather="plus" class="w-4 h-4"></i>
90
  </div>
91
  </div>
 
99
  <div class="flex items-center gap-4">
100
  <span class="font-medium">Console</span>
101
  <div class="flex gap-2">
102
+ <button class="text-gray-400 hover:text-white" onclick="clearConsole()">
103
  <i data-feather="terminal" class="w-4 h-4"></i>
104
  </button>
105
+ <button class="text-gray-400 hover:text-white" onclick="toggleConsoleView()">
106
  <i data-feather="layers" class="w-4 h-4"></i>
107
  </button>
108
  </div>
109
  </div>
110
+ <button class="text-gray-400 hover:text-white" onclick="clearConsole()">
111
  <i data-feather="trash-2" class="w-4 h-4"></i>
112
  </button>
113
  </div>
114
+ <div class="flex-1 p-2 font-mono text-sm overflow-y-auto" id="console-output">
115
  <div class="text-green-400">$ npm start</div>
116
  <div>> Starting development server...</div>
117
  <div>> Compiled successfully!</div>
 
129
  <script>
130
  feather.replace();
131
 
132
+ // Global variables
133
+ let editor;
134
+ let currentFile = 'index.js';
135
+ let consoleOutput = document.getElementById('console-output');
136
+
137
  // Initialize Monaco Editor
138
  require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs' }});
139
  require(['vs/editor/editor.main'], function() {
140
+ editor = monaco.editor.create(document.getElementById('editor'), {
141
  value: [
142
  '// Welcome to Replit Clone!',
143
  '// Start coding your amazing project here.',
 
163
  const urlParams = new URLSearchParams(window.location.search);
164
  const projectName = urlParams.get('project') || urlParams.get('template') || 'New Project';
165
  document.getElementById('projectName').textContent = projectName.charAt(0).toUpperCase() + projectName.slice(1);
166
+
167
+ // Interactive functions
168
+ function toggleFolder(folderName) {
169
+ const folder = document.getElementById(`${folderName}-folder`);
170
+ const chevron = document.getElementById(`${folderName}-chevron`);
171
+
172
+ if (folder.style.display === 'none') {
173
+ folder.style.display = 'block';
174
+ chevron.setAttribute('data-feather', 'chevron-down');
175
+ } else {
176
+ folder.style.display = 'none';
177
+ chevron.setAttribute('data-feather', 'chevron-right');
178
+ }
179
+
180
+ feather.replace();
181
+ }
182
+
183
+ function openFile(filename) {
184
+ currentFile = filename;
185
+ document.getElementById('current-file').textContent = filename;
186
+
187
+ // In a real app, this would load the file content
188
+ if (editor) {
189
+ if (filename.endsWith('.js')) {
190
+ editor.setModelLanguage(editor.getModel(), 'javascript');
191
+ } else if (filename.endsWith('.css')) {
192
+ editor.setModelLanguage(editor.getModel(), 'css');
193
+ } else if (filename.endsWith('.html')) {
194
+ editor.setModelLanguage(editor.getModel(), 'html');
195
+ }
196
+ }
197
+ }
198
+
199
+ function closeTab() {
200
+ alert('Closing tab...');
201
+ }
202
+
203
+ function newFile() {
204
+ const filename = prompt('Enter new file name:');
205
+ if (filename) {
206
+ alert(`Creating new file: ${filename}`);
207
+ // In a real app, this would create a new file
208
+ }
209
+ }
210
+
211
+ function runCode() {
212
+ // Simulate code execution
213
+ const output = document.createElement('div');
214
+ output.textContent = '> Code executed successfully!';
215
+ output.className = 'text-green-400';
216
+ consoleOutput.appendChild(output);
217
+ consoleOutput.scrollTop = consoleOutput.scrollHeight;
218
+ }
219
+
220
+ function clearConsole() {
221
+ consoleOutput.innerHTML = '';
222
+ }
223
+
224
+ function toggleConsoleView() {
225
+ alert('Toggling console view...');
226
+ }
227
  </script>
228
  </body>
229
+ </html>
index.html CHANGED
@@ -35,7 +35,7 @@
35
  <i data-feather="plus"></i>
36
  Create Repl
37
  </a>
38
- <button class="bg-secondary hover:bg-gray-800 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-all">
39
  <i data-feather="folder"></i>
40
  Import from GitHub
41
  </button>
@@ -45,31 +45,31 @@
45
  <div class="bg-white rounded-xl shadow-md p-6 mb-8">
46
  <h2 class="text-2xl font-bold text-gray-800 mb-6">Popular Templates</h2>
47
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
48
- <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
49
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-4"></div>
50
  <h3 class="font-bold text-lg mb-2">Python Starter</h3>
51
  <p class="text-gray-600 text-sm mb-4">Begin your Python journey with this template</p>
52
- <a href="editor.html?template=python" class="text-primary font-medium flex items-center gap-1">
53
  Use Template
54
  <i data-feather="arrow-right" class="w-4 h-4"></i>
55
  </a>
56
  </div>
57
 
58
- <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
59
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-4"></div>
60
  <h3 class="font-bold text-lg mb-2">Web Development</h3>
61
  <p class="text-gray-600 text-sm mb-4">HTML, CSS, and JS template for web projects</p>
62
- <a href="editor.html?template=web" class="text-primary font-medium flex items-center gap-1">
63
  Use Template
64
  <i data-feather="arrow-right" class="w-4 h-4"></i>
65
  </a>
66
  </div>
67
 
68
- <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
69
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-4"></div>
70
  <h3 class="font-bold text-lg mb-2">Node.js API</h3>
71
  <p class="text-gray-600 text-sm mb-4">Build REST APIs with Express.js</p>
72
- <a href="editor.html?template=node" class="text-primary font-medium flex items-center gap-1">
73
  Use Template
74
  <i data-feather="arrow-right" class="w-4 h-4"></i>
75
  </a>
@@ -83,47 +83,47 @@
83
  <a href="#" class="text-primary font-medium">View All</a>
84
  </div>
85
  <div class="space-y-4">
86
- <div class="flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50">
87
  <div class="flex items-center gap-4">
88
  <div class="bg-blue-100 p-3 rounded-lg">
89
  <i data-feather="code" class="text-primary"></i>
90
  </div>
91
  <div>
92
- <a href="editor.html?project=my-website" class="font-bold hover:text-primary">My Website</a>
93
  <p class="text-gray-600 text-sm">Last edited 2 hours ago</p>
94
  </div>
95
  </div>
96
- <button class="text-gray-500 hover:text-gray-700">
97
  <i data-feather="more-vertical"></i>
98
  </button>
99
  </div>
100
 
101
- <div class="flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50">
102
  <div class="flex items-center gap-4">
103
  <div class="bg-green-100 p-3 rounded-lg">
104
  <i data-feather="database" class="text-green-600"></i>
105
  </div>
106
  <div>
107
- <a href="editor.html?project=data-analysis" class="font-bold hover:text-primary">Data Analysis</a>
108
  <p class="text-gray-600 text-sm">Last edited yesterday</p>
109
  </div>
110
  </div>
111
- <button class="text-gray-500 hover:text-gray-700">
112
  <i data-feather="more-vertical"></i>
113
  </button>
114
  </div>
115
 
116
- <div class="flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50">
117
  <div class="flex items-center gap-4">
118
  <div class="bg-purple-100 p-3 rounded-lg">
119
  <i data-feather="smartphone" class="text-purple-600"></i>
120
  </div>
121
  <div>
122
- <a href="editor.html?project=mobile-app" class="font-bold hover:text-primary">Mobile App</a>
123
  <p class="text-gray-600 text-sm">Last edited 3 days ago</p>
124
  </div>
125
  </div>
126
- <button class="text-gray-500 hover:text-gray-700">
127
  <i data-feather="more-vertical"></i>
128
  </button>
129
  </div>
@@ -180,7 +180,7 @@
180
  <span class="text-sm">Private Repls</span>
181
  </li>
182
  </ul>
183
- <button class="w-full bg-gradient-to-r from-blue-500 to-purple-600 text-white py-2 rounded-lg font-medium">
184
  Upgrade Now
185
  </button>
186
  </div>
@@ -197,6 +197,34 @@
197
  <script src="script.js"></script>
198
  <script>
199
  feather.replace();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  </script>
201
  <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
202
  </body>
 
35
  <i data-feather="plus"></i>
36
  Create Repl
37
  </a>
38
+ <button class="bg-secondary hover:bg-gray-800 text-white px-6 py-3 rounded-lg flex items-center gap-2 transition-all" onclick="importFromGitHub()">
39
  <i data-feather="folder"></i>
40
  Import from GitHub
41
  </button>
 
45
  <div class="bg-white rounded-xl shadow-md p-6 mb-8">
46
  <h2 class="text-2xl font-bold text-gray-800 mb-6">Popular Templates</h2>
47
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
48
+ <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer" onclick="useTemplate('python')">
49
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-4"></div>
50
  <h3 class="font-bold text-lg mb-2">Python Starter</h3>
51
  <p class="text-gray-600 text-sm mb-4">Begin your Python journey with this template</p>
52
+ <a href="#" class="text-primary font-medium flex items-center gap-1">
53
  Use Template
54
  <i data-feather="arrow-right" class="w-4 h-4"></i>
55
  </a>
56
  </div>
57
 
58
+ <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer" onclick="useTemplate('web')">
59
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-4"></div>
60
  <h3 class="font-bold text-lg mb-2">Web Development</h3>
61
  <p class="text-gray-600 text-sm mb-4">HTML, CSS, and JS template for web projects</p>
62
+ <a href="#" class="text-primary font-medium flex items-center gap-1">
63
  Use Template
64
  <i data-feather="arrow-right" class="w-4 h-4"></i>
65
  </a>
66
  </div>
67
 
68
+ <div class="border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow cursor-pointer" onclick="useTemplate('node')">
69
  <div class="bg-gray-200 border-2 border-dashed rounded-xl w-16 h-16 mb-4"></div>
70
  <h3 class="font-bold text-lg mb-2">Node.js API</h3>
71
  <p class="text-gray-600 text-sm mb-4">Build REST APIs with Express.js</p>
72
+ <a href="#" class="text-primary font-medium flex items-center gap-1">
73
  Use Template
74
  <i data-feather="arrow-right" class="w-4 h-4"></i>
75
  </a>
 
83
  <a href="#" class="text-primary font-medium">View All</a>
84
  </div>
85
  <div class="space-y-4">
86
+ <div class="flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer" onclick="openProject('my-website')">
87
  <div class="flex items-center gap-4">
88
  <div class="bg-blue-100 p-3 rounded-lg">
89
  <i data-feather="code" class="text-primary"></i>
90
  </div>
91
  <div>
92
+ <a href="#" class="font-bold hover:text-primary">My Website</a>
93
  <p class="text-gray-600 text-sm">Last edited 2 hours ago</p>
94
  </div>
95
  </div>
96
+ <button class="text-gray-500 hover:text-gray-700" onclick="event.stopPropagation(); showProjectOptions('my-website')">
97
  <i data-feather="more-vertical"></i>
98
  </button>
99
  </div>
100
 
101
+ <div class="flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer" onclick="openProject('data-analysis')">
102
  <div class="flex items-center gap-4">
103
  <div class="bg-green-100 p-3 rounded-lg">
104
  <i data-feather="database" class="text-green-600"></i>
105
  </div>
106
  <div>
107
+ <a href="#" class="font-bold hover:text-primary">Data Analysis</a>
108
  <p class="text-gray-600 text-sm">Last edited yesterday</p>
109
  </div>
110
  </div>
111
+ <button class="text-gray-500 hover:text-gray-700" onclick="event.stopPropagation(); showProjectOptions('data-analysis')">
112
  <i data-feather="more-vertical"></i>
113
  </button>
114
  </div>
115
 
116
+ <div class="flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer" onclick="openProject('mobile-app')">
117
  <div class="flex items-center gap-4">
118
  <div class="bg-purple-100 p-3 rounded-lg">
119
  <i data-feather="smartphone" class="text-purple-600"></i>
120
  </div>
121
  <div>
122
+ <a href="#" class="font-bold hover:text-primary">Mobile App</a>
123
  <p class="text-gray-600 text-sm">Last edited 3 days ago</p>
124
  </div>
125
  </div>
126
+ <button class="text-gray-500 hover:text-gray-700" onclick="event.stopPropagation(); showProjectOptions('mobile-app')">
127
  <i data-feather="more-vertical"></i>
128
  </button>
129
  </div>
 
180
  <span class="text-sm">Private Repls</span>
181
  </li>
182
  </ul>
183
+ <button class="w-full bg-gradient-to-r from-blue-500 to-purple-600 text-white py-2 rounded-lg font-medium" onclick="upgradeToPro()">
184
  Upgrade Now
185
  </button>
186
  </div>
 
197
  <script src="script.js"></script>
198
  <script>
199
  feather.replace();
200
+
201
+ // Interactive functions
202
+ function importFromGitHub() {
203
+ const repo = prompt("Enter GitHub repository URL:");
204
+ if (repo) {
205
+ alert(`Importing repository: ${repo}\nThis would normally clone the repo to your workspace.`);
206
+ }
207
+ }
208
+
209
+ function useTemplate(template) {
210
+ window.location.href = `editor.html?template=${template}`;
211
+ }
212
+
213
+ function openProject(project) {
214
+ window.location.href = `editor.html?project=${project}`;
215
+ }
216
+
217
+ function showProjectOptions(project) {
218
+ const action = confirm(`Options for ${project}:\n- Rename\n- Duplicate\n- Delete\n- Share\n\nWould you like to delete this project?`);
219
+ if (action) {
220
+ alert(`Project ${project} has been deleted.`);
221
+ }
222
+ }
223
+
224
+ function upgradeToPro() {
225
+ alert("Redirecting to subscription page...");
226
+ // In a real app, this would redirect to a payment page
227
+ }
228
  </script>
229
  <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
230
  </body>
support.html CHANGED
@@ -30,7 +30,7 @@
30
  </div>
31
 
32
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
33
- <div class="bg-white rounded-xl shadow-md p-6">
34
  <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
35
  <i data-feather="book" class="text-blue-600 w-6 h-6"></i>
36
  </div>
@@ -39,7 +39,7 @@
39
  <a href="docs.html" class="text-primary font-medium">Browse Documentation</a>
40
  </div>
41
 
42
- <div class="bg-white rounded-xl shadow-md p-6">
43
  <div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-4">
44
  <i data-feather="help-circle" class="text-green-600 w-6 h-6"></i>
45
  </div>
@@ -48,7 +48,7 @@
48
  <a href="#" class="text-primary font-medium">View FAQ</a>
49
  </div>
50
 
51
- <div class="bg-white rounded-xl shadow-md p-6">
52
  <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
53
  <i data-feather="message-circle" class="text-purple-600 w-6 h-6"></i>
54
  </div>
@@ -60,32 +60,33 @@
60
 
61
  <div class="bg-white rounded-xl shadow-md p-8">
62
  <h2 class="text-2xl font-bold text-gray-800 mb-6">Contact Support</h2>
63
- <form class="max-w-2xl">
64
  <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
65
  <div>
66
  <label class="block text-gray-700 font-medium mb-2" for="name">Name</label>
67
- <input type="text" id="name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Your name">
68
  </div>
69
  <div>
70
  <label class="block text-gray-700 font-medium mb-2" for="email">Email</label>
71
- <input type="email" id="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="your.email@example.com">
72
  </div>
73
  </div>
74
 
75
  <div class="mb-6">
76
  <label class="block text-gray-700 font-medium mb-2" for="subject">Subject</label>
77
- <select id="subject" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent">
78
- <option>Technical Issue</option>
79
- <option>Billing Question</option>
80
- <option>Feature Request</option>
81
- <option>Account Problem</option>
82
- <option>Other</option>
 
83
  </select>
84
  </div>
85
 
86
  <div class="mb-6">
87
  <label class="block text-gray-700 font-medium mb-2" for="message">Message</label>
88
- <textarea id="message" rows="5" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Describe your issue or question..."></textarea>
89
  </div>
90
 
91
  <button type="submit" class="bg-primary hover:bg-blue-600 text-white px-6 py-3 rounded-lg font-medium transition-all">
@@ -102,6 +103,37 @@
102
  <script src="script.js"></script>
103
  <script>
104
  feather.replace();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  </script>
106
  </body>
107
- </html>
 
30
  </div>
31
 
32
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
33
+ <div class="bg-white rounded-xl shadow-md p-6 cursor-pointer" onclick="browseDocumentation()">
34
  <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
35
  <i data-feather="book" class="text-blue-600 w-6 h-6"></i>
36
  </div>
 
39
  <a href="docs.html" class="text-primary font-medium">Browse Documentation</a>
40
  </div>
41
 
42
+ <div class="bg-white rounded-xl shadow-md p-6 cursor-pointer" onclick="viewFAQ()">
43
  <div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-4">
44
  <i data-feather="help-circle" class="text-green-600 w-6 h-6"></i>
45
  </div>
 
48
  <a href="#" class="text-primary font-medium">View FAQ</a>
49
  </div>
50
 
51
+ <div class="bg-white rounded-xl shadow-md p-6 cursor-pointer" onclick="visitCommunity()">
52
  <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
53
  <i data-feather="message-circle" class="text-purple-600 w-6 h-6"></i>
54
  </div>
 
60
 
61
  <div class="bg-white rounded-xl shadow-md p-8">
62
  <h2 class="text-2xl font-bold text-gray-800 mb-6">Contact Support</h2>
63
+ <form class="max-w-2xl" id="support-form">
64
  <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
65
  <div>
66
  <label class="block text-gray-700 font-medium mb-2" for="name">Name</label>
67
+ <input type="text" id="name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Your name" required>
68
  </div>
69
  <div>
70
  <label class="block text-gray-700 font-medium mb-2" for="email">Email</label>
71
+ <input type="email" id="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="your.email@example.com" required>
72
  </div>
73
  </div>
74
 
75
  <div class="mb-6">
76
  <label class="block text-gray-700 font-medium mb-2" for="subject">Subject</label>
77
+ <select id="subject" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" required>
78
+ <option value="">Select a subject</option>
79
+ <option value="technical">Technical Issue</option>
80
+ <option value="billing">Billing Question</option>
81
+ <option value="feature">Feature Request</option>
82
+ <option value="account">Account Problem</option>
83
+ <option value="other">Other</option>
84
  </select>
85
  </div>
86
 
87
  <div class="mb-6">
88
  <label class="block text-gray-700 font-medium mb-2" for="message">Message</label>
89
+ <textarea id="message" rows="5" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Describe your issue or question..." required></textarea>
90
  </div>
91
 
92
  <button type="submit" class="bg-primary hover:bg-blue-600 text-white px-6 py-3 rounded-lg font-medium transition-all">
 
103
  <script src="script.js"></script>
104
  <script>
105
  feather.replace();
106
+
107
+ // Handle form submission
108
+ document.getElementById('support-form').addEventListener('submit', function(e) {
109
+ e.preventDefault();
110
+
111
+ // Get form values
112
+ const name = document.getElementById('name').value;
113
+ const email = document.getElementById('email').value;
114
+ const subject = document.getElementById('subject').value;
115
+ const message = document.getElementById('message').value;
116
+
117
+ // In a real app, this would send the data to a server
118
+ alert(`Thank you, ${name}! Your support request has been submitted. We'll get back to you at ${email} soon.`);
119
+
120
+ // Reset form
121
+ this.reset();
122
+ });
123
+
124
+ // Interactive support functions
125
+ function browseDocumentation() {
126
+ window.location.href = 'docs.html';
127
+ }
128
+
129
+ function viewFAQ() {
130
+ alert("Opening FAQ section...");
131
+ // In a real app, this would show the FAQ content
132
+ }
133
+
134
+ function visitCommunity() {
135
+ window.location.href = 'community.html';
136
+ }
137
  </script>
138
  </body>
139
+ </html>
tutorials.html CHANGED
@@ -29,9 +29,28 @@
29
  <p class="text-gray-600 max-w-2xl mx-auto">Learn how to build amazing applications with step-by-step tutorials</p>
30
  </div>
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
33
  <!-- Tutorial Cards -->
34
- <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
35
  <div class="h-48 bg-gradient-to-r from-blue-400 to-blue-600"></div>
36
  <div class="p-6">
37
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
@@ -48,7 +67,7 @@
48
  </div>
49
  </div>
50
 
51
- <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
52
  <div class="h-48 bg-gradient-to-r from-green-400 to-green-600"></div>
53
  <div class="p-6">
54
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
@@ -65,7 +84,7 @@
65
  </div>
66
  </div>
67
 
68
- <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
69
  <div class="h-48 bg-gradient-to-r from-purple-400 to-purple-600"></div>
70
  <div class="p-6">
71
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
@@ -82,7 +101,7 @@
82
  </div>
83
  </div>
84
 
85
- <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
86
  <div class="h-48 bg-gradient-to-r from-yellow-400 to-orange-500"></div>
87
  <div class="p-6">
88
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
@@ -99,7 +118,7 @@
99
  </div>
100
  </div>
101
 
102
- <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
103
  <div class="h-48 bg-gradient-to-r from-red-400 to-pink-500"></div>
104
  <div class="p-6">
105
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
@@ -116,7 +135,7 @@
116
  </div>
117
  </div>
118
 
119
- <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow">
120
  <div class="h-48 bg-gradient-to-r from-teal-400 to-cyan-600"></div>
121
  <div class="p-6">
122
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
@@ -139,7 +158,7 @@
139
  <p class="text-gray-600 mb-6">Structured learning journeys to guide you from beginner to expert</p>
140
 
141
  <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
142
- <div class="border border-gray-200 rounded-lg p-6 hover:border-primary transition-colors">
143
  <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
144
  <i data-feather="code" class="text-primary w-6 h-6"></i>
145
  </div>
@@ -148,7 +167,7 @@
148
  <a href="#" class="text-primary font-medium text-sm">Explore Path</a>
149
  </div>
150
 
151
- <div class="border border-gray-200 rounded-lg p-6 hover:border-primary transition-colors">
152
  <div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-4">
153
  <i data-feather="server" class="text-green-600 w-6 h-6"></i>
154
  </div>
@@ -157,7 +176,7 @@
157
  <a href="#" class="text-primary font-medium text-sm">Explore Path</a>
158
  </div>
159
 
160
- <div class="border border-gray-200 rounded-lg p-6 hover:border-primary transition-colors">
161
  <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
162
  <i data-feather="smartphone" class="text-purple-600 w-6 h-6"></i>
163
  </div>
@@ -176,6 +195,22 @@
176
  <script src="script.js"></script>
177
  <script>
178
  feather.replace();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  </script>
180
  </body>
181
- </html>
 
29
  <p class="text-gray-600 max-w-2xl mx-auto">Learn how to build amazing applications with step-by-step tutorials</p>
30
  </div>
31
 
32
+ <div class="flex flex-wrap gap-4 mb-8">
33
+ <button class="bg-primary hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center gap-2" onclick="filterTutorials('all')">
34
+ <i data-feather="book"></i>
35
+ All Tutorials
36
+ </button>
37
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg flex items-center gap-2" onclick="filterTutorials('beginner')">
38
+ <i data-feather="star"></i>
39
+ Beginner
40
+ </button>
41
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg flex items-center gap-2" onclick="filterTutorials('intermediate')">
42
+ <i data-feather="trending-up"></i>
43
+ Intermediate
44
+ </button>
45
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg flex items-center gap-2" onclick="filterTutorials('advanced')">
46
+ <i data-feather="award"></i>
47
+ Advanced
48
+ </button>
49
+ </div>
50
+
51
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
52
  <!-- Tutorial Cards -->
53
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer" onclick="startTutorial('web-app')">
54
  <div class="h-48 bg-gradient-to-r from-blue-400 to-blue-600"></div>
55
  <div class="p-6">
56
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
 
67
  </div>
68
  </div>
69
 
70
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer" onclick="startTutorial('python-data')">
71
  <div class="h-48 bg-gradient-to-r from-green-400 to-green-600"></div>
72
  <div class="p-6">
73
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
 
84
  </div>
85
  </div>
86
 
87
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer" onclick="startTutorial('node-api')">
88
  <div class="h-48 bg-gradient-to-r from-purple-400 to-purple-600"></div>
89
  <div class="p-6">
90
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
 
101
  </div>
102
  </div>
103
 
104
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer" onclick="startTutorial('react')">
105
  <div class="h-48 bg-gradient-to-r from-yellow-400 to-orange-500"></div>
106
  <div class="p-6">
107
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
 
118
  </div>
119
  </div>
120
 
121
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer" onclick="startTutorial('deploy')">
122
  <div class="h-48 bg-gradient-to-r from-red-400 to-pink-500"></div>
123
  <div class="p-6">
124
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
 
135
  </div>
136
  </div>
137
 
138
+ <div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer" onclick="startTutorial('css')">
139
  <div class="h-48 bg-gradient-to-r from-teal-400 to-cyan-600"></div>
140
  <div class="p-6">
141
  <div class="flex items-center gap-2 text-sm text-gray-500 mb-2">
 
158
  <p class="text-gray-600 mb-6">Structured learning journeys to guide you from beginner to expert</p>
159
 
160
  <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
161
+ <div class="border border-gray-200 rounded-lg p-6 hover:border-primary transition-colors cursor-pointer" onclick="explorePath('frontend')">
162
  <div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
163
  <i data-feather="code" class="text-primary w-6 h-6"></i>
164
  </div>
 
167
  <a href="#" class="text-primary font-medium text-sm">Explore Path</a>
168
  </div>
169
 
170
+ <div class="border border-gray-200 rounded-lg p-6 hover:border-primary transition-colors cursor-pointer" onclick="explorePath('backend')">
171
  <div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-4">
172
  <i data-feather="server" class="text-green-600 w-6 h-6"></i>
173
  </div>
 
176
  <a href="#" class="text-primary font-medium text-sm">Explore Path</a>
177
  </div>
178
 
179
+ <div class="border border-gray-200 rounded-lg p-6 hover:border-primary transition-colors cursor-pointer" onclick="explorePath('fullstack')">
180
  <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
181
  <i data-feather="smartphone" class="text-purple-600 w-6 h-6"></i>
182
  </div>
 
195
  <script src="script.js"></script>
196
  <script>
197
  feather.replace();
198
+
199
+ // Interactive tutorial functions
200
+ function filterTutorials(level) {
201
+ alert(`Filtering tutorials by: ${level}`);
202
+ // In a real app, this would filter the displayed tutorials
203
+ }
204
+
205
+ function startTutorial(tutorialId) {
206
+ alert(`Starting tutorial: ${tutorialId}`);
207
+ // In a real app, this would navigate to the tutorial page
208
+ }
209
+
210
+ function explorePath(path) {
211
+ alert(`Exploring learning path: ${path}`);
212
+ // In a real app, this would navigate to the learning path page
213
+ }
214
  </script>
215
  </body>
216
+ </html>