:3
This commit is contained in:
@@ -39,6 +39,9 @@ body {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#topnav_login {
|
||||
}
|
||||
|
||||
|
||||
.topnav_button:hover {
|
||||
background: var(--bg-color)
|
||||
@@ -47,7 +50,7 @@ body {
|
||||
#topnav_profile {
|
||||
margin-right: 0.5rem;
|
||||
position: relative;
|
||||
display: flex;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: right;
|
||||
height: 3rem;
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const is_logged_in = false;
|
||||
if (is_logged_in) {
|
||||
const prof = document.getElementById("topnav_profile");
|
||||
const login = document.getElementById("topnav_login");
|
||||
prof.style.display = "flex";
|
||||
login.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
document.addEventListener("keydown", (event) => {
|
||||
if (event.key === "Escape") on_pfp_click(true);
|
||||
});
|
||||
|
||||
|
||||
// :3
|
||||
|
||||
function on_pfp_click(close = false) {
|
||||
const el = document.getElementById("topnav_profile_dropdown");
|
||||
@@ -13,3 +24,5 @@ function on_pfp_click(close = false) {
|
||||
el.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user