{{ define "loader-cat" }} class ComponentBootScreen extends HTMLElement { connectedCallback() { this.innerHTML = this.render(); this.timeout = setTimeout(function(){ const $rbw = document.querySelector("#rbw .w"); $rbw.innerHTML = $rbw.innerHTML.repeat(10); const $loader = document.querySelector("#n-lder"); $loader.classList.add("loading"); }, 500); } disconnectedCallback() { clearTimeout(this.timeout); } render() { return `
`; } } customElements.define("component-bootscreen", ComponentBootScreen); {{ end }} {{ define "loader-basic" }} class ComponentBootScreen extends HTMLElement { connectedCallback() { this.innerHTML = `
`; } } customElements.define("component-bootscreen", ComponentBootScreen); {{ end }}