Better table display for redirects

main
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 { form button {
margin-top: 0.5em; 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( h(
"td", "td",
{}, {},
h("a", { href: "/" + redirect.path }, [h("pre", {}, [redirect.path])]) h("a", { href: "/" + redirect.path }, [
h("pre", { className: "spaced" }, [redirect.path]),
])
), ),
h( h(
"td", "td",
{}, { className: "clipped" },
h("a", { href: redirect.target_location }, [redirect.target_location]) h("a", { href: redirect.target_location }, [redirect.target_location])
), ),
h("td", {}, [redirect.redirect_code]), h("td", {}, [redirect.redirect_code]),