diff --git a/flake.nix b/flake.nix index 1d4e865..6f5fdca 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,8 @@ http-server prettier vscode-langservers-extracted + typescript-language-server + typescript ]; }; }; diff --git a/gear/index.html b/gear/index.html index 5b5f35d..78eb770 100644 --- a/gear/index.html +++ b/gear/index.html @@ -7,17 +7,19 @@ - - + + + + + + - +
This will be my gear +
diff --git a/gear/page.mjs b/gear/page.mjs new file mode 100644 index 0000000..8ea2f57 --- /dev/null +++ b/gear/page.mjs @@ -0,0 +1,9 @@ +import { attachGearList } from "/gear/gear.mjs"; +import { loadHTML } from "/global/loadin.mjs"; + +export function loadDependencies() { + loadHTML("hd-box", "/header/header.html"); + attachGearList("gl-body"); +} + +loadDependencies(); diff --git a/global/loadin.mjs b/global/loadin.mjs new file mode 100644 index 0000000..9b30f3a --- /dev/null +++ b/global/loadin.mjs @@ -0,0 +1,8 @@ +export function loadHTML(elementId, url) { + fetch(url) + .then((response) => response.text()) + .then((data) => { + document.getElementById(elementId).innerHTML = data; + }) + .catch((error) => console.error("Error loading HTML:", error)); +} diff --git a/index.html b/index.html index a7ebffc..fd449cc 100644 --- a/index.html +++ b/index.html @@ -14,11 +14,11 @@ /> - - + + - +