Better table display for redirects

This commit is contained in:
Charlotte Som 2022-07-26 05:11:20 +01:00
parent 54f712f294
commit b9914602eb
2 changed files with 15 additions and 2 deletions

View file

@ -65,3 +65,14 @@ form {
form button {
margin-top: 0.5em;
}
table pre .spaced {
padding: 0.5em;
}
table td .clipped {
overflow-x: clip;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 30ch;
}

View file

@ -16,11 +16,13 @@ const populateRedirects = async (redirKey) => {
h(
"td",
{},
h("a", { href: "/" + redirect.path }, [h("pre", {}, [redirect.path])])
h("a", { href: "/" + redirect.path }, [
h("pre", { className: "spaced" }, [redirect.path]),
])
),
h(
"td",
{},
{ className: "clipped" },
h("a", { href: redirect.target_location }, [redirect.target_location])
),
h("td", {}, [redirect.redirect_code]),