Fixed the logo being giant for a second while page is loading. Also a layout mishap.
This commit is contained in:
parent
c0accc71f2
commit
d7455d95ff
@ -20,7 +20,7 @@ template.innerHTML = `
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
#titlePlaceholder {
|
#titlePlaceholder {
|
||||||
margin-right: -0.9em;
|
margin-right: -1.15em;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
#titleText {
|
#titleText {
|
||||||
@ -94,7 +94,12 @@ class PatekLogo extends HTMLElement {
|
|||||||
clone.getElementById("titleText").innerText = typeof this.attributes.title !== "undefined" ? this.attributes.title.value : "Pátek";
|
clone.getElementById("titleText").innerText = typeof this.attributes.title !== "undefined" ? this.attributes.title.value : "Pátek";
|
||||||
clone.getElementById("subtitleText").innerText = typeof this.attributes.subtitle !== "undefined" ? this.attributes.subtitle.value : "";
|
clone.getElementById("subtitleText").innerText = typeof this.attributes.subtitle !== "undefined" ? this.attributes.subtitle.value : "";
|
||||||
this.shadow.appendChild(clone);
|
this.shadow.appendChild(clone);
|
||||||
|
this.style.display = "none";
|
||||||
this.calculateCircles();
|
this.calculateCircles();
|
||||||
|
window.addEventListener("load", () => {
|
||||||
|
this.style.display = "inline-block";
|
||||||
|
console.log("loaded");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
static get observedAttributes() { return ['title', 'subtitle']; }
|
static get observedAttributes() { return ['title', 'subtitle']; }
|
||||||
attributeChangedCallback(name, oldValue, newValue) {
|
attributeChangedCallback(name, oldValue, newValue) {
|
||||||
|
Loading…
Reference in New Issue
Block a user