Fixing opacity of profile menu

This commit is contained in:
metacryst
2025-10-19 20:58:24 -05:00
parent 5949c006f5
commit 9a829ab34f

View File

@@ -5,8 +5,8 @@ css(`
top: -.3em;
width: 0;
height: 0;
background-color: var(--orange);
opacity: 30%;
background-color: rgba(255, 223, 180, 0.56);
color: black;
transition: width 0.2s, height 0.2s;
border-radius: 12px;
}
@@ -46,20 +46,13 @@ export default class ProfileMenu extends HTMLElement {
setTimeout(() => {
this.innerHTML = /* html */`
<a href="signout" style="position: absolute; left: 0px; color: white; z-index: 2">sign out</a>
<p>Profile</p>
`
}, 200)
} else {
this.innerHTML === ""
}
}
logout() {
fetch('/signout', { method: 'GET', credentials: 'include' })
.then(() => {
// Force a clean full-page reload of "/"
window.location.href = '/?loggedout';
});
}
}
customElements.define("profile-menu", ProfileMenu)