hellork commited on
Commit
1a7d879
·
verified ·
1 Parent(s): a58f166

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +1349 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Windows In The Browser
3
- emoji: 📊
4
- colorFrom: red
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: windows-in-the-browser
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1349 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Windows 12 Web</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
14
+ background-image: url('https://4kwallpapers.com/images/wallpapers/windows-11-dark-mode-stock-official-3840x2400-5630.jpg');
15
+ background-size: cover;
16
+ background-position: center;
17
+ height: 100vh;
18
+ margin: 0;
19
+ overflow: hidden;
20
+ user-select: none;
21
+ }
22
+
23
+ .window {
24
+ position: absolute;
25
+ background-color: rgba(32, 32, 32, 0.9);
26
+ border-radius: 8px;
27
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
28
+ backdrop-filter: blur(10px);
29
+ border: 1px solid rgba(255, 255, 255, 0.1);
30
+ overflow: hidden;
31
+ display: none;
32
+ flex-direction: column;
33
+ min-width: 300px;
34
+ min-height: 200px;
35
+ }
36
+
37
+ .window-header {
38
+ background-color: rgba(40, 40, 40, 0.9);
39
+ padding: 8px 12px;
40
+ display: flex;
41
+ justify-content: space-between;
42
+ align-items: center;
43
+ cursor: move;
44
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
45
+ }
46
+
47
+ .window-title {
48
+ color: white;
49
+ font-size: 12px;
50
+ font-weight: 500;
51
+ }
52
+
53
+ .window-controls {
54
+ display: flex;
55
+ gap: 8px;
56
+ }
57
+
58
+ .window-btn {
59
+ width: 12px;
60
+ height: 12px;
61
+ border-radius: 50%;
62
+ border: none;
63
+ cursor: pointer;
64
+ }
65
+
66
+ .close-btn { background-color: #ff5f56; }
67
+ .minimize-btn { background-color: #ffbd2e; }
68
+ .maximize-btn { background-color: #27c93f; }
69
+
70
+ .window-content {
71
+ flex: 1;
72
+ padding: 12px;
73
+ overflow: auto;
74
+ }
75
+
76
+ .taskbar {
77
+ position: fixed;
78
+ bottom: 0;
79
+ left: 0;
80
+ right: 0;
81
+ height: 48px;
82
+ background-color: rgba(32, 32, 32, 0.7);
83
+ backdrop-filter: blur(20px);
84
+ display: flex;
85
+ justify-content: center;
86
+ align-items: center;
87
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
88
+ z-index: 1000;
89
+ }
90
+
91
+ .start-button {
92
+ background-color: transparent;
93
+ border: none;
94
+ color: white;
95
+ font-size: 14px;
96
+ cursor: pointer;
97
+ padding: 8px 16px;
98
+ border-radius: 4px;
99
+ transition: background-color 0.2s;
100
+ }
101
+
102
+ .start-button:hover {
103
+ background-color: rgba(255, 255, 255, 0.1);
104
+ }
105
+
106
+ .taskbar-icons {
107
+ display: flex;
108
+ gap: 8px;
109
+ position: absolute;
110
+ left: 12px;
111
+ }
112
+
113
+ .taskbar-icon {
114
+ width: 40px;
115
+ height: 40px;
116
+ display: flex;
117
+ justify-content: center;
118
+ align-items: center;
119
+ border-radius: 4px;
120
+ cursor: pointer;
121
+ transition: background-color 0.2s;
122
+ }
123
+
124
+ .taskbar-icon:hover {
125
+ background-color: rgba(255, 255, 255, 0.1);
126
+ }
127
+
128
+ .taskbar-icon i {
129
+ font-size: 18px;
130
+ color: white;
131
+ }
132
+
133
+ .start-menu {
134
+ position: fixed;
135
+ bottom: 60px;
136
+ left: 50%;
137
+ transform: translateX(-50%);
138
+ width: 600px;
139
+ height: 650px;
140
+ background-color: rgba(32, 32, 32, 0.9);
141
+ border-radius: 8px;
142
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
143
+ backdrop-filter: blur(20px);
144
+ border: 1px solid rgba(255, 255, 255, 0.1);
145
+ display: none;
146
+ flex-direction: column;
147
+ overflow: hidden;
148
+ z-index: 1001;
149
+ }
150
+
151
+ .search-bar {
152
+ padding: 16px;
153
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
154
+ }
155
+
156
+ .search-input {
157
+ width: 100%;
158
+ padding: 8px 16px;
159
+ background-color: rgba(255, 255, 255, 0.05);
160
+ border: 1px solid rgba(255, 255, 255, 0.1);
161
+ border-radius: 4px;
162
+ color: white;
163
+ font-size: 14px;
164
+ }
165
+
166
+ .pinned-apps {
167
+ padding: 16px;
168
+ flex: 1;
169
+ overflow-y: auto;
170
+ }
171
+
172
+ .app-grid {
173
+ display: grid;
174
+ grid-template-columns: repeat(6, 1fr);
175
+ gap: 12px;
176
+ }
177
+
178
+ .app-icon {
179
+ display: flex;
180
+ flex-direction: column;
181
+ align-items: center;
182
+ padding: 12px;
183
+ border-radius: 6px;
184
+ cursor: pointer;
185
+ transition: background-color 0.2s;
186
+ }
187
+
188
+ .app-icon:hover {
189
+ background-color: rgba(255, 255, 255, 0.1);
190
+ }
191
+
192
+ .app-icon i {
193
+ font-size: 24px;
194
+ color: white;
195
+ margin-bottom: 8px;
196
+ }
197
+
198
+ .app-icon span {
199
+ color: white;
200
+ font-size: 12px;
201
+ text-align: center;
202
+ }
203
+
204
+ .recommended {
205
+ padding: 16px;
206
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
207
+ }
208
+
209
+ .recommended-title {
210
+ color: rgba(255, 255, 255, 0.7);
211
+ font-size: 12px;
212
+ margin-bottom: 12px;
213
+ }
214
+
215
+ .recommended-list {
216
+ display: flex;
217
+ flex-direction: column;
218
+ gap: 8px;
219
+ }
220
+
221
+ .recommended-item {
222
+ display: flex;
223
+ align-items: center;
224
+ padding: 8px;
225
+ border-radius: 4px;
226
+ cursor: pointer;
227
+ transition: background-color 0.2s;
228
+ }
229
+
230
+ .recommended-item:hover {
231
+ background-color: rgba(255, 255, 255, 0.1);
232
+ }
233
+
234
+ .recommended-item i {
235
+ font-size: 16px;
236
+ color: white;
237
+ margin-right: 12px;
238
+ }
239
+
240
+ .recommended-item span {
241
+ color: white;
242
+ font-size: 14px;
243
+ }
244
+
245
+ .user-menu {
246
+ position: fixed;
247
+ bottom: 60px;
248
+ right: 12px;
249
+ width: 300px;
250
+ background-color: rgba(32, 32, 32, 0.9);
251
+ border-radius: 8px;
252
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
253
+ backdrop-filter: blur(20px);
254
+ border: 1px solid rgba(255, 255, 255, 0.1);
255
+ display: none;
256
+ flex-direction: column;
257
+ overflow: hidden;
258
+ z-index: 1001;
259
+ }
260
+
261
+ .user-profile {
262
+ display: flex;
263
+ align-items: center;
264
+ padding: 16px;
265
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
266
+ }
267
+
268
+ .user-avatar {
269
+ width: 40px;
270
+ height: 40px;
271
+ border-radius: 50%;
272
+ background-color: #0078d7;
273
+ display: flex;
274
+ justify-content: center;
275
+ align-items: center;
276
+ margin-right: 12px;
277
+ color: white;
278
+ font-weight: bold;
279
+ }
280
+
281
+ .user-info {
282
+ flex: 1;
283
+ }
284
+
285
+ .user-name {
286
+ color: white;
287
+ font-size: 14px;
288
+ font-weight: 500;
289
+ }
290
+
291
+ .user-email {
292
+ color: rgba(255, 255, 255, 0.7);
293
+ font-size: 12px;
294
+ }
295
+
296
+ .user-options {
297
+ padding: 8px 0;
298
+ }
299
+
300
+ .user-option {
301
+ display: flex;
302
+ align-items: center;
303
+ padding: 8px 16px;
304
+ cursor: pointer;
305
+ transition: background-color 0.2s;
306
+ }
307
+
308
+ .user-option:hover {
309
+ background-color: rgba(255, 255, 255, 0.1);
310
+ }
311
+
312
+ .user-option i {
313
+ font-size: 16px;
314
+ color: white;
315
+ margin-right: 12px;
316
+ }
317
+
318
+ .user-option span {
319
+ color: white;
320
+ font-size: 14px;
321
+ }
322
+
323
+ .power-options {
324
+ padding: 8px 0;
325
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
326
+ }
327
+
328
+ /* Minesweeper styles */
329
+ .minesweeper-board {
330
+ display: grid;
331
+ grid-template-columns: repeat(10, 30px);
332
+ grid-template-rows: repeat(10, 30px);
333
+ gap: 1px;
334
+ margin: 0 auto;
335
+ }
336
+
337
+ .minesweeper-cell {
338
+ width: 30px;
339
+ height: 30px;
340
+ background-color: #ddd;
341
+ display: flex;
342
+ justify-content: center;
343
+ align-items: center;
344
+ font-size: 14px;
345
+ font-weight: bold;
346
+ cursor: pointer;
347
+ user-select: none;
348
+ }
349
+
350
+ .minesweeper-cell.revealed {
351
+ background-color: #bbb;
352
+ }
353
+
354
+ .minesweeper-cell.flagged {
355
+ background-color: #ddd;
356
+ color: red;
357
+ }
358
+
359
+ .minesweeper-cell.mine {
360
+ background-color: #ff4444;
361
+ color: white;
362
+ }
363
+
364
+ /* Calculator styles */
365
+ .calculator {
366
+ display: grid;
367
+ grid-template-columns: repeat(4, 1fr);
368
+ grid-gap: 8px;
369
+ width: 240px;
370
+ margin: 0 auto;
371
+ }
372
+
373
+ .calculator-display {
374
+ grid-column: span 4;
375
+ height: 60px;
376
+ background-color: #f0f0f0;
377
+ border-radius: 4px;
378
+ display: flex;
379
+ flex-direction: column;
380
+ justify-content: flex-end;
381
+ align-items: flex-end;
382
+ padding: 8px;
383
+ font-family: 'Segoe UI', sans-serif;
384
+ }
385
+
386
+ .calculator-history {
387
+ font-size: 12px;
388
+ color: #666;
389
+ height: 16px;
390
+ }
391
+
392
+ .calculator-input {
393
+ font-size: 24px;
394
+ font-weight: 500;
395
+ }
396
+
397
+ .calculator-btn {
398
+ height: 50px;
399
+ border: none;
400
+ border-radius: 4px;
401
+ font-size: 18px;
402
+ cursor: pointer;
403
+ transition: background-color 0.2s;
404
+ }
405
+
406
+ .calculator-btn.number {
407
+ background-color: #f0f0f0;
408
+ }
409
+
410
+ .calculator-btn.number:hover {
411
+ background-color: #e0e0e0;
412
+ }
413
+
414
+ .calculator-btn.operator {
415
+ background-color: #e0e0e0;
416
+ }
417
+
418
+ .calculator-btn.operator:hover {
419
+ background-color: #d0d0d0;
420
+ }
421
+
422
+ .calculator-btn.equals {
423
+ background-color: #4CAF50;
424
+ color: white;
425
+ }
426
+
427
+ .calculator-btn.equals:hover {
428
+ background-color: #45a049;
429
+ }
430
+
431
+ .calculator-btn.clear {
432
+ background-color: #f44336;
433
+ color: white;
434
+ }
435
+
436
+ .calculator-btn.clear:hover {
437
+ background-color: #d32f2f;
438
+ }
439
+
440
+ /* Notepad styles */
441
+ .notepad-textarea {
442
+ width: 100%;
443
+ height: 100%;
444
+ background-color: transparent;
445
+ border: none;
446
+ resize: none;
447
+ color: white;
448
+ font-family: 'Segoe UI', sans-serif;
449
+ font-size: 14px;
450
+ line-height: 1.5;
451
+ padding: 8px;
452
+ }
453
+
454
+ .notepad-textarea:focus {
455
+ outline: none;
456
+ }
457
+
458
+ /* Paint styles */
459
+ .paint-tools {
460
+ display: flex;
461
+ gap: 8px;
462
+ margin-bottom: 12px;
463
+ }
464
+
465
+ .paint-tool {
466
+ width: 32px;
467
+ height: 32px;
468
+ display: flex;
469
+ justify-content: center;
470
+ align-items: center;
471
+ background-color: rgba(255, 255, 255, 0.1);
472
+ border-radius: 4px;
473
+ cursor: pointer;
474
+ }
475
+
476
+ .paint-tool.active {
477
+ background-color: rgba(255, 255, 255, 0.2);
478
+ }
479
+
480
+ .paint-tool i {
481
+ color: white;
482
+ font-size: 16px;
483
+ }
484
+
485
+ .paint-colors {
486
+ display: flex;
487
+ gap: 8px;
488
+ margin-bottom: 12px;
489
+ flex-wrap: wrap;
490
+ }
491
+
492
+ .paint-color {
493
+ width: 24px;
494
+ height: 24px;
495
+ border-radius: 50%;
496
+ cursor: pointer;
497
+ border: 2px solid transparent;
498
+ }
499
+
500
+ .paint-color.active {
501
+ border-color: white;
502
+ }
503
+
504
+ .paint-canvas-container {
505
+ flex: 1;
506
+ overflow: auto;
507
+ }
508
+
509
+ .paint-canvas {
510
+ background-color: white;
511
+ cursor: crosshair;
512
+ }
513
+
514
+ /* Desktop icons */
515
+ .desktop-icons {
516
+ position: absolute;
517
+ top: 20px;
518
+ left: 20px;
519
+ display: flex;
520
+ flex-direction: column;
521
+ gap: 20px;
522
+ }
523
+
524
+ .desktop-icon {
525
+ display: flex;
526
+ flex-direction: column;
527
+ align-items: center;
528
+ width: 80px;
529
+ cursor: pointer;
530
+ }
531
+
532
+ .desktop-icon i {
533
+ font-size: 32px;
534
+ color: white;
535
+ margin-bottom: 8px;
536
+ }
537
+
538
+ .desktop-icon span {
539
+ color: white;
540
+ font-size: 12px;
541
+ text-align: center;
542
+ text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
543
+ }
544
+
545
+ /* Draggable window functionality */
546
+ .draggable {
547
+ position: absolute;
548
+ z-index: 100;
549
+ }
550
+
551
+ /* Right-click context menu */
552
+ .context-menu {
553
+ position: absolute;
554
+ background-color: rgba(32, 32, 32, 0.9);
555
+ border-radius: 6px;
556
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
557
+ backdrop-filter: blur(10px);
558
+ border: 1px solid rgba(255, 255, 255, 0.1);
559
+ padding: 8px 0;
560
+ display: none;
561
+ z-index: 1002;
562
+ }
563
+
564
+ .context-menu-item {
565
+ padding: 8px 16px;
566
+ color: white;
567
+ font-size: 12px;
568
+ cursor: pointer;
569
+ display: flex;
570
+ align-items: center;
571
+ }
572
+
573
+ .context-menu-item:hover {
574
+ background-color: rgba(255, 255, 255, 0.1);
575
+ }
576
+
577
+ .context-menu-item i {
578
+ margin-right: 8px;
579
+ font-size: 14px;
580
+ }
581
+
582
+ .context-menu-separator {
583
+ height: 1px;
584
+ background-color: rgba(255, 255, 255, 0.1);
585
+ margin: 4px 0;
586
+ }
587
+ </style>
588
+ </head>
589
+ <body>
590
+ <!-- Desktop Icons -->
591
+ <div class="desktop-icons">
592
+ <div class="desktop-icon" onclick="openApp('minesweeper')">
593
+ <i class="fas fa-bomb"></i>
594
+ <span>Minesweeper</span>
595
+ </div>
596
+ <div class="desktop-icon" onclick="openApp('calculator')">
597
+ <i class="fas fa-calculator"></i>
598
+ <span>Calculator</span>
599
+ </div>
600
+ <div class="desktop-icon" onclick="openApp('notepad')">
601
+ <i class="fas fa-file-alt"></i>
602
+ <span>Notepad</span>
603
+ </div>
604
+ <div class="desktop-icon" onclick="openApp('paint')">
605
+ <i class="fas fa-paint-brush"></i>
606
+ <span>Paint</span>
607
+ </div>
608
+ </div>
609
+
610
+ <!-- Windows -->
611
+ <div id="minesweeper-window" class="window" style="width: 350px; height: 400px; top: 100px; left: 100px;">
612
+ <div class="window-header">
613
+ <div class="window-title">Minesweeper</div>
614
+ <div class="window-controls">
615
+ <button class="window-btn minimize-btn" onclick="minimizeWindow('minesweeper')"></button>
616
+ <button class="window-btn maximize-btn" onclick="maximizeWindow('minesweeper')"></button>
617
+ <button class="window-btn close-btn" onclick="closeWindow('minesweeper')"></button>
618
+ </div>
619
+ </div>
620
+ <div class="window-content">
621
+ <div class="minesweeper-board" id="minesweeper-board"></div>
622
+ </div>
623
+ </div>
624
+
625
+ <div id="calculator-window" class="window" style="width: 280px; height: 400px; top: 150px; left: 500px;">
626
+ <div class="window-header">
627
+ <div class="window-title">Calculator</div>
628
+ <div class="window-controls">
629
+ <button class="window-btn minimize-btn" onclick="minimizeWindow('calculator')"></button>
630
+ <button class="window-btn maximize-btn" onclick="maximizeWindow('calculator')"></button>
631
+ <button class="window-btn close-btn" onclick="closeWindow('calculator')"></button>
632
+ </div>
633
+ </div>
634
+ <div class="window-content">
635
+ <div class="calculator">
636
+ <div class="calculator-display">
637
+ <div class="calculator-history" id="calc-history"></div>
638
+ <div class="calculator-input" id="calc-input">0</div>
639
+ </div>
640
+ <button class="calculator-btn clear" onclick="clearCalculator()">C</button>
641
+ <button class="calculator-btn operator" onclick="appendToCalc('(')">(</button>
642
+ <button class="calculator-btn operator" onclick="appendToCalc(')')">)</button>
643
+ <button class="calculator-btn operator" onclick="appendToCalc('/')">/</button>
644
+ <button class="calculator-btn number" onclick="appendToCalc('7')">7</button>
645
+ <button class="calculator-btn number" onclick="appendToCalc('8')">8</button>
646
+ <button class="calculator-btn number" onclick="appendToCalc('9')">9</button>
647
+ <button class="calculator-btn operator" onclick="appendToCalc('*')">×</button>
648
+ <button class="calculator-btn number" onclick="appendToCalc('4')">4</button>
649
+ <button class="calculator-btn number" onclick="appendToCalc('5')">5</button>
650
+ <button class="calculator-btn number" onclick="appendToCalc('6')">6</button>
651
+ <button class="calculator-btn operator" onclick="appendToCalc('-')">-</button>
652
+ <button class="calculator-btn number" onclick="appendToCalc('1')">1</button>
653
+ <button class="calculator-btn number" onclick="appendToCalc('2')">2</button>
654
+ <button class="calculator-btn number" onclick="appendToCalc('3')">3</button>
655
+ <button class="calculator-btn operator" onclick="appendToCalc('+')">+</button>
656
+ <button class="calculator-btn number" onclick="appendToCalc('0')">0</button>
657
+ <button class="calculator-btn number" onclick="appendToCalc('.')">.</button>
658
+ <button class="calculator-btn equals" onclick="calculate()">=</button>
659
+ </div>
660
+ </div>
661
+ </div>
662
+
663
+ <div id="notepad-window" class="window" style="width: 500px; height: 400px; top: 200px; left: 300px;">
664
+ <div class="window-header">
665
+ <div class="window-title">Notepad</div>
666
+ <div class="window-controls">
667
+ <button class="window-btn minimize-btn" onclick="minimizeWindow('notepad')"></button>
668
+ <button class="window-btn maximize-btn" onclick="maximizeWindow('notepad')"></button>
669
+ <button class="window-btn close-btn" onclick="closeWindow('notepad')"></button>
670
+ </div>
671
+ </div>
672
+ <div class="window-content">
673
+ <textarea class="notepad-textarea" id="notepad-text" placeholder="Start typing here..."></textarea>
674
+ </div>
675
+ </div>
676
+
677
+ <div id="paint-window" class="window" style="width: 600px; height: 500px; top: 100px; left: 200px;">
678
+ <div class="window-header">
679
+ <div class="window-title">Paint</div>
680
+ <div class="window-controls">
681
+ <button class="window-btn minimize-btn" onclick="minimizeWindow('paint')"></button>
682
+ <button class="window-btn maximize-btn" onclick="maximizeWindow('paint')"></button>
683
+ <button class="window-btn close-btn" onclick="closeWindow('paint')"></button>
684
+ </div>
685
+ </div>
686
+ <div class="window-content" style="display: flex; flex-direction: column;">
687
+ <div class="paint-tools">
688
+ <div class="paint-tool active" data-tool="pencil" onclick="setPaintTool('pencil')">
689
+ <i class="fas fa-pencil-alt"></i>
690
+ </div>
691
+ <div class="paint-tool" data-tool="eraser" onclick="setPaintTool('eraser')">
692
+ <i class="fas fa-eraser"></i>
693
+ </div>
694
+ <div class="paint-tool" data-tool="fill" onclick="setPaintTool('fill')">
695
+ <i class="fas fa-fill-drip"></i>
696
+ </div>
697
+ <div class="paint-tool" data-tool="line" onclick="setPaintTool('line')">
698
+ <i class="fas fa-minus"></i>
699
+ </div>
700
+ <div class="paint-tool" data-tool="rectangle" onclick="setPaintTool('rectangle')">
701
+ <i class="far fa-square"></i>
702
+ </div>
703
+ <div class="paint-tool" data-tool="circle" onclick="setPaintTool('circle')">
704
+ <i class="far fa-circle"></i>
705
+ </div>
706
+ </div>
707
+ <div class="paint-colors">
708
+ <div class="paint-color active" style="background-color: #000000;" data-color="#000000" onclick="setPaintColor('#000000')"></div>
709
+ <div class="paint-color" style="background-color: #ffffff;" data-color="#ffffff" onclick="setPaintColor('#ffffff')"></div>
710
+ <div class="paint-color" style="background-color: #ff0000;" data-color="#ff0000" onclick="setPaintColor('#ff0000')"></div>
711
+ <div class="paint-color" style="background-color: #00ff00;" data-color="#00ff00" onclick="setPaintColor('#00ff00')"></div>
712
+ <div class="paint-color" style="background-color: #0000ff;" data-color="#0000ff" onclick="setPaintColor('#0000ff')"></div>
713
+ <div class="paint-color" style="background-color: #ffff00;" data-color="#ffff00" onclick="setPaintColor('#ffff00')"></div>
714
+ <div class="paint-color" style="background-color: #00ffff;" data-color="#00ffff" onclick="setPaintColor('#00ffff')"></div>
715
+ <div class="paint-color" style="background-color: #ff00ff;" data-color="#ff00ff" onclick="setPaintColor('#ff00ff')"></div>
716
+ <div class="paint-color" style="background-color: #c0c0c0;" data-color="#c0c0c0" onclick="setPaintColor('#c0c0c0')"></div>
717
+ <div class="paint-color" style="background-color: #808080;" data-color="#808080" onclick="setPaintColor('#808080')"></div>
718
+ <div class="paint-color" style="background-color: #800000;" data-color="#800000" onclick="setPaintColor('#800000')"></div>
719
+ <div class="paint-color" style="background-color: #808000;" data-color="#808000" onclick="setPaintColor('#808000')"></div>
720
+ <div class="paint-color" style="background-color: #008000;" data-color="#008000" onclick="setPaintColor('#008000')"></div>
721
+ <div class="paint-color" style="background-color: #800080;" data-color="#800080" onclick="setPaintColor('#800080')"></div>
722
+ <div class="paint-color" style="background-color: #008080;" data-color="#008080" onclick="setPaintColor('#008080')"></div>
723
+ <div class="paint-color" style="background-color: #000080;" data-color="#000080" onclick="setPaintColor('#000080')"></div>
724
+ </div>
725
+ <div class="paint-canvas-container">
726
+ <canvas id="paint-canvas" width="580" height="380"></canvas>
727
+ </div>
728
+ </div>
729
+ </div>
730
+
731
+ <!-- Taskbar -->
732
+ <div class="taskbar">
733
+ <div class="taskbar-icons">
734
+ <div class="taskbar-icon" onclick="toggleStartMenu()">
735
+ <i class="fab fa-windows"></i>
736
+ </div>
737
+ <div class="taskbar-icon" onclick="openApp('minesweeper')">
738
+ <i class="fas fa-bomb"></i>
739
+ </div>
740
+ <div class="taskbar-icon" onclick="openApp('calculator')">
741
+ <i class="fas fa-calculator"></i>
742
+ </div>
743
+ <div class="taskbar-icon" onclick="openApp('notepad')">
744
+ <i class="fas fa-file-alt"></i>
745
+ </div>
746
+ <div class="taskbar-icon" onclick="openApp('paint')">
747
+ <i class="fas fa-paint-brush"></i>
748
+ </div>
749
+ </div>
750
+ <button class="start-button" onclick="toggleStartMenu()">
751
+ <i class="fab fa-windows"></i>
752
+ </button>
753
+ <div class="taskbar-icons" style="left: auto; right: 12px;">
754
+ <div class="taskbar-icon" onclick="toggleUserMenu()">
755
+ <i class="fas fa-user"></i>
756
+ </div>
757
+ </div>
758
+ </div>
759
+
760
+ <!-- Start Menu -->
761
+ <div class="start-menu" id="start-menu">
762
+ <div class="search-bar">
763
+ <input type="text" class="search-input" placeholder="Type here to search">
764
+ </div>
765
+ <div class="pinned-apps">
766
+ <div class="app-grid">
767
+ <div class="app-icon" onclick="openApp('minesweeper')">
768
+ <i class="fas fa-bomb"></i>
769
+ <span>Minesweeper</span>
770
+ </div>
771
+ <div class="app-icon" onclick="openApp('calculator')">
772
+ <i class="fas fa-calculator"></i>
773
+ <span>Calculator</span>
774
+ </div>
775
+ <div class="app-icon" onclick="openApp('notepad')">
776
+ <i class="fas fa-file-alt"></i>
777
+ <span>Notepad</span>
778
+ </div>
779
+ <div class="app-icon" onclick="openApp('paint')">
780
+ <i class="fas fa-paint-brush"></i>
781
+ <span>Paint</span>
782
+ </div>
783
+ <div class="app-icon">
784
+ <i class="fas fa-globe"></i>
785
+ <span>Browser</span>
786
+ </div>
787
+ <div class="app-icon">
788
+ <i class="fas fa-envelope"></i>
789
+ <span>Mail</span>
790
+ </div>
791
+ <div class="app-icon">
792
+ <i class="fas fa-music"></i>
793
+ <span>Music</span>
794
+ </div>
795
+ <div class="app-icon">
796
+ <i class="fas fa-photo-video"></i>
797
+ <span>Photos</span>
798
+ </div>
799
+ <div class="app-icon">
800
+ <i class="fas fa-cog"></i>
801
+ <span>Settings</span>
802
+ </div>
803
+ <div class="app-icon">
804
+ <i class="fas fa-store"></i>
805
+ <span>Store</span>
806
+ </div>
807
+ <div class="app-icon">
808
+ <i class="fas fa-file-word"></i>
809
+ <span>Word</span>
810
+ </div>
811
+ <div class="app-icon">
812
+ <i class="fas fa-file-excel"></i>
813
+ <span>Excel</span>
814
+ </div>
815
+ </div>
816
+ </div>
817
+ <div class="recommended">
818
+ <div class="recommended-title">Recommended</div>
819
+ <div class="recommended-list">
820
+ <div class="recommended-item" onclick="openApp('notepad')">
821
+ <i class="fas fa-file-alt"></i>
822
+ <span>Notepad</span>
823
+ </div>
824
+ <div class="recommended-item" onclick="openApp('calculator')">
825
+ <i class="fas fa-calculator"></i>
826
+ <span>Calculator</span>
827
+ </div>
828
+ <div class="recommended-item" onclick="openApp('paint')">
829
+ <i class="fas fa-paint-brush"></i>
830
+ <span>Paint</span>
831
+ </div>
832
+ </div>
833
+ </div>
834
+ </div>
835
+
836
+ <!-- User Menu -->
837
+ <div class="user-menu" id="user-menu">
838
+ <div class="user-profile">
839
+ <div class="user-avatar">U</div>
840
+ <div class="user-info">
841
+ <div class="user-name">User</div>
842
+ <div class="user-email">[email protected]</div>
843
+ </div>
844
+ </div>
845
+ <div class="user-options">
846
+ <div class="user-option">
847
+ <i class="fas fa-user"></i>
848
+ <span>Account settings</span>
849
+ </div>
850
+ <div class="user-option">
851
+ <i class="fas fa-lock"></i>
852
+ <span>Lock</span>
853
+ </div>
854
+ <div class="user-option">
855
+ <i class="fas fa-sign-out-alt"></i>
856
+ <span>Sign out</span>
857
+ </div>
858
+ </div>
859
+ <div class="power-options">
860
+ <div class="user-option">
861
+ <i class="fas fa-power-off"></i>
862
+ <span>Shut down</span>
863
+ </div>
864
+ <div class="user-option">
865
+ <i class="fas fa-sync-alt"></i>
866
+ <span>Restart</span>
867
+ </div>
868
+ </div>
869
+ </div>
870
+
871
+ <!-- Context Menu -->
872
+ <div class="context-menu" id="context-menu">
873
+ <div class="context-menu-item" onclick="openApp('minesweeper')">
874
+ <i class="fas fa-bomb"></i>
875
+ <span>Open Minesweeper</span>
876
+ </div>
877
+ <div class="context-menu-item" onclick="openApp('calculator')">
878
+ <i class="fas fa-calculator"></i>
879
+ <span>Open Calculator</span>
880
+ </div>
881
+ <div class="context-menu-item" onclick="openApp('notepad')">
882
+ <i class="fas fa-file-alt"></i>
883
+ <span>Open Notepad</span>
884
+ </div>
885
+ <div class="context-menu-item" onclick="openApp('paint')">
886
+ <i class="fas fa-paint-brush"></i>
887
+ <span>Open Paint</span>
888
+ </div>
889
+ <div class="context-menu-separator"></div>
890
+ <div class="context-menu-item">
891
+ <i class="fas fa-cog"></i>
892
+ <span>Display settings</span>
893
+ </div>
894
+ <div class="context-menu-item">
895
+ <i class="fas fa-desktop"></i>
896
+ <span>Personalize</span>
897
+ </div>
898
+ <div class="context-menu-separator"></div>
899
+ <div class="context-menu-item">
900
+ <i class="fas fa-redo"></i>
901
+ <span>Refresh</span>
902
+ </div>
903
+ </div>
904
+
905
+ <script>
906
+ // Global variables
907
+ let activeWindows = [];
908
+ let minimizedWindows = [];
909
+ let currentPaintTool = 'pencil';
910
+ let currentPaintColor = '#000000';
911
+ let isDrawing = false;
912
+ let startX, startY;
913
+ let canvas, ctx;
914
+
915
+ // Initialize the desktop
916
+ document.addEventListener('DOMContentLoaded', function() {
917
+ // Initialize Minesweeper
918
+ initializeMinesweeper();
919
+
920
+ // Initialize Paint
921
+ canvas = document.getElementById('paint-canvas');
922
+ ctx = canvas.getContext('2d');
923
+ ctx.fillStyle = 'white';
924
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
925
+ ctx.lineWidth = 2;
926
+ ctx.strokeStyle = currentPaintColor;
927
+ ctx.fillStyle = currentPaintColor;
928
+
929
+ // Set up event listeners for paint canvas
930
+ setupPaintCanvas();
931
+
932
+ // Context menu
933
+ document.addEventListener('contextmenu', function(e) {
934
+ e.preventDefault();
935
+ const contextMenu = document.getElementById('context-menu');
936
+ contextMenu.style.display = 'block';
937
+ contextMenu.style.left = `${e.clientX}px`;
938
+ contextMenu.style.top = `${e.clientY}px`;
939
+ });
940
+
941
+ document.addEventListener('click', function() {
942
+ document.getElementById('context-menu').style.display = 'none';
943
+ });
944
+ });
945
+
946
+ // Window management functions
947
+ function openApp(appName) {
948
+ const window = document.getElementById(`${appName}-window`);
949
+ window.style.display = 'flex';
950
+
951
+ // Bring to front
952
+ bringToFront(window);
953
+
954
+ // Add to active windows if not already there
955
+ if (!activeWindows.includes(appName)) {
956
+ activeWindows.push(appName);
957
+ }
958
+
959
+ // Remove from minimized windows if it was minimized
960
+ minimizedWindows = minimizedWindows.filter(w => w !== appName);
961
+
962
+ // Close start menu if open
963
+ document.getElementById('start-menu').style.display = 'none';
964
+ }
965
+
966
+ function closeWindow(appName) {
967
+ const window = document.getElementById(`${appName}-window`);
968
+ window.style.display = 'none';
969
+ activeWindows = activeWindows.filter(w => w !== appName);
970
+ minimizedWindows = minimizedWindows.filter(w => w !== appName);
971
+ }
972
+
973
+ function minimizeWindow(appName) {
974
+ const window = document.getElementById(`${appName}-window`);
975
+ window.style.display = 'none';
976
+
977
+ if (!minimizedWindows.includes(appName)) {
978
+ minimizedWindows.push(appName);
979
+ }
980
+ }
981
+
982
+ function maximizeWindow(appName) {
983
+ const window = document.getElementById(`${appName}-window`);
984
+ if (window.style.width === '100%' && window.style.height === '100%') {
985
+ // Restore
986
+ window.style.width = window.dataset.prevWidth;
987
+ window.style.height = window.dataset.prevHeight;
988
+ window.style.top = window.dataset.prevTop;
989
+ window.style.left = window.dataset.prevLeft;
990
+ } else {
991
+ // Maximize
992
+ window.dataset.prevWidth = window.style.width;
993
+ window.dataset.prevHeight = window.style.height;
994
+ window.dataset.prevTop = window.style.top;
995
+ window.dataset.prevLeft = window.style.left;
996
+
997
+ window.style.width = '100%';
998
+ window.style.height = '100%';
999
+ window.style.top = '0';
1000
+ window.style.left = '0';
1001
+ }
1002
+
1003
+ bringToFront(window);
1004
+ }
1005
+
1006
+ function bringToFront(element) {
1007
+ // Reset z-index for all windows
1008
+ document.querySelectorAll('.window').forEach(w => {
1009
+ w.style.zIndex = '100';
1010
+ });
1011
+
1012
+ // Bring this window to front
1013
+ element.style.zIndex = '200';
1014
+ }
1015
+
1016
+ // Start menu functions
1017
+ function toggleStartMenu() {
1018
+ const startMenu = document.getElementById('start-menu');
1019
+ if (startMenu.style.display === 'flex') {
1020
+ startMenu.style.display = 'none';
1021
+ } else {
1022
+ startMenu.style.display = 'flex';
1023
+ // Close user menu if open
1024
+ document.getElementById('user-menu').style.display = 'none';
1025
+ }
1026
+ }
1027
+
1028
+ // User menu functions
1029
+ function toggleUserMenu() {
1030
+ const userMenu = document.getElementById('user-menu');
1031
+ if (userMenu.style.display === 'flex') {
1032
+ userMenu.style.display = 'none';
1033
+ } else {
1034
+ userMenu.style.display = 'flex';
1035
+ // Close start menu if open
1036
+ document.getElementById('start-menu').style.display = 'none';
1037
+ }
1038
+ }
1039
+
1040
+ // Minesweeper game logic
1041
+ function initializeMinesweeper() {
1042
+ const board = document.getElementById('minesweeper-board');
1043
+ board.innerHTML = '';
1044
+
1045
+ const size = 10;
1046
+ const mines = 15;
1047
+
1048
+ // Create board
1049
+ for (let i = 0; i < size; i++) {
1050
+ for (let j = 0; j < size; j++) {
1051
+ const cell = document.createElement('div');
1052
+ cell.className = 'minesweeper-cell';
1053
+ cell.dataset.row = i;
1054
+ cell.dataset.col = j;
1055
+ cell.addEventListener('click', () => revealCell(i, j));
1056
+ cell.addEventListener('contextmenu', (e) => {
1057
+ e.preventDefault();
1058
+ flagCell(i, j);
1059
+ });
1060
+ board.appendChild(cell);
1061
+ }
1062
+ }
1063
+
1064
+ // Place mines randomly
1065
+ const cells = Array.from(board.children);
1066
+ for (let i = 0; i < mines; i++) {
1067
+ const randomIndex = Math.floor(Math.random() * cells.length);
1068
+ if (!cells[randomIndex].classList.contains('mine')) {
1069
+ cells[randomIndex].classList.add('mine');
1070
+ } else {
1071
+ i--; // Try again if we hit a cell that's already a mine
1072
+ }
1073
+ }
1074
+ }
1075
+
1076
+ function revealCell(row, col) {
1077
+ const board = document.getElementById('minesweeper-board');
1078
+ const cell = board.querySelector(`[data-row="${row}"][data-col="${col}"]`);
1079
+
1080
+ if (cell.classList.contains('revealed') || cell.classList.contains('flagged')) {
1081
+ return;
1082
+ }
1083
+
1084
+ cell.classList.add('revealed');
1085
+
1086
+ if (cell.classList.contains('mine')) {
1087
+ cell.innerHTML = '💣';
1088
+ alert('Game Over! You hit a mine.');
1089
+ initializeMinesweeper();
1090
+ return;
1091
+ }
1092
+
1093
+ // Count adjacent mines
1094
+ const size = 10;
1095
+ let count = 0;
1096
+
1097
+ for (let i = Math.max(0, row - 1); i <= Math.min(size - 1, row + 1); i++) {
1098
+ for (let j = Math.max(0, col - 1); j <= Math.min(size - 1, col + 1); j++) {
1099
+ if (i === row && j === col) continue;
1100
+ const adjacentCell = board.querySelector(`[data-row="${i}"][data-col="${j}"]`);
1101
+ if (adjacentCell.classList.contains('mine')) {
1102
+ count++;
1103
+ }
1104
+ }
1105
+ }
1106
+
1107
+ if (count > 0) {
1108
+ cell.textContent = count;
1109
+ // Different colors for different numbers
1110
+ const colors = ['', 'blue', 'green', 'red', 'darkblue', 'brown', 'teal', 'black', 'gray'];
1111
+ cell.style.color = colors[count];
1112
+ } else {
1113
+ // If no adjacent mines, reveal all adjacent cells
1114
+ for (let i = Math.max(0, row - 1); i <= Math.min(size - 1, row + 1); i++) {
1115
+ for (let j = Math.max(0, col - 1); j <= Math.min(size - 1, col + 1); j++) {
1116
+ if (i === row && j === col) continue;
1117
+ revealCell(i, j);
1118
+ }
1119
+ }
1120
+ }
1121
+
1122
+ // Check for win
1123
+ checkWin();
1124
+ }
1125
+
1126
+ function flagCell(row, col) {
1127
+ const board = document.getElementById('minesweeper-board');
1128
+ const cell = board.querySelector(`[data-row="${row}"][data-col="${col}"]`);
1129
+
1130
+ if (cell.classList.contains('revealed')) {
1131
+ return;
1132
+ }
1133
+
1134
+ if (cell.classList.contains('flagged')) {
1135
+ cell.classList.remove('flagged');
1136
+ cell.innerHTML = '';
1137
+ } else {
1138
+ cell.classList.add('flagged');
1139
+ cell.innerHTML = '🚩';
1140
+ }
1141
+ }
1142
+
1143
+ function checkWin() {
1144
+ const board = document.getElementById('minesweeper-board');
1145
+ const cells = Array.from(board.children);
1146
+ const mines = cells.filter(cell => cell.classList.contains('mine'));
1147
+ const revealed = cells.filter(cell => cell.classList.contains('revealed'));
1148
+
1149
+ // All non-mine cells revealed
1150
+ if (revealed.length === cells.length - mines.length) {
1151
+ alert('Congratulations! You won!');
1152
+ initializeMinesweeper();
1153
+ }
1154
+ }
1155
+
1156
+ // Calculator functions
1157
+ let calcInput = '0';
1158
+ let calcHistory = '';
1159
+
1160
+ function appendToCalc(value) {
1161
+ if (calcInput === '0' && value !== '.') {
1162
+ calcInput = value;
1163
+ } else {
1164
+ calcInput += value;
1165
+ }
1166
+ updateCalcDisplay();
1167
+ }
1168
+
1169
+ function clearCalculator() {
1170
+ calcInput = '0';
1171
+ calcHistory = '';
1172
+ updateCalcDisplay();
1173
+ }
1174
+
1175
+ function calculate() {
1176
+ try {
1177
+ calcHistory = calcInput + ' =';
1178
+ calcInput = eval(calcInput).toString();
1179
+ updateCalcDisplay();
1180
+ } catch (e) {
1181
+ calcInput = 'Error';
1182
+ updateCalcDisplay();
1183
+ }
1184
+ }
1185
+
1186
+ function updateCalcDisplay() {
1187
+ document.getElementById('calc-input').textContent = calcInput;
1188
+ document.getElementById('calc-history').textContent = calcHistory;
1189
+ }
1190
+
1191
+ // Paint functions
1192
+ function setupPaintCanvas() {
1193
+ canvas.addEventListener('mousedown', startDrawing);
1194
+ canvas.addEventListener('mousemove', draw);
1195
+ canvas.addEventListener('mouseup', stopDrawing);
1196
+ canvas.addEventListener('mouseout', stopDrawing);
1197
+ }
1198
+
1199
+ function setPaintTool(tool) {
1200
+ currentPaintTool = tool;
1201
+ document.querySelectorAll('.paint-tool').forEach(t => {
1202
+ t.classList.remove('active');
1203
+ });
1204
+ document.querySelector(`.paint-tool[data-tool="${tool}"]`).classList.add('active');
1205
+ }
1206
+
1207
+ function setPaintColor(color) {
1208
+ currentPaintColor = color;
1209
+ ctx.strokeStyle = color;
1210
+ ctx.fillStyle = color;
1211
+ document.querySelectorAll('.paint-color').forEach(c => {
1212
+ c.classList.remove('active');
1213
+ });
1214
+ document.querySelector(`.paint-color[data-color="${color}"]`).classList.add('active');
1215
+ }
1216
+
1217
+ function startDrawing(e) {
1218
+ isDrawing = true;
1219
+ startX = e.offsetX;
1220
+ startY = e.offsetY;
1221
+
1222
+ if (currentPaintTool === 'pencil') {
1223
+ ctx.beginPath();
1224
+ ctx.moveTo(startX, startY);
1225
+ }
1226
+ }
1227
+
1228
+ function draw(e) {
1229
+ if (!isDrawing) return;
1230
+
1231
+ const x = e.offsetX;
1232
+ const y = e.offsetY;
1233
+
1234
+ switch (currentPaintTool) {
1235
+ case 'pencil':
1236
+ ctx.lineTo(x, y);
1237
+ ctx.stroke();
1238
+ break;
1239
+
1240
+ case 'eraser':
1241
+ ctx.save();
1242
+ ctx.strokeStyle = 'white';
1243
+ ctx.lineWidth = 10;
1244
+ ctx.beginPath();
1245
+ ctx.moveTo(startX, startY);
1246
+ ctx.lineTo(x, y);
1247
+ ctx.stroke();
1248
+ ctx.restore();
1249
+ startX = x;
1250
+ startY = y;
1251
+ break;
1252
+
1253
+ case 'line':
1254
+ // Redraw the canvas to remove previous line preview
1255
+ redrawCanvas();
1256
+ ctx.beginPath();
1257
+ ctx.moveTo(startX, startY);
1258
+ ctx.lineTo(x, y);
1259
+ ctx.stroke();
1260
+ break;
1261
+
1262
+ case 'rectangle':
1263
+ redrawCanvas();
1264
+ ctx.strokeRect(startX, startY, x - startX, y - startY);
1265
+ break;
1266
+
1267
+ case 'circle':
1268
+ redrawCanvas();
1269
+ const radius = Math.sqrt(Math.pow(x - startX, 2) + Math.pow(y - startY, 2));
1270
+ ctx.beginPath();
1271
+ ctx.arc(startX, startY, radius, 0, Math.PI * 2);
1272
+ ctx.stroke();
1273
+ break;
1274
+
1275
+ case 'fill':
1276
+ // Flood fill would be complex to implement, so we'll just do a simple fill
1277
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
1278
+ break;
1279
+ }
1280
+ }
1281
+
1282
+ function stopDrawing(e) {
1283
+ if (!isDrawing) return;
1284
+
1285
+ isDrawing = false;
1286
+
1287
+ if (currentPaintTool === 'line' || currentPaintTool === 'rectangle' || currentPaintTool === 'circle') {
1288
+ // Finalize the shape
1289
+ const x = e.offsetX;
1290
+ const y = e.offsetY;
1291
+
1292
+ redrawCanvas();
1293
+
1294
+ switch (currentPaintTool) {
1295
+ case 'line':
1296
+ ctx.beginPath();
1297
+ ctx.moveTo(startX, startY);
1298
+ ctx.lineTo(x, y);
1299
+ ctx.stroke();
1300
+ break;
1301
+
1302
+ case 'rectangle':
1303
+ ctx.strokeRect(startX, startY, x - startX, y - startY);
1304
+ break;
1305
+
1306
+ case 'circle':
1307
+ const radius = Math.sqrt(Math.pow(x - startX, 2) + Math.pow(y - startY, 2));
1308
+ ctx.beginPath();
1309
+ ctx.arc(startX, startY, radius, 0, Math.PI * 2);
1310
+ ctx.stroke();
1311
+ break;
1312
+ }
1313
+ }
1314
+ }
1315
+
1316
+ function redrawCanvas() {
1317
+ // This would normally save the canvas state, but for simplicity we'll just clear
1318
+ // In a real app, you'd want to implement proper canvas state management
1319
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
1320
+ }
1321
+
1322
+ // Make windows draggable
1323
+ document.querySelectorAll('.window-header').forEach(header => {
1324
+ header.addEventListener('mousedown', function(e) {
1325
+ if (e.target.classList.contains('window-btn')) return;
1326
+
1327
+ const window = this.parentElement;
1328
+ bringToFront(window);
1329
+
1330
+ let offsetX = e.clientX - window.getBoundingClientRect().left;
1331
+ let offsetY = e.clientY - window.getBoundingClientRect().top;
1332
+
1333
+ function moveWindow(e) {
1334
+ window.style.left = `${e.clientX - offsetX}px`;
1335
+ window.style.top = `${e.clientY - offsetY}px`;
1336
+ }
1337
+
1338
+ function stopMoving() {
1339
+ document.removeEventListener('mousemove', moveWindow);
1340
+ document.removeEventListener('mouseup', stopMoving);
1341
+ }
1342
+
1343
+ document.addEventListener('mousemove', moveWindow);
1344
+ document.addEventListener('mouseup', stopMoving);
1345
+ });
1346
+ });
1347
+ </script>
1348
+ <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=hellork/windows-in-the-browser" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1349
+ </html>
prompts.txt ADDED
File without changes