first commit

This commit is contained in:
GNfsys
2026-04-17 19:05:33 +02:00
commit 6046a6acd7
60 changed files with 11348 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// Load view specific code
const currentView = document.body.dataset["currentView"];
if (currentView) {
// Import the module asynchronously; its top-level code runs on load
import(`./views/${currentView}.ts`)
// If the module exports an `init` function, call it
.then(module => module.init?.())
.catch(() => console.warn(`No module for view: ${currentView}`))
}
+10
View File
@@ -0,0 +1,10 @@
console.log('Another view')
const button = document.getElementById('show-alert-button');
if (button) {
button.addEventListener('click', function (e) {
e.preventDefault();
alert('Danger!');
})
}
+1
View File
@@ -0,0 +1 @@
console.log('From page JS')