lokalnie gradle dziala
Deploy to FTP / deploy (push) Successful in 5s
Build APK / build (push) Successful in 1m51s

This commit is contained in:
Sebastian Molenda
2026-05-27 00:13:35 +02:00
parent 3402bb1c13
commit 145c148bbc
618 changed files with 30116 additions and 4 deletions
@@ -0,0 +1,14 @@
// Komponenty HTML loader
function loadComponent(path, replaceMap = {}) {
return fetch(path)
.then(r => r.text())
.then(html => {
Object.entries(replaceMap).forEach(([key, val]) => {
html = html.replaceAll(key, val);
});
return html;
});
}
// Przykład użycia:
// loadComponent('components/header.html', {'{TITLE}': 'Tytuł', '{SUBTITLE}': 'Podtytuł'}).then(html => ...)