diff --git a/assets/main.js b/assets/main.js index 85fcc42..4d4cad8 100644 --- a/assets/main.js +++ b/assets/main.js @@ -15,7 +15,7 @@ class Button extends HTMLButtonElement { constructor() { super(); this.addEventListener("click", this.click); - this.setAttribute("style", "min-width:4em"); + this.setAttribute("style", "min-width:2.3em"); } } @@ -43,13 +43,16 @@ class LineRemover extends Button { } class LinePinner extends Button { + connectedCallback() { + this.innerText = "pin"; + } click() { const l = this.closest("div.line"); l.classList.toggle("unpinned"); if (l.classList.contains("unpinned")) { this.innerText = "pin"; } else { - this.innerText = "unpin"; + this.innerHTML = "pin"; } } } @@ -84,7 +87,7 @@ class LineEditor extends Button { } done() { this.editing = false; - this.innerText = "edit"; + this.innerText = "✎"; this.span.innerText = this.i.value; this.f.remove(); this.span.setAttribute("style", "display:inline"); @@ -96,7 +99,7 @@ class LineEditor extends Button { return; } this.editing = true; - this.innerText = "done"; + this.innerHTML = ""; this.span.setAttribute("style", "display:none"); this.i.value = this.span.innerText; this.parentElement.appendChild(this.f); diff --git a/templates/index.tmpl b/templates/index.tmpl index 38b78bc..608713d 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -4,8 +4,8 @@ Trunkless @@ -18,11 +18,11 @@ div.line:not(.unpinned) > .linetext {