Ramesh-vani commited on
Commit
ba28a2b
·
verified ·
1 Parent(s): a0d68c2

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +12 -32
index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Advanced Windows-like System with App Icons and Time</title>
7
  <style>
8
  /* Basic Reset & Fonts */
9
  * { margin: 0; padding: 0; box-sizing: border-box; }
@@ -48,15 +48,13 @@
48
  height: 40px;
49
  background: rgba(0,0,0,0.8);
50
  z-index: 1000;
51
- display: flex;
52
- align-items: center;
53
- padding: 0 5px;
54
  }
55
- /* Left side of Taskbar (Start button, pinned apps, running windows) */
56
  #taskbar-left {
57
  display: flex;
58
  align-items: center;
59
- flex: 1;
 
60
  }
61
  #start-button {
62
  background: #0078d7;
@@ -79,7 +77,7 @@
79
  font-size: 18px;
80
  cursor: pointer;
81
  }
82
- /* Running Apps: each window gets its own tab (only icon) */
83
  #taskbar-windows {
84
  display: flex;
85
  align-items: center;
@@ -99,14 +97,6 @@
99
  font-size: 16px;
100
  display: inline-block;
101
  }
102
- /* Right side of Taskbar: current time display */
103
- #taskbar-right {
104
- color: white;
105
- font-size: 14px;
106
- padding-right: 10px;
107
- display: flex;
108
- align-items: center;
109
- }
110
 
111
  /* Start Menu */
112
  #start-menu {
@@ -241,12 +231,9 @@
241
  <!-- Built-In Pinned Apps -->
242
  </div>
243
  <div id="taskbar-windows">
244
- <!-- Running windows: each window gets its own tab (only icon) -->
245
  </div>
246
  </div>
247
- <div id="taskbar-right">
248
- <!-- Current Time Display -->
249
- </div>
250
  </div>
251
 
252
  <!-- Start Menu -->
@@ -387,6 +374,7 @@
387
  win.style.height = "300px";
388
  win.dataset.windowId = windowCounter++;
389
  win.dataset.maximized = "false";
 
390
 
391
  const header = document.createElement("div");
392
  header.classList.add("window-header");
@@ -418,8 +406,7 @@
418
  const closeBtn = header.querySelector(".close");
419
  if(closeBtn) { closeBtn.addEventListener("click", () => closeWindow(win)); }
420
 
421
- // Create taskbar button after appIcon is set (if not already created)
422
- createTaskbarWindowButton(win);
423
  runningWindows[win.dataset.windowId] = win;
424
  return win;
425
  }
@@ -559,7 +546,7 @@
559
  win.remove();
560
  }
561
 
562
- // Create a taskbar button for each running window – only icon is shown
563
  function createTaskbarWindowButton(win) {
564
  const taskbarWindows = document.getElementById("taskbar-windows");
565
  let btn = document.createElement("button");
@@ -590,6 +577,7 @@
590
  }
591
 
592
  /***** Built-In Apps & Open Functions *****/
 
