fix(csp): docs + 418 sans style/script inline — CSS/JS externalisés, header/footer injectés par components.js (#h/#f), playground API déplacé dans docs-playground.js et docs.css

This commit is contained in:
riricdev 2026-09-07 15:34:23 +02:00
commit b65db0be44
7 changed files with 310 additions and 112 deletions

16
public/js/teapot.js Normal file
View file

@ -0,0 +1,16 @@
(function () {
var toast = document.querySelector(".tea-toast");
if (!toast) return;
var timer = null;
function spin(msg) {
toast.textContent = msg;
toast.classList.add("show");
if (timer) clearTimeout(timer);
timer = setTimeout(function () { toast.classList.remove("show"); }, 3200);
}
document.querySelectorAll("[data-tea]").forEach(function (b) {
b.addEventListener("click", function () {
spin(b.getAttribute("data-toast") || "");
});
});
})();