1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-12-26 23:58:35 -06:00

fix: Broken table

This commit is contained in:
Sayantan Santra 2024-03-18 19:27:58 -05:00
parent 2a2ed7e41a
commit 2cab341e8b
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
2 changed files with 15 additions and 15 deletions

View file

@ -126,6 +126,7 @@ const A_SHORT_INSECURE = (s, t) => `<a href="${t}/${s}">${s}</a>`;
const deleteButton = (shortUrl) => { const deleteButton = (shortUrl) => {
const td = document.createElement("td"); const td = document.createElement("td");
const div = document.createElement("div");
const btn = document.createElement("button"); const btn = document.createElement("button");
btn.innerHTML = "&times;"; btn.innerHTML = "&times;";
@ -142,7 +143,8 @@ const deleteButton = (shortUrl) => {
}; };
td.setAttribute("name", "deleteBtn"); td.setAttribute("name", "deleteBtn");
td.setAttribute("label", "Delete"); td.setAttribute("label", "Delete");
td.appendChild(btn); div.appendChild(btn);
td.appendChild(div);
return td; return td;
}; };

View file

@ -28,14 +28,18 @@ table tr td div {
overflow: auto; overflow: auto;
} }
td[name="deleteBtn"] { td[name="deleteBtn"] div {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
td[name="deleteBtn"] button { td[name="deleteBtn"] {
border-radius: 50%; text-align: center;
}
td[name="deleteBtn"] div button {
border-radius: 100%;
aspect-ratio: 1; aspect-ratio: 1;
border-style: solid; border-style: solid;
cursor: pointer; cursor: pointer;
@ -111,7 +115,7 @@ dialog form {
display: flex; display: flex;
justify-content: left !important; justify-content: left !important;
width: 98vw; width: 98vw;
padding: .5em .1em; padding: .5em .1em !important;
} }
table td::before { table td::before {
@ -122,13 +126,7 @@ dialog form {
text-align: left; text-align: left;
} }
td[name="deleteBtn"] button {
border-radius: 50%;
aspect-ratio: 1;
}
.pure-table caption { .pure-table caption {
padding-top: 0px; padding-top: 0px;
} }
} }