Mattimax commited on
Commit
a0c9d4c
·
verified ·
1 Parent(s): 84207ca

Manual changes saved

Browse files
Files changed (1) hide show
  1. index.html +189 -270
index.html CHANGED
@@ -3,226 +3,168 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>DAC Private Intelligence</title>
7
  <style>
8
  :root {
9
- /* Palette Ultra-Premium */
10
- --bg-dark: #000000; /* Nero profondo */
11
- --bg-sidebar: rgba(20, 20, 20, 0.9);
12
- --bg-glass: rgba(255, 255, 255, 0.04);
13
- --primary-rainbow: linear-gradient(135deg, #ff0000, #ff9900, #ffff00, #33ff00, #00ffff, #0000ff, #9900ff, #ff0000);
14
- --text-main: #f0f0f0;
15
- --text-muted: #808080;
16
- --border-glass: rgba(255, 255, 255, 0.08);
17
- --shadow-premium: 0 20px 40px rgba(0,0,0,0.6);
18
- --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); /* Transizione "Apple" */
19
- }
20
-
21
- [data-theme="light"] {
22
- --bg-dark: #f5f7fa;
23
- --bg-sidebar: rgba(255, 255, 255, 0.9);
24
- --bg-glass: rgba(0, 0, 0, 0.03);
25
- --text-main: #222222;
26
- --text-muted: #666666;
27
- --border-glass: rgba(0, 0, 0, 0.1);
28
- --shadow-premium: 0 20px 40px rgba(0,0,0,0.1);
29
  }
30
 
31
  * { margin: 0; padding: 0; box-sizing: border-box; }
32
 
33
  body {
34
- font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
35
- background-color: var(--bg-dark);
36
- color: var(--text-main);
 
37
  height: 100vh;
38
- display: flex;
39
  overflow: hidden;
40
- transition: background var(--transition);
41
  }
42
 
43
- /* --- HEADER & HAMBURGER --- */
44
  .header {
45
  position: fixed;
46
  top: 0; left: 0; right: 0;
47
- height: 60px;
48
  padding: 0 20px;
49
  display: flex;
 
50
  align-items: center;
51
  z-index: 1000;
52
  }
53
 
 
 
54
  .menu-btn {
55
- width: 44px; height: 44px;
56
- display: flex; flex-direction: column;
57
- justify-content: center; align-items: center;
58
  cursor: pointer;
59
- z-index: 1100;
60
- background: var(--bg-glass);
61
- border-radius: 12px;
62
- border: 1px solid var(--border-glass);
63
- transition: var(--transition);
64
- backdrop-filter: blur(5px);
65
  }
66
 
67
- .menu-btn:hover { background: rgba(255,255,255,0.08); }
68
-
69
- .menu-btn-line {
70
  width: 22px; height: 2px;
71
- background-color: var(--text-main);
72
- margin: 3px 0;
73
  transition: var(--transition);
74
- transform-origin: center;
75
- border-radius: 1px;
76
  }
77
 
78
- /* Animazione Hamburger a X */
79
- .menu-btn.active .menu-btn-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
80
- .menu-btn.active .menu-btn-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
81
- .menu-btn.active .menu-btn-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
82
 
83
- /* --- SIDEBAR SCORREVOLE --- */
84
- .sidebar {
85
- width: 300px;
86
- background: var(--bg-sidebar);
87
- backdrop-filter: blur(30px); /* Effetto vetro più forte */
88
- height: 100vh;
89
- position: fixed;
90
- left: -300px;
91
- top: 0;
92
- z-index: 900;
93
- transition: var(--transition);
94
  display: flex;
95
- flex-direction: column;
96
- padding: 80px 20px 20px;
97
- border-right: 1px solid var(--border-glass);
98
- box-shadow: 20px 0 50px rgba(0,0,0,0.5);
99
- }
100
-
101
- .sidebar.open { transform: translateX(300px); }
102
-
103
- .history-title {
104
- font-size: 11px;
105
- text-transform: uppercase;
106
- color: var(--text-muted);
107
- letter-spacing: 2px;
108
- margin-bottom: 25px;
109
- font-weight: 600;
110
  }
111
 
