feat: initial impl w/ styles, scripts, & server-side logic (steps 1, 2, 3)

This commit is contained in:
Floriansylvain
2025-12-16 21:09:53 +01:00
parent 9e00c10b9c
commit dbce932ce2
15 changed files with 501 additions and 7 deletions
+19
View File
@@ -0,0 +1,19 @@
export function renderError(container, message) {
if (!container) return;
try {
const $c = (container.jquery) ? container : (typeof container === 'string' ? $(container) : $(container));
$c.html(`<div class="error-message">${String(message)}</div>`);
} catch (e) {
if (container instanceof Element) container.innerHTML = `<div class="error-message">${String(message)}</div>`;
}
}
export function insertHtml(container, html) {
if (!container) return;
try {
const $c = (container.jquery) ? container : (typeof container === 'string' ? $(container) : $(container));
$c.html(html);
} catch (e) {
if (container instanceof Element) container.innerHTML = html;
}
}