Skip to content

Commit

Permalink
fix: Broken table
Browse files Browse the repository at this point in the history
  • Loading branch information
SinTan1729 committed Mar 19, 2024
1 parent 2a2ed7e commit 2cab341
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 3 additions & 1 deletion resources/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const A_SHORT_INSECURE = (s, t) => `<a href="${t}/${s}">${s}</a>`;

const deleteButton = (shortUrl) => {
const td = document.createElement("td");
const div = document.createElement("div");
const btn = document.createElement("button");

btn.innerHTML = "&times;";
Expand All @@ -142,7 +143,8 @@ const deleteButton = (shortUrl) => {
};
td.setAttribute("name", "deleteBtn");
td.setAttribute("label", "Delete");
td.appendChild(btn);
div.appendChild(btn);
td.appendChild(div);
return td;
};

Expand Down
26 changes: 12 additions & 14 deletions resources/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
font-family: Montserrat;
font-style: normal;
src: url('Montserrat.ttf');
}
}

@font-face {
font-family: Montserrat;
font-style: italic;
src: url('Montserrat-Italic.ttf');
}
}

* {
font-family: Montserrat;
Expand All @@ -28,14 +28,18 @@ table tr td div {
overflow: auto;
}

td[name="deleteBtn"] {
td[name="deleteBtn"] div {
display: flex;
align-items: center;
justify-content: center;
}

td[name="deleteBtn"] button {
border-radius: 50%;
td[name="deleteBtn"] {
text-align: center;
}

td[name="deleteBtn"] div button {
border-radius: 100%;
aspect-ratio: 1;
border-style: solid;
cursor: pointer;
Expand Down Expand Up @@ -98,7 +102,7 @@ dialog form {
.pure-control-group input {
width: 98%;
}

table tr {
border-bottom: 1px solid #999;
}
Expand All @@ -111,7 +115,7 @@ dialog form {
display: flex;
justify-content: left !important;
width: 98vw;
padding: .5em .1em;
padding: .5em .1em !important;
}

table td::before {
Expand All @@ -122,13 +126,7 @@ dialog form {
text-align: left;
}

td[name="deleteBtn"] button {
border-radius: 50%;
aspect-ratio: 1;
}

.pure-table caption {
padding-top: 0px;
}
}

}

0 comments on commit 2cab341

Please sign in to comment.