112
- .chat-list {
113
- flex: 1;
114
- overflow-y: auto;
115
- color: var(--text-muted);
116
- font-size: 14px;
117
- font-style: italic;
118
  }
119
 
120
- /* Profilo Utente in fondo alla Sidebar */
121
- .profile-section {
122
- padding: 12px 15px;
123
- background: var(--bg-glass);
124
- border-radius: 18px;
125
- display: flex;
126
- align-items: center;
127
- gap: 15px;
128
- cursor: pointer;
129
  transition: var(--transition);
130
- border: 1px solid var(--border-glass);
131
- backdrop-filter: blur(10px);
 
132
  }
133
 
134
- .profile-section:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
135
 
136
- .avatar {
137
- width: 38px; height: 38px;
138
- border-radius: 50%;
139
- background: var(--text-main);
140
- color: var(--bg-dark);
141
- font-family: 'Georgia', serif; /* Font elegante per la 'M' */
142
- font-size: 20px;
143
- font-weight: bold;
144
- display: flex; align-items: center; justify-content: center;
145
  }
146
 
147
- /* --- LOGO CENTRALE & RAINBOW --- */
148
- .main-content {
149
  flex: 1;
150
  display: flex;
151
  flex-direction: column;
152
  align-items: center;
153
  justify-content: center;
154
- position: relative;
155
  }
156
 
157
- .logo-container {
158
- position: relative;
159
  text-align: center;
160
- z-index: 10;
 
161
  }
162
 
163
- .logo-aura {
 
 
 
 
 
 
 
 
 
164
  position: absolute;
165
  top: 50%; left: 50%;
166
  transform: translate(-50%, -50%);
167
- width: 300px; height: 300px; /* Aura più grande */
168
- background: var(--primary-rainbow);
169
- background-size: 400%;
170
- filter: blur(90px); /* Blur più intenso per l'effetto "sbiadito" */
171
- opacity: 0.35;
172
- border-radius: 50%;
173
- animation: rainbow-pulse 5s infinite alternate; /* Animazione più complessa */
174
  }
175
 
176
- .logo-text {
177
- font-family: 'Times New Roman', serif; /* Font elegante simile all'immagine */
178
- font-size: 5.5rem;
179
- font-weight: 700;
180
- letter-spacing: 1px;
181
- /* Effetto testo in rilievo/scolpito */
182
- color: #e0e0e0;
183
- text-shadow: 2px 2px 4px rgba(0,0,0,0.5), -1px -1px 2px rgba(255,255,255,0.1);
184
- position: relative;
185
- }
186
-
187
  .sub-text {
188
- color: var(--text-muted);
189
- font-size: 13px;
190
- letter-spacing: 4px;
191
- margin-top: 20px;
192
- font-weight: 500;
193
- text-transform: uppercase;
194
- opacity: 0.7;
195
- }
196
-
197
- @keyframes rainbow-pulse {
198
- 0% { background-position: 0% 50%; transform: translate(-50%, -50%) scale(0.9); opacity: 0.3; }
199
- 100% { background-position: 100% 50%; transform: translate(-50%, -50%) scale(1.1); opacity: 0.45; }
200
  }
201
 
202
- /* --- INPUT AREA --- */
203
- .input-container {
204
- position: fixed;
205
- bottom: 35px;
206
  width: 100%;
207
- max-width: 780px;
208
- padding: 0 20px;
209
  }
210
 
211
  .input-box {
212
- background: var(--bg-sidebar);
213
- border: 1px solid var(--border-glass);
214
- border-radius: 28px;
215
- padding: 10px 10px 10px 25px;
216
  display: flex;
217
  align-items: center;
218
- backdrop-filter: blur(20px);
219
- box-shadow: var(--shadow-premium);
220
  transition: var(--transition);
221
  }
222
-
223
  .input-box:focus-within {
224
- border-color: rgba(255, 255, 255, 0.2);
225
- box-shadow: 0 25px 50px rgba(0,0,0,0.7);
226
  }
227
 
228
  textarea {
@@ -230,168 +172,145 @@
230
  background: transparent;
231
  border: none;
232
  outline: none;
233
- color: var(--text-main);
 
234
  font-size: 16px;
235
- padding: 12px 0;
236
  resize: none;
237
- max-height: 150px;
238
- font-family: inherit;
239
  }
