Created main js and css files. Added some of the iniitialization for the ui

This commit is contained in:
2025-07-07 16:09:29 -06:00
parent 0eb377dce5
commit 283b09123b
2 changed files with 63 additions and 0 deletions

24
main.js Normal file
View File

@@ -0,0 +1,24 @@
// Initialize gui
window.app = {};
app.gui = {};
app.gui.main = document.createElement("div");
app.gui.main.id = "root";
document.body.appendChild(app.gui.main);
app.gui.menu = document.createElement("nav");
app.gui.menu.id = "navigation";
app.gui.main.appendChild(app.gui.menu);
app.gui.view = document.createElement("div");
app.gui.view.id = "view";
app.gui.main.appendChild(app.gui.view);
// Library popup
app.gui.library = document.createElement("dev");
// pre-populate grid with emptys
for (var x = 0; x < 16; x++) {
var name = "pec"+x;
var thisPec = app.gui[name] = document.createElement("span");
thisPec.classList.add("pecSlot","empty");
thisPec.innerHTML = "<p>+</p>";
app.gui.view.appendChild(thisPec);
}