File size: 16,584 Bytes
d36fad5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Aesthetic Code Editor</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.15.2/ace.js"></script>
    <style>
        .editor-container {
            height: calc(100vh - 60px);
        }
        .tab-active {
            border-bottom: 2px solid #6366f1;
            color: #6366f1;
        }
        .tab-inactive {
            border-bottom: 2px solid transparent;
        }
        .sidebar-item:hover {
            background-color: rgba(99, 102, 241, 0.1);
        }
        .sidebar-item.active {
            background-color: rgba(99, 102, 241, 0.2);
            border-left: 3px solid #6366f1;
        }
        #editor {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            font-size: 14px;
        }
        .gutter {
            background-color: #1e1e2d;
            background-repeat: no-repeat;
            background-position: 50%;
        }
        .gutter.gutter-horizontal {
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
            cursor: col-resize;
        }
        .gutter.gutter-vertical {
            background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
            cursor: row-resize;
        }
        .split {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-200 h-screen overflow-hidden">
    <!-- Top Bar -->
    <div class="bg-gray-800 h-12 flex items-center justify-between px-4 border-b border-gray-700">
        <div class="flex items-center space-x-4">
            <div class="flex items-center">
                <i class="fas fa-code text-indigo-500 text-xl mr-2"></i>
                <span class="font-bold text-lg">Aesthetic Editor</span>
            </div>
            <div class="hidden md:flex space-x-4 text-sm">
                <button class="hover:text-indigo-400">File</button>
                <button class="hover:text-indigo-400">Edit</button>
                <button class="hover:text-indigo-400">View</button>
                <button class="hover:text-indigo-400">Terminal</button>
                <button class="hover:text-indigo-400">Help</button>
            </div>
        </div>
        <div class="flex items-center space-x-3">
            <button class="bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded text-sm">
                <i class="fas fa-play mr-1"></i> Run
            </button>
            <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">
                <i class="fas fa-share-alt mr-1"></i> Share
            </button>
            <div class="h-6 w-6 rounded-full bg-indigo-500 flex items-center justify-center">
                <i class="fas fa-user text-xs"></i>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="flex h-full">
        <!-- Sidebar -->
        <div class="w-16 bg-gray-800 border-r border-gray-700 flex flex-col items-center py-4">
            <button class="sidebar-item active w-full py-3 flex items-center justify-center">
                <i class="fas fa-file-code text-lg"></i>
            </button>
            <button class="sidebar-item w-full py-3 flex items-center justify-center">
                <i class="fas fa-search text-lg"></i>
            </button>
            <button class="sidebar-item w-full py-3 flex items-center justify-center">
                <i class="fas fa-code-branch text-lg"></i>
            </button>
            <button class="sidebar-item w-full py-3 flex items-center justify-center">
                <i class="fas fa-cog text-lg"></i>
            </button>
            <div class="mt-auto">
                <button class="sidebar-item w-full py-3 flex items-center justify-center">
                    <i class="fas fa-question-circle text-lg"></i>
                </button>
            </div>
        </div>

        <!-- File Explorer -->
        <div class="w-48 bg-gray-800 border-r border-gray-700 hidden md:block">
            <div class="p-3 border-b border-gray-700 flex justify-between items-center">
                <span class="text-sm font-medium">EXPLORER</span>
                <button class="text-gray-400 hover:text-white">
                    <i class="fas fa-ellipsis-h"></i>
                </button>
            </div>
            <div class="p-2">
                <div class="flex items-center text-sm py-1 px-2 rounded hover:bg-gray-700 cursor-pointer">
                    <i class="fas fa-folder-open text-yellow-400 mr-2"></i>
                    <span>Project</span>
                </div>
                <div class="ml-4 mt-1">
                    <div class="flex items-center text-sm py-1 px-2 rounded hover:bg-gray-700 cursor-pointer">
                        <i class="fas fa-file-code text-blue-400 mr-2"></i>
                        <span>index.html</span>
                    </div>
                    <div class="flex items-center text-sm py-1 px-2 rounded hover:bg-gray-700 cursor-pointer">
                        <i class="fas fa-file-code text-purple-400 mr-2"></i>
                        <span>styles.css</span>
                    </div>
                    <div class="flex items-center text-sm py-1 px-2 rounded hover:bg-gray-700 cursor-pointer">
                        <i class="fas fa-file-code text-green-400 mr-2"></i>
                        <span>app.js</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- Editor Area -->
        <div class="flex-1 flex flex-col">
            <!-- Tabs -->
            <div class="bg-gray-800 border-b border-gray-700 flex overflow-x-auto">
                <div class="flex">
                    <div class="tab-active px-4 py-2 flex items-center text-sm">
                        <i class="fas fa-file-code text-blue-400 mr-2"></i>
                        <span>index.html</span>
                        <button class="ml-2 text-gray-400 hover:text-white">
                            <i class="fas fa-times"></i>
                        </button>
                    </div>
                    <div class="tab-inactive px-4 py-2 flex items-center text-sm text-gray-400 hover:text-gray-200">
                        <i class="fas fa-file-code text-purple-400 mr-2"></i>
                        <span>styles.css</span>
                        <button class="ml-2 text-gray-400 hover:text-white">
                            <i class="fas fa-times"></i>
                        </button>
                    </div>
                    <div class="tab-inactive px-4 py-2 flex items-center text-sm text-gray-400 hover:text-gray-200">
                        <i class="fas fa-file-code text-green-400 mr-2"></i>
                        <span>app.js</span>
                        <button class="ml-2 text-gray-400 hover:text-white">
                            <i class="fas fa-times"></i>
                        </button>
                    </div>
                </div>
                <div class="ml-auto px-3 flex items-center">
                    <button class="text-gray-400 hover:text-white mx-1">
                        <i class="fas fa-save"></i>
                    </button>
                    <button class="text-gray-400 hover:text-white mx-1">
                        <i class="fas fa-ellipsis-v"></i>
                    </button>
                </div>
            </div>

            <!-- Editor and Terminal -->
            <div class="flex-1 flex flex-col">
                <div class="editor-container relative">
                    <div id="editor">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;My Awesome Project&lt;/title&gt;
    &lt;link rel="stylesheet" href="styles.css"&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="container"&gt;
        &lt;h1 class="text-gradient"&gt;Welcome to My Editor&lt;/h1&gt;
        &lt;p&gt;Start coding your amazing project here!&lt;/p&gt;
        &lt;button id="mainBtn"&gt;Click Me&lt;/button&gt;
    &lt;/div&gt;
    &lt;script src="app.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</div>
                </div>
                
                <div class="gutter gutter-horizontal bg-gray-800 h-1 cursor-row-resize"></div>
                
                <div class="bg-gray-800 h-1/3 flex flex-col">
                    <div class="bg-gray-800 border-t border-gray-700 px-3 py-1 flex items-center">
                        <span class="text-sm font-medium">TERMINAL</span>
                        <div class="ml-4 flex space-x-1">
                            <button class="text-xs px-2 py-1 rounded hover:bg-gray-700">Problems</button>
                            <button class="text-xs px-2 py-1 rounded hover:bg-gray-700">Output</button>
                            <button class="text-xs px-2 py-1 rounded hover:bg-gray-700">Debug Console</button>
                            <button class="text-xs px-2 py-1 rounded bg-gray-700">Terminal</button>
                        </div>
                        <button class="ml-auto text-gray-400 hover:text-white">
                            <i class="fas fa-times"></i>
                        </button>
                    </div>
                    <div class="flex-1 p-2 overflow-auto font-mono text-sm bg-gray-900">
                        <div class="text-green-400">$ npm start</div>
                        <div class="text-gray-400">Starting development server...</div>
                        <div class="text-gray-400">Compiled successfully!</div>
                        <div class="text-gray-400">You can now view my-app in the browser.</div>
                        <div class="mt-2">
                            <div class="text-blue-400">  Local:            http://localhost:3000</div>
                            <div class="text-blue-400">  On Your Network:  http://192.168.1.100:3000</div>
                        </div>
                        <div class="text-gray-400 mt-2">Note that the development build is not optimized.</div>
                        <div class="text-gray-400">To create a production build, use npm run build.</div>
                        <div class="mt-2 text-green-400">$</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Status Bar -->
    <div class="bg-gray-800 h-6 flex items-center justify-between px-3 text-xs border-t border-gray-700">
        <div class="flex items-center space-x-4">
            <div class="flex items-center">
                <i class="fas fa-code-branch text-gray-400 mr-1"></i>
                <span class="text-gray-300">main*</span>
            </div>
            <div class="flex items-center">
                <i class="fas fa-circle text-green-500 mr-1"></i>
                <span class="text-gray-300">Prettier</span>
            </div>
        </div>
        <div class="flex items-center space-x-4">
            <div class="flex items-center">
                <i class="fas fa-laptop-code text-gray-400 mr-1"></i>
                <span class="text-gray-300">JavaScript</span>
            </div>
            <div class="flex items-center">
                <i class="fas fa-clock text-gray-400 mr-1"></i>
                <span class="text-gray-300">UTF-8</span>
            </div>
            <div class="flex items-center">
                <i class="fas fa-terminal text-gray-400 mr-1"></i>
                <span class="text-gray-300">LF</span>
            </div>
            <div class="flex items-center">
                <span class="text-gray-300">Ln 10, Col 15</span>
            </div>
        </div>
    </div>

    <script>
        // Initialize ACE Editor
        const editor = ace.edit("editor");
        editor.setTheme("ace/theme/tomorrow_night");
        editor.session.setMode("ace/mode/html");
        editor.setOptions({
            fontSize: "13px",
            enableBasicAutocompletion: true,
            enableLiveAutocompletion: true,
            showPrintMargin: false,
            highlightActiveLine: true,
            tabSize: 2
        });

        // Add gutter for resizing
        function initGutter() {
            const gutter = document.querySelector('.gutter');
            const editorContainer = document.querySelector('.editor-container');
            const terminal = document.querySelector('.bg-gray-800.h-1\\/3');

            function drag(e) {
                document.body.style.cursor = 'row-resize';
                const editorHeight = e.clientY - editorContainer.getBoundingClientRect().top;
                const terminalHeight = terminal.parentElement.offsetHeight - editorHeight - 1;
                
                editorContainer.style.height = `${editorHeight}px`;
                terminal.style.height = `${terminalHeight}px`;
            }

            function stopDrag() {
                document.body.style.cursor = '';
                document.removeEventListener('mousemove', drag);
                document.removeEventListener('mouseup', stopDrag);
            }

            gutter.addEventListener('mousedown', (e) => {
                e.preventDefault();
                document.addEventListener('mousemove', drag);
                document.addEventListener('mouseup', stopDrag);
            });
        }

        // Initialize sidebar items
        function initSidebar() {
            const sidebarItems = document.querySelectorAll('.sidebar-item');
            sidebarItems.forEach(item => {
                item.addEventListener('click', () => {
                    sidebarItems.forEach(i => i.classList.remove('active'));
                    item.classList.add('active');
                });
            });
        }

        // Initialize tabs
        function initTabs() {
            const tabs = document.querySelectorAll('.tab-inactive, .tab-active');
            tabs.forEach(tab => {
                tab.addEventListener('click', (e) => {
                    if (e.target.classList.contains('fa-times')) return;
                    
                    tabs.forEach(t => {
                        t.classList.remove('tab-active');
                        t.classList.add('tab-inactive');
                    });
                    tab.classList.remove('tab-inactive');
                    tab.classList.add('tab-active');
                    
                    // Change editor mode based on file type
                    const fileName = tab.querySelector('span').textContent;
                    if (fileName.endsWith('.html')) {
                        editor.session.setMode("ace/mode/html");
                    } else if (fileName.endsWith('.css')) {
                        editor.session.setMode("ace/mode/css");
                    } else if (fileName.endsWith('.js')) {
                        editor.session.setMode("ace/mode/javascript");
                    }
                });
            });
        }

        // Initialize everything when DOM is loaded
        document.addEventListener('DOMContentLoaded', () => {
            initGutter();
            initSidebar();
            initTabs();
        });
    </script>
<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=Utkarsh65447/code-editor" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>