aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarsVomMars2021-01-29 19:20:41 +0100
committerLarsVomMars2021-01-29 19:20:41 +0100
commitf9ccf6ed47254edf7c1fb6231212bd4b4d6c8356 (patch)
tree4bc9889cd7824300c98366e7cdedfba60414c55e
parent153a18aaf585c459213d621f8869de2acf5f1e68 (diff)
AHHH
-rw-r--r--profile/public/style.css2
-rw-r--r--profile/public/user.js7
2 files changed, 7 insertions, 2 deletions
diff --git a/profile/public/style.css b/profile/public/style.css
index 1fc5a9d..beac063 100644
--- a/profile/public/style.css
+++ b/profile/public/style.css
@@ -65,7 +65,7 @@ img {
opacity: 0.8;
}
-#user h1:after,
+#user h1:after:not(".hidden-chevron"),
#comments h2:after,
#char h2:after {
content: url(/feather/icons/chevron-up.svg);
diff --git a/profile/public/user.js b/profile/public/user.js
index 84c4858..12f2fd6 100644
--- a/profile/public/user.js
+++ b/profile/public/user.js
@@ -8,7 +8,12 @@ if (uid < 1 || uid > 119) window.location.assign("./users.html"); // Well
async function addUser(userData) {
const resp = await (await fetch("/auth/api/status")).json();
if (!resp.admin) {
- userDiv.style.display = "none";
+ const { user } = userData;
+ const h1 = document.createElement("h1");
+ h1.textContent = `${user.name} ${user.middlename || ""} ${user.surname}`;
+ h1.classList.add("hidden-chevron");
+ userDiv.append(h1);
+ document.querySelector("title").textContent = h1.textContent;
return;
}
const divs = [];