593
  function openApp(appId) {
594
  if(appId === "appInstaller") {
595
  createAppInstaller();
@@ -606,6 +594,7 @@
606
  win.dataset.appId = "appInstaller";
607
  win.dataset.appIcon = "🛠";
608
  updateWindowHeaderIcon(win);
 
609
  createTaskbarWindowButton(win);
610
  const content = document.createElement("div");
611
  content.innerHTML = `
@@ -659,7 +648,7 @@
659
  win.querySelector(".window-content").appendChild(content);
660
  }
661
 
662
- // Apply all customizations from Customizer app
663
  function applyAllCustomizations() {
664
  const desktopBgColor = document.getElementById("desktop-bg-color").value;
665
  const desktopBgImage = document.getElementById("desktop-bg-image").value;
@@ -753,15 +742,6 @@
753
  customContextMenu.style.display = "none";
754
  });
755
 
756
- /***** Current Time Display *****/
757
- function updateTime() {
758
- const timeElem = document.getElementById("taskbar-right");
759
- const now = new Date();
760
- timeElem.innerText = now.toLocaleTimeString();
761
- }
762
- setInterval(updateTime, 1000);
763
- updateTime();
764
-
765
  /***** Attach Static Events for Built-In Apps *****/
766
  document.addEventListener("DOMContentLoaded", () => {
767
  updateSystemAppsUI();
 
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Advanced Windows-like System with App Icons</title>
7
  <style>
8
  /* Basic Reset & Fonts */
9
  * { margin: 0; padding: 0; box-sizing: border-box; }
 
48
  height: 40px;
49
  background: rgba(0,0,0,0.8);
50
  z-index: 1000;
 
 
 
51
  }
52
+ /* Left side of Taskbar (Start button & pinned apps) */
53
  #taskbar-left {
54
  display: flex;
55
  align-items: center;
56
+ height: 100%;
57
+ padding: 0 5px;
58
  }
59
  #start-button {
60
  background: #0078d7;
 
77
  font-size: 18px;
78
  cursor: pointer;
79
  }
80
+ /* Running Apps: प्रत्येक running window का अलग tab केवल icon */
81
  #taskbar-windows {
82
  display: flex;
83
  align-items: center;
 
97
  font-size: 16px;
98
  display: inline-block;
99
  }
 
 
 
 
 
 
 
 
100
 
101
  /* Start Menu */
102
  #start-menu {
 
231
  <!-- Built-In Pinned Apps -->
232
  </div>
233
  <div id="taskbar-windows">
234
+ <!-- Running windows: प्रत्येक window का एक अलग tab (केवल icon) -->
235
  </div>
236
  </div>
 
 
 
237
  </div>
238
 
239
  <!-- Start Menu -->
 
374
  win.style.height = "300px";
375
  win.dataset.windowId = windowCounter++;
376
  win.dataset.maximized = "false";
377
+ // appId and appIcon can be set later
378
 
379
  const header = document.createElement("div");
380
  header.classList.add("window-header");
 
406
  const closeBtn = header.querySelector(".close");
407
  if(closeBtn) { closeBtn.addEventListener("click", () => closeWindow(win)); }
408
 
409
+ // **Note:** हम createTaskbarWindowButton को बाद में call करेंगे, जब appIcon सेट हो जाए
 
410
  runningWindows[win.dataset.windowId] = win;
411
  return win;
412
  }
 
546
  win.remove();
547
  }
548
 
549
+ // Create a taskbar button for each running window – only icon shown
550
  function createTaskbarWindowButton(win) {
551
  const taskbarWindows = document.getElementById("taskbar-windows");
552
  let btn = document.createElement("button");
 
577
  }
578
 
579
  /***** Built-In Apps & Open Functions *****/
580
+ // openApp: if built-in, call respective function; else launch installed app
581
  function openApp(appId) {
582
  if(appId === "appInstaller") {
583
  createAppInstaller();
 
594
  win.dataset.appId = "appInstaller";
595
  win.dataset.appIcon = "🛠";
596
  updateWindowHeaderIcon(win);
597
+ // अब taskbar button create करें
598
  createTaskbarWindowButton(win);
599
  const content = document.createElement("div");
600
  content.innerHTML = `
 
648
  win.querySelector(".window-content").appendChild(content);
649
  }
650
 
651
+ // Apply customizations from Customizer app
652
  function applyAllCustomizations() {
653
  const desktopBgColor = document.getElementById("desktop-bg-color").value;
654
  const desktopBgImage = document.getElementById("desktop-bg-image").value;
 
742
  customContextMenu.style.display = "none";
743
  });
744
 
 
 
 
 
 
 
 
 
 
745
  /***** Attach Static Events for Built-In Apps *****/
746
  document.addEventListener("DOMContentLoaded", () => {
747
  updateSystemAppsUI();