240
-
241
- textarea::placeholder { color: var(--text-muted); opacity: 0.7; }
242
 
243
- .send-btn {
244
- width: 46px; height: 46px;
245
- background: var(--text-main);
246
- border-radius: 50%;
247
  border: none;
248
  cursor: pointer;
249
- margin-left: 15px;
250
- display: flex; align-items: center; justify-content: center;
251
- transition: var(--transition);
252
- box-shadow: 0 4px 15px rgba(0,0,0,0.3);
253
  }
254
 
255
- .send-btn:hover { transform: scale(1.08); background: #ffffff; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
256
- .send-btn svg { stroke: var(--bg-dark); transition: var(--transition); }
257
 
258
- /* MODALE SETTINGS */
259
- .modal-overlay {
260
- position: fixed; inset: 0;
261
- background: rgba(0,0,0,0.8);
262
- backdrop-filter: blur(15px);
263
- display: flex; align-items: center; justify-content: center;
264
- opacity: 0; visibility: hidden; z-index: 2000;
265
- transition: var(--transition);
266
  }
267
- .modal-overlay.active { opacity: 1; visibility: visible; }
268
 
269
- .modal {
270
- background: var(--bg-sidebar);
271
- width: 90%; max-width: 420px;
272
- padding: 35px; border-radius: 30px;
273
- border: 1px solid var(--border-glass);
274
- text-align: center;
275
- box-shadow: var(--shadow-premium);
 
276
  }
277
 
278
- .toggle-row {
279
- display: flex; justify-content: space-between;
280
- align-items: center; margin-top: 30px;
281
- padding: 15px;
282
- background: var(--bg-glass);
283
- border-radius: 15px;
284
- }
285
-
286
- /* Stile Toggle Personalizzato */
287
- input[type="checkbox"] {
288
- appearance: none; width: 50px; height: 28px;
289
- background: var(--border-glass); border-radius: 14px;
290
- position: relative; cursor: pointer; transition: var(--transition);
291
  }
292
- input[type="checkbox"]::before {
293
- content: ''; position: absolute; top: 3px; left: 3px;
294
- width: 22px; height: 22px; background: var(--text-main);
295
- border-radius: 50%; transition: var(--transition);
 
 
 
 
296
  }
297
- input[type="checkbox"]:checked { background: #4CD964; }
298
- input[type="checkbox"]:checked::before { transform: translateX(22px); background: #fff; }
299
 
300
  </style>
301
  </head>
302
  <body>
303
 
304
- <div class="header">
305
- <div class="menu-btn" id="hamburger">
306
- <div class="menu-btn-line"></div>
307
- <div class="menu-btn-line"></div>
308
- <div class="menu-btn-line"></div>
 
 
 
309
  </div>
310
- </div>
311
-
312
- <aside class="sidebar" id="sidebar">
313
- <div class="history-title">Cronologia Chat</div>
314
- <div class="chat-list">
315
- <div style="padding: 15px 0; text-align: center; opacity: 0.6;">Nessuna conversazione recente</div>
316
  </div>
 
317
 
318
- <div class="profile-section" id="profileBtn">
319
- <div class="avatar">M</div>
320
- <div style="flex: 1;">
321
- <div style="font-size: 15px; font-weight: 600;">Utente Locale</div>
322
- <div style="font-size: 12px; color: var(--text-muted);">Impostazioni DAC</div>
323
- </div>
324
- <span style="font-size: 18px; opacity: 0.7;">⚙️</span>
325
  </div>
326
  </aside>
327
 
328
- <main class="main-content">
329
- <div class="logo-container">
330
- <div class="logo-aura"></div>
331
  <h1 class="logo-text">DAC</h1>
332
  <p class="sub-text">PRIVATE INTELLIGENCE</p>
333
  </div>
334
 
335
- <div class="input-container">
336
  <div class="input-box">
337
- <textarea id="chatInput" placeholder="Chiedi a DAC..." rows="1"></textarea>
338
- <button class="send-btn">
339
- <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>
 
 
 
340
  </button>
341
  </div>
342
- </div>
343
- </main>
344
 
345
- <div class="modal-overlay" id="modal">
346
- <div class="modal">
347
- <h2 style="margin-bottom: 15px; font-size: 22px;">Impostazioni</h2>
348
- <p style="color: var(--text-muted); font-size: 14px;">Personalizza la tua esperienza locale.</p>
349
-
350
- <div class="toggle-row">
351
- <span style="font-weight: 500;">Tema Scuro</span>
352
- <input type="checkbox" checked id="themeToggle">
353
  </div>
354
-
355
- <button id="closeModal" style="margin-top: 35px; background: var(--text-main); color: var(--bg-dark); border: none; padding: 14px 30px; border-radius: 16px; cursor: pointer; font-weight: 700; width: 100%; transition: var(--transition);">Salva e Chiudi</button>
356
  </div>
357
- </div>
358
 
359
  <script>
360
- const hamburger = document.getElementById('hamburger');
361
  const sidebar = document.getElementById('sidebar');
362
- const profileBtn = document.getElementById('profileBtn');
363
- const modal = document.getElementById('modal');
364
- const closeModal = document.getElementById('closeModal');
365
- const themeToggle = document.getElementById('themeToggle');
366
- const chatInput = document.getElementById('chatInput');
367
-
368
- // Toggle Sidebar & Hamburger Animation
369
- hamburger.addEventListener('click', () => {
370
- hamburger.classList.toggle('active');
371
- sidebar.classList.toggle('open');
372
- });
373
 
374
- // Close sidebar if clicking main content
375
- document.querySelector('.main-content').addEventListener('click', () => {
376
- sidebar.classList.remove('open');
377
- hamburger.classList.remove('active');
378
  });
379
 
380
- // Modal Logic
381
- profileBtn.addEventListener('click', () => modal.classList.add('active'));
382
- closeModal.addEventListener('click', () => modal.classList.remove('active'));
383
-
384
- // Theme Toggle
385
- themeToggle.addEventListener('change', () => {
386
- const mode = themeToggle.checked ? 'dark' : 'light';
387
- document.documentElement.setAttribute('data-theme', mode);
388
  });
389
 
390
  // Auto-resize textarea
391
- chatInput.addEventListener('input', function() {
392
- this.style.height = 'auto';
393
- this.style.height = (this.scrollHeight) + 'px';
394
- });
 
 
 
 
 
 
395
  </script>
396
  </body>
397
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DAC - Private Intelligence</title>
7
  <style>
8
  :root {
9
+ --bg-black: #000000;
10
+ --bg-card: #1e1f20; /* Grigio scuro tipico delle AI moderne */
11
+ --bg-sidebar: #131314;
12
+ --text-white: #ffffff;
13
+ --text-gray: #b4b4b4;
14
+ --rainbow: linear-gradient(90deg, #4285f4, #9b72cb, #d96570, #4285f4);
15
+ --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
  * { margin: 0; padding: 0; box-sizing: border-box; }
19
 
20
  body {
21
+ font-family: "Arial Black", "Arial Bold", Arial, sans-serif;
22
+ font-weight: 900;
23
+ background-color: var(--bg-black);
24
+ color: var(--text-white);
25
  height: 100vh;
 
26
  overflow: hidden;
27
+ display: flex;
28
  }
29
 
30
+ /* --- HEADER --- */
31
  .header {
32
  position: fixed;
33
  top: 0; left: 0; right: 0;
34
+ height: 64px;
35
  padding: 0 20px;
36
  display: flex;
37
+ justify-content: space-between;
38
  align-items: center;
39
  z-index: 1000;
40
  }
41
 
42
+ .header-left { display: flex; align-items: center; gap: 15px; }
43
+
44
  .menu-btn {
 
 
 
45
  cursor: pointer;
46
+ padding: 10px;
47
+ display: flex;
48
+ flex-direction: column;
49
+ gap: 5px;
 
 
50
  }
51
 
52
+ .menu-btn div {
 
 
53
  width: 22px; height: 2px;
54
+ background: white;
 
55
  transition: var(--transition);
 
 
56
  }
57
 
58
+ /* Animazione X */
59
+ .menu-btn.active .line1 { transform: translateY(7px) rotate(45deg); }
60
+ .menu-btn.active .line2 { opacity: 0; }
61
+ .menu-btn.active .line3 { transform: translateY(-7px) rotate(-45deg); }
62
 
63
+ .user-profile {
64
+ width: 40px; height: 40px;
65
+ background: #2b2c2d;
66
+ border-radius: 50%;
 
 
 
 
 
 
 
67
  display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ cursor: pointer;
71
+ border: 1px solid rgba(255,255,255,0.1);
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
+ .user-profile span {
75
+ font-family: "Times New Roman", serif;
76
+ font-size: 20px;
77
+ font-weight: normal;
 
 
78
  }
79
 
80
+ /* --- SIDEBAR --- */
81
+ .sidebar {
82
+ position: fixed;
83
+ left: -300px;
84
+ top: 0;
85
+ bottom: 0;
86
+ width: 300px;
87
+ background: var(--bg-sidebar);
 
88
  transition: var(--transition);
89
+ z-index: 900;
90
+ padding: 80px 20px;
91
+ border-right: 1px solid #303134;
92
  }
93
 
94
+ .sidebar.open { left: 0; }
95
 
96
+ .sidebar-title {
97
+ font-size: 12px;
98
+ color: var(--text-gray);
99
+ margin-bottom: 20px;
100
+ text-transform: uppercase;
 
 
 
 
101
  }
102
 
103
+ /* --- MAIN CONTENT --- */
104
+ .main-container {
105
  flex: 1;
106
  display: flex;
107
  flex-direction: column;
108
  align-items: center;
109
  justify-content: center;
110
+ padding: 20px;
111
  }
112
 
113
+ .logo-area {
 
114
  text-align: center;
115
+ margin-bottom: 40px;
116
+ position: relative;
117
  }
118
 
119
+ .logo-text {
120
+ font-size: 80px;
121
+ letter-spacing: -2px;
122
+ margin-bottom: 10px;
123
+ background: white;
124
+ -webkit-background-clip: text;
125
+ -webkit-text-fill-color: transparent;
126
+ }
127
+
128
+ .aura {
129
  position: absolute;
130
  top: 50%; left: 50%;
131
  transform: translate(-50%, -50%);
132
+ width: 200px; height: 200px;
133
+ background: var(--rainbow);
134
+ background-size: 300% 300%;
135
+ filter: blur(80px);
136
+ opacity: 0.4;
137
+ z-index: -1;
138
+ animation: rainbowShift 3s linear infinite;
139
  }
140
 
 
 
 
 
 
 
 
 
 
 
 
141
  .sub-text {
142
+ font-size: 14px;
143
+ color: var(--text-gray);
144
+ letter-spacing: 5px;
145
+ font-weight: bold;
 
 
 
 
 
 
 
 
146
  }
147
 
148
+ /* --- CHAT INPUT (GEMINI STYLE) --- */
149
+ .input-wrapper {
 
 
150
  width: 100%;
151
+ max-width: 800px;
152
+ position: relative;
153
  }
154
 
155
  .input-box {
156
+ background: var(--bg-card);
157
+ border-radius: 32px;
158
+ padding: 12px 24px;
 
159
  display: flex;
160
  align-items: center;
161
+ gap: 15px;
 
162
  transition: var(--transition);
163
  }
164
+
165
  .input-box:focus-within {
166
+ background: #28292a;
167
+ box-shadow: 0 4px 20px rgba(0,0,0,0.5);
168
  }
169
 
170
  textarea {
 
172
  background: transparent;
173
  border: none;
174
  outline: none;
175
+ color: white;
176
+ font-family: Arial, sans-serif;
177
  font-size: 16px;
178
+ font-weight: bold;
179
  resize: none;
180
+ padding: 10px 0;
 
181
  }
 
 
182
 
183
+ .icon-btn {
184
+ background: transparent;
 
 
185
  border: none;
186
  cursor: pointer;
187
+ color: var(--text-gray);
188
+ display: flex;
189
+ align-items: center;
190
+ justify-content: center;
191
  }
192
 
193
+ .icon-btn:hover { color: white; }
 
194
 
195
+ /* SUGGESTION CHIPS */
196
+ .suggestions {
197
+ display: flex;
198
+ gap: 10px;
199
+ margin-top: 20px;
200
+ justify-content: center;
 
 
201
  }
 
202
 
203
+ .chip {
204
+ background: #1e1f20;
205
+ padding: 8px 16px;
206
+ border-radius: 12px;
207
+ font-size: 13px;
208
+ cursor: pointer;
209
+ border: 1px solid #303134;
210
+ transition: 0.2s;
211
  }
212
 
213
+ .chip:hover { background: #333537; }
214
+
215
+ @keyframes rainbowShift {
216
+ 0% { background-position: 0% 50%; }
217
+ 50% { background-position: 100% 50%; }
218
+ 100% { background-position: 0% 50%; }
 
 
 
 
 
 
 
219
  }
220
+
221
+ /* TEMA LIGHT */
222
+ [data-theme="light"] {
223
+ --bg-black: #ffffff;
224
+ --bg-card: #f0f4f9;
225
+ --bg-sidebar: #f8fafd;
226
+ --text-white: #1f1f1f;
227
+ --text-gray: #444746;
228
  }
 
 
229
 
230
  </style>
231
  </head>
232
  <body>
233
 
234
+ <header class="header">
235
+ <div class="header-left">
236
+ <div class="menu-btn" id="menuToggle">
237
+ <div class="line1"></div>
238
+ <div class="line2"></div>
239
+ <div class="line3"></div>
240
+ </div>
241
+ <span style="font-size: 18px; letter-spacing: 1px;">DAC AI</span>
242
  </div>
243
+
244
+ <div class="user-profile" id="userProfile">
245
+ <span>M</span>
 
 
 
246
  </div>
247
+ </header>
248
 
249
+ <aside class="sidebar" id="sidebar">
250
+ <div class="sidebar-title">Recenti</div>
251
+ <div style="color: var(--text-gray); font-size: 14px; text-align: center; margin-top: 40px;">
252
+ Le tue conversazioni appariranno qui.
 
 
 
253
  </div>
254
  </aside>
255
 
256
+ <main class="main-container">
257
+ <div class="logo-area">
258
+ <div class="aura"></div>
259
  <h1 class="logo-text">DAC</h1>
260
  <p class="sub-text">PRIVATE INTELLIGENCE</p>
261
  </div>
262
 
263
+ <div class="input-wrapper">
264
  <div class="input-box">
265
+ <button class="icon-btn">
266
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>
267
+ </button>
268
+ <textarea placeholder="Chiedi a DAC..." rows="1"></textarea>
269
+ <button class="icon-btn">
270
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" y1="19" x2="12" y2="23"/><line x1="8" y1="23" x2="16" y2="23"/></svg>
271
  </button>
272
  </div>
 
 
273
 
274
+ <div class="suggestions">
275
+ <div class="chip">Crea un piano</div>
276
+ <div class="chip">Analizza codice</div>
277
+ <div class="chip">Aiutami a scrivere</div>
 
 
 
 
278
  </div>
 
 
279
  </div>
280
+ </main>
281
 
282
  <script>
283
+ const menuToggle = document.getElementById('menuToggle');
284
  const sidebar = document.getElementById('sidebar');
285
+ const userProfile = document.getElementById('userProfile');
 
 
 
 
 
 
 
 
 
 
286
 
287
+ // Toggle Sidebar
288
+ menuToggle.addEventListener('click', () => {
289
+ menuToggle.classList.toggle('active');
290
+ sidebar.classList.toggle('open');
291
  });
292
 
293
+ // Toggle Theme (Dark/Light) su click profilo
294
+ userProfile.addEventListener('click', () => {
295
+ const currentTheme = document.body.getAttribute('data-theme');
296
+ if(currentTheme === 'light') {
297
+ document.body.removeAttribute('data-theme');
298
+ } else {
299
+ document.body.setAttribute('data-theme', 'light');
300
+ }
301
  });
302
 
303
  // Auto-resize textarea
304
+ const tx = document.getElementsByTagName('textarea');
305
+ for (let i = 0; i < tx.length; i++) {
306
+ tx[i].setAttribute('style', 'height:' + (tx[i].scrollHeight) + 'px;overflow-y:hidden;');
307
+ tx[i].addEventListener("input", OnInput, false);
308
+ }
309
+
310
+ function OnInput() {
311
+ this.style.height = 'auto';
312
+ this.style.height = (this.scrollHeight) + 'px';
313
+ }
314
  </script>
315
  </body>
316
  </html>