Lkonshu commited on
Commit
6bb30f0
·
verified ·
1 Parent(s): 34898f7

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +360 -18
index.html CHANGED
@@ -1,19 +1,361 @@
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
+
2
+ <!DOCTYPE html>
3
+ <html lang="es">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
7
+ <meta name="theme-color" content="#09090d">
8
+ <title>DevPilot Code 1.0</title>
9
+ <style>
10
+ :root{
11
+ --bg:#09090d;--panel:#101016;--panel2:#171720;
12
+ --border:#282833;--text:#f4f4fa;--muted:#9292a5;
13
+ --purple:#9870ff;--purple2:#7045e8;
14
+ }
15
+ *{box-sizing:border-box}
16
+ body{margin:0;background:var(--bg);color:var(--text);
17
+ font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
18
+ min-height:100dvh}
19
+ button,textarea{font:inherit}
20
+ button{cursor:pointer}
21
+ button:focus-visible,textarea:focus-visible{
22
+ outline:2px solid var(--purple);outline-offset:3px}
23
+ .app{min-height:100dvh;display:flex}
24
+ .sidebar{width:258px;flex-shrink:0;background:#0d0d12;
25
+ border-right:1px solid var(--border);padding:20px 14px;
26
+ display:flex;flex-direction:column;transition:transform .25s}
27
+ .brand{display:flex;align-items:center;gap:11px;padding:3px 7px 24px}
28
+ .logo{width:39px;height:39px;border-radius:13px;
29
+ display:grid;place-items:center;background:linear-gradient(140deg,#a78bfa,#6936dd);
30
+ box-shadow:0 5px 25px #8054ff35}
31
+ .logo svg{width:23px;height:23px}
32
+ .brand-name{font-weight:750;letter-spacing:-.4px;font-size:15px}
33
+ .brand-version{font-size:11px;color:var(--muted);margin-top:4px}
34
+ .new-chat{width:100%;display:flex;align-items:center;gap:10px;
35
+ padding:12px;background:#17151f;color:#eee;border:1px solid #393044;
36
+ border-radius:11px;text-align:left;transition:.2s}
37
+ .new-chat:hover{background:#211b30;border-color:#7150aa}
38
+ .new-chat svg{width:18px;height:18px;color:#bba5ff}
39
+ .section-label{font-size:10px;color:#737387;font-weight:700;
40
+ letter-spacing:1.4px;margin:28px 9px 11px}
41
+ .history-item{padding:11px 10px;border-radius:9px;color:#aaaabb;
42
+ font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
43
+ margin-bottom:3px}
44
+ .history-item.active{background:#1a1724;color:#f0eaff}
45
+ .side-bottom{margin-top:auto}
46
+ .status-card{border:1px solid var(--border);border-radius:12px;
47
+ padding:13px;background:#111117}
48
+ .status-top{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600}
49
+ .dot{width:7px;height:7px;border-radius:50%;background:#e4ad59}
50
+ .status-desc{font-size:11px;color:var(--muted);line-height:1.6;margin-top:8px}
51
+ .side-button{width:100%;margin-top:8px;background:transparent;
52
+ border:0;color:#a7a7b8;text-align:left;padding:11px 8px;
53
+ border-radius:9px;font-size:12px}
54
+ .side-button:hover{background:#191920;color:white}
55
+ .main{min-width:0;flex:1;display:flex;flex-direction:column;min-height:100dvh}
56
+ .topbar{height:67px;display:flex;align-items:center;justify-content:space-between;
57
+ padding:0 26px;border-bottom:1px solid #202029;background:#0c0c11}
58
+ .top-left,.top-right{display:flex;align-items:center;gap:12px}
59
+ .page-title{font-size:13px;font-weight:650}
60
+ .menu-btn{display:none}
61
+ .icon-btn{width:36px;height:36px;display:grid;place-items:center;
62
+ background:transparent;border:1px solid transparent;color:#a4a4b5;border-radius:9px}
63
+ .icon-btn:hover{background:#1a1a23;border-color:var(--border);color:white}
64
+ .icon-btn svg{width:18px;height:18px}
65
+ .mode-badge{font-size:10px;font-weight:750;letter-spacing:.7px;
66
+ padding:6px 9px;border:1px solid #4a3a63;background:#1b1527;
67
+ border-radius:7px;color:#c7b1ff}
68
+ .content{width:100%;max-width:920px;margin:0 auto;padding:40px 28px 25px;
69
+ flex:1;display:flex;flex-direction:column}
70
+ .welcome{margin:auto 0;text-align:center;padding:30px 0 35px;
71
+ animation:appear .45s ease both}
72
+ .hero-mark{width:62px;height:62px;margin:0 auto 23px;
73
+ border:1px solid #51406c;border-radius:20px;
74
+ background:radial-gradient(circle at 30% 20%,#382657,#171321 75%);
75
+ display:grid;place-items:center;box-shadow:0 0 50px #8154ff13}
76
+ .hero-mark svg{width:30px;height:30px;color:#c6b0ff}
77
+ h1{font-size:clamp(29px,4vw,43px);letter-spacing:-1.8px;
78
+ margin:0;font-weight:760;line-height:1.15}
79
+ .gradient{background:linear-gradient(100deg,#fff 10%,#c5b2ff 65%,#9c7aff);
80
+ -webkit-background-clip:text;background-clip:text;color:transparent}
81
+ .subtitle{color:var(--muted);font-size:14px;line-height:1.7;
82
+ max-width:430px;margin:14px auto 0}
83
+ .suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
84
+ gap:11px;margin-top:31px;text-align:left}
85
+ .suggestion{background:linear-gradient(145deg,#14141d,#101016);
86
+ border:1px solid var(--border);border-radius:13px;padding:16px;
87
+ min-height:123px;color:var(--text);text-align:left;transition:transform .2s,border-color .2s}
88
+ .suggestion:hover{transform:translateY(-3px);border-color:#60488c}
89
+ .suggestion svg{width:20px;height:20px;color:#b29aff;margin-bottom:15px}
90
+ .suggestion strong{display:block;font-size:12px;font-weight:650}
91
+ .suggestion span{display:block;font-size:11px;color:var(--muted);
92
+ margin-top:6px;line-height:1.5}
93
+ .chat{display:flex;flex-direction:column;gap:22px;margin-top:12px}
94
+ .message{display:flex;gap:12px;animation:appear .25s ease both}
95
+ .avatar{width:30px;height:30px;flex-shrink:0;border-radius:10px;
96
+ display:grid;place-items:center;background:#201832;border:1px solid #46335f;color:#c6b1ff}
97
+ .avatar svg{width:16px;height:16px}
98
+ .message.user .avatar{background:#20202a;border-color:#393945;color:#ddd}
99
+ .message-body{min-width:0;flex:1}
100
+ .message-label{font-size:11px;color:#a6a6b8;margin:2px 0 9px}
101
+ .message-text{font-size:13px;line-height:1.8;white-space:pre-wrap;
102
+ overflow-wrap:anywhere;color:#e5e5ed}
103
+ .message-text pre{background:#09090e;border:1px solid #30303b;
104
+ border-radius:10px;padding:14px;overflow:auto;color:#d7c7ff;font-size:12px}
105
+ .composer-wrap{margin-top:auto;padding-top:28px}
106
+ .composer{background:#13131a;border:1px solid #343440;border-radius:16px;
107
+ padding:12px 12px 10px;box-shadow:0 15px 50px #0002;transition:border-color .2s}
108
+ .composer:focus-within{border-color:#7154a3}
109
+ textarea{width:100%;min-height:54px;max-height:180px;resize:vertical;
110
+ background:transparent;border:0;outline:none;color:white;padding:6px;
111
+ font-size:14px;line-height:1.6}
112
+ textarea::placeholder{color:#717184}
113
+ .composer-bottom{display:flex;align-items:center;justify-content:space-between;
114
+ gap:10px;padding:5px 2px 0}
115
+ .composer-hint{font-size:10px;color:#77778b}
116
+ .send{width:36px;height:36px;display:grid;place-items:center;
117
+ background:linear-gradient(140deg,#a283ff,#7447e5);border:0;
118
+ border-radius:11px;color:white;transition:transform .2s,opacity .2s}
119
+ .send:hover{transform:translateY(-2px)}
120
+ .send:disabled{opacity:.45;cursor:not-allowed}
121
+ .send svg{width:18px;height:18px}
122
+ .disclaimer{text-align:center;color:#666678;font-size:10px;line-height:1.6;margin:13px 0 0}
123
+ .toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);
124
+ background:#24212e;border:1px solid #514366;color:#eee;padding:11px 16px;
125
+ border-radius:10px;font-size:12px;display:none;z-index:10}
126
+ .overlay{display:none}
127
+ @keyframes appear{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
128
+ @media(min-width:1100px){.content{padding-top:52px}}
129
+ @media(max-width:760px){
130
+ .sidebar{position:fixed;z-index:20;inset:0 auto 0 0;width:270px;
131
+ transform:translateX(-105%);box-shadow:20px 0 70px #0008}
132
+ .sidebar.open{transform:translateX(0)}
133
+ .overlay.open{display:block;position:fixed;inset:0;background:#0009;z-index:19}
134
+ .menu-btn{display:grid}
135
+ .topbar{height:60px;padding:0 13px}
136
+ .top-left,.top-right{gap:7px}
137
+ .content{padding:26px 16px 18px}
138
+ .welcome{padding:28px 0}
139
+ .suggestions{grid-template-columns:1fr;gap:8px;margin-top:24px}
140
+ .suggestion{min-height:0;display:grid;grid-template-columns:25px 1fr;
141
+ column-gap:10px;padding:13px}
142
+ .suggestion svg{grid-row:span 2;margin:1px 0 0}
143
+ .suggestion span{margin-top:4px}
144
+ .hero-mark{width:54px;height:54px;border-radius:17px;margin-bottom:20px}
145
+ h1{letter-spacing:-1.2px}
146
+ .subtitle{font-size:13px}
147
+ .composer-wrap{padding-top:20px}
148
+ .composer{border-radius:14px}
149
+ .composer-hint{max-width:75%;line-height:1.5}
150
+ .mode-badge{font-size:9px;padding:5px 6px}
151
+ }
152
+ @media(prefers-reduced-motion:reduce){
153
+ *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
154
+ }
155
+ </style>
156
+ </head>
157
+ <body>
158
+ <div class="app">
159
+ <aside class="sidebar" id="sidebar">
160
+ <div class="brand">
161
+ <div class="logo">
162
+ <svg viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
163
+ <path d="m8 5-7 7 7 7M16 5l7 7-7 7M14 3l-4 18"/>
164
+ </svg>
165
+ </div>
166
+ <div>
167
+ <div class="brand-name">DevPilot Code</div>
168
+ <div class="brand-version">Version 1.0 · Developer AI</div>
169
+ </div>
170
+ </div>
171
+
172
+ <button class="new-chat" id="newChat">
173
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
174
+ <path d="M12 5v14M5 12h14"/>
175
+ </svg>
176
+ New conversation
177
+ </button>
178
+
179
+ <div class="section-label">WORKSPACE</div>
180
+ <div class="history-item active">⌘ &nbsp; New conversation</div>
181
+ <div class="history-item">◇ &nbsp; Code assistant</div>
182
+ <div class="history-item">◇ &nbsp; Web development</div>
183
+
184
+ <div class="side-bottom">
185
+ <div class="status-card">
186
+ <div class="status-top"><span class="dot"></span> Demo environment</div>
187
+ <div class="status-desc">The interface is ready. The AI inference engine is not connected yet.</div>
188
+ </div>
189
+ <button class="side-button" id="aboutBtn">ⓘ &nbsp; About DevPilot</button>
190
+ </div>
191
+ </aside>
192
+
193
+ <div class="overlay" id="overlay"></div>
194
+
195
+ <section class="main">
196
+ <header class="topbar">
197
+ <div class="top-left">
198
+ <button class="icon-btn menu-btn" id="menuBtn" aria-label="Open menu">
199
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
200
+ <path d="M4 7h16M4 12h16M4 17h16"/>
201
+ </svg>
202
+ </button>
203
+ <span class="page-title">DevPilot Workspace</span>
204
+ </div>
205
+ <div class="top-right">
206
+ <span class="mode-badge">DEMO MODE</span>
207
+ <button class="icon-btn" id="infoBtn" aria-label="About">
208
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
209
+ <circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>
210
+ </svg>
211
+ </button>
212
+ </div>
213
+ </header>
214
+
215
+ <main class="content">
216
+ <section class="welcome" id="welcome">
217
+ <div class="hero-mark">
218
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7">
219
+ <path d="m8 5-7 7 7 7M16 5l7 7-7 7M14 3l-4 18"/>
220
+ </svg>
221
+ </div>
222
+ <h1><span class="gradient">Build something great.</span></h1>
223
+ <p class="subtitle">Your coding partner for ideas, debugging and building the next big thing.</p>
224
+
225
+ <div class="suggestions">
226
+ <button class="suggestion" data-prompt="Create a responsive landing page using HTML and CSS.">
227
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 9h18M7 6.5h.01M10 6.5h.01"/></svg>
228
+ <strong>Build a website</strong>
229
+ <span>Create a responsive website from scratch.</span>
230
+ </button>
231
+ <button class="suggestion" data-prompt="Help me debug this code and explain the problem step by step.">
232
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M12 3v3M5.6 5.6l2.1 2.1M3 12h3M18 12h3M16.3 7.7l2.1-2.1M8 14l2.5 2.5L16 10"/><circle cx="12" cy="12" r="9"/></svg>
233
+ <strong>Debug my code</strong>
234
+ <span>Find bugs and understand how to fix them.</span>
235
+ </button>
236
+ <button class="suggestion" data-prompt="Explain JavaScript async and await with a simple example.">
237
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M12 3 2.5 20h19L12 3Z"/><path d="M12 9v5M12 17h.01"/></svg>
238
+ <strong>Learn something</strong>
239
+ <span>Understand concepts with clear examples.</span>
240
+ </button>
241
+ </div>
242
+ </section>
243
+
244
+ <section class="chat" id="chat" aria-live="polite"></section>
245
+
246
+ <div class="composer-wrap">
247
+ <form class="composer" id="form">
248
+ <textarea id="prompt" rows="2" maxlength="8000"
249
+ placeholder="Ask DevPilot anything about code..." aria-label="Your message"></textarea>
250
+ <div class="composer-bottom">
251
+ <span class="composer-hint">Enter to send · Shift + Enter for a new line</span>
252
+ <button class="send" id="send" type="submit" aria-label="Send message">
253
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
254
+ <path d="m5 12 14-7-5 14-2-6-7-1Z"/><path d="m12 13 7-8"/>
255
+ </svg>
256
+ </button>
257
+ </div>
258
+ </form>
259
+ <p class="disclaimer">DevPilot Code 1.0 · Interface preview · AI responses are not connected yet.</p>
260
+ </div>
261
+ </main>
262
+ </section>
263
+ </div>
264
+
265
+ <div class="toast" id="toast" role="status"></div>
266
+
267
+ <script>
268
+ const $ = id => document.getElementById(id);
269
+ const sidebar = $("sidebar");
270
+ const overlay = $("overlay");
271
+ const promptBox = $("prompt");
272
+ const chat = $("chat");
273
+ const welcome = $("welcome");
274
+ let toastTimer;
275
+
276
+ function toast(message){
277
+ $("toast").textContent = message;
278
+ $("toast").style.display = "block";
279
+ clearTimeout(toastTimer);
280
+ toastTimer = setTimeout(() => $("toast").style.display = "none", 2800);
281
+ }
282
+ function closeMenu(){
283
+ sidebar.classList.remove("open");
284
+ overlay.classList.remove("open");
285
+ }
286
+ $("menuBtn").addEventListener("click", () => {
287
+ sidebar.classList.toggle("open");
288
+ overlay.classList.toggle("open");
289
+ });
290
+ overlay.addEventListener("click", closeMenu);
291
+
292
+ function newConversation(){
293
+ chat.replaceChildren();
294
+ welcome.style.display = "";
295
+ promptBox.value = "";
296
+ closeMenu();
297
+ promptBox.focus();
298
+ }
299
+ $("newChat").addEventListener("click", newConversation);
300
+
301
+ document.querySelectorAll("[data-prompt]").forEach(button => {
302
+ button.addEventListener("click", () => {
303
+ promptBox.value = button.dataset.prompt;
304
+ promptBox.focus();
305
+ promptBox.dispatchEvent(new Event("input"));
306
+ });
307
+ });
308
+
309
+ function addMessage(role, text){
310
+ const row = document.createElement("div");
311
+ row.className = "message " + role;
312
+ const avatar = document.createElement("div");
313
+ avatar.className = "avatar";
314
+ avatar.textContent = role === "user" ? "U" : "DP";
315
+ const body = document.createElement("div");
316
+ body.className = "message-body";
317
+ const label = document.createElement("div");
318
+ label.className = "message-label";
319
+ label.textContent = role === "user" ? "You" : "DevPilot Code 1.0";
320
+ const content = document.createElement("div");
321
+ content.className = "message-text";
322
+ content.textContent = text;
323
+ body.append(label, content);
324
+ row.append(avatar, body);
325
+ chat.append(row);
326
+ row.scrollIntoView({behavior:"smooth", block:"nearest"});
327
+ }
328
+
329
+ $("form").addEventListener("submit", event => {
330
+ event.preventDefault();
331
+ const text = promptBox.value.trim();
332
+ if (!text) return;
333
+ addMessage("user", text);
334
+ welcome.style.display = "none";
335
+ promptBox.value = "";
336
+ promptBox.style.height = "auto";
337
+ toast("Demo mode: connect the inference engine to get AI responses.");
338
+ addMessage("assistant",
339
+ "Your message was received by the interface, but the AI model is not connected yet. No AI response has been generated.\n\nNext step: connect this chat to a backend that loads the Qwen base model and your DevPilot LoRA adapter."
340
+ );
341
+ });
342
+
343
+ promptBox.addEventListener("keydown", event => {
344
+ if(event.key === "Enter" && !event.shiftKey){
345
+ event.preventDefault();
346
+ $("form").requestSubmit();
347
+ }
348
+ });
349
+ promptBox.addEventListener("input", () => {
350
+ promptBox.style.height = "auto";
351
+ promptBox.style.height = Math.min(promptBox.scrollHeight, 180) + "px";
352
+ });
353
+
354
+ function about(){
355
+ toast("DevPilot Code 1.0 · Open-model coding assistant · Demo UI");
356
+ }
357
+ $("aboutBtn").addEventListener("click", about);
358
+ $("infoBtn").addEventListener("click", about);
359
+ </script>
360
+ </body>
361
  </html>