A better fix for the giant logo at startup.
This commit is contained in:
parent
895805bda1
commit
ebb95c5f91
@ -1,7 +1,6 @@
|
|||||||
const template = document.createElement("template");
|
const template = document.createElement("template");
|
||||||
template.innerHTML = `
|
template.innerHTML = `
|
||||||
<style>
|
<style>
|
||||||
@import 'https://unpkg.com/firacode@1.206.0/distr/fira_code.css';
|
|
||||||
svg > * {
|
svg > * {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
@ -51,6 +50,7 @@ template.innerHTML = `
|
|||||||
height: 2em;
|
height: 2em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<link rel="stylesheet" src="https://unpkg.com/firacode@1.206.0/distr/fira_code.css">
|
||||||
<span id="wrapper">
|
<span id="wrapper">
|
||||||
<span id="titlePlaceholder"></span>
|
<span id="titlePlaceholder"></span>
|
||||||
<svg id="svg8" version="1.1" viewBox="0 0 22.452 22.454" xmlns="http://www.w3.org/2000/svg">
|
<svg id="svg8" version="1.1" viewBox="0 0 22.452 22.454" xmlns="http://www.w3.org/2000/svg">
|
||||||
@ -96,11 +96,7 @@ 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.shadow.getElementById("wrapper").style.display = "none";
|
|
||||||
this.calculateCircles();
|
this.calculateCircles();
|
||||||
window.addEventListener("load", () => {
|
|
||||||
this.shadow.getElementById("wrapper").style.display = "inline-block";
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
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