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; top: -.3em;
width: 0; width: 0;
height: 0; height: 0;
background-color: var(--orange); background-color: rgba(255, 223, 180, 0.56);
opacity: 30%; color: black;
transition: width 0.2s, height 0.2s; transition: width 0.2s, height 0.2s;
border-radius: 12px; border-radius: 12px;
} }
@@ -46,20 +46,13 @@ export default class ProfileMenu extends HTMLElement {
setTimeout(() => { setTimeout(() => {
this.innerHTML = /* html */` this.innerHTML = /* html */`
<a href="signout" style="position: absolute; left: 0px; color: white; z-index: 2">sign out</a> <a href="signout" style="position: absolute; left: 0px; color: white; z-index: 2">sign out</a>
<p>Profile</p>
` `
}, 200) }, 200)
} else { } else {
this.innerHTML === "" 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) customElements.define("profile-menu", ProfileMenu)