Fixing opacity of profile menu
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user