[frontend/components] Restyle sidebar and add profile picture
This commit is contained in:
parent
e1c5a99ab3
commit
31a8492d51
2 changed files with 19 additions and 2 deletions
|
@ -11,7 +11,10 @@
|
|||
<GlobalComponents></GlobalComponents>
|
||||
<div @ref="SidebarElementRef" class="sidebar @(_open ? "open" : "")" tabindex="0">
|
||||
<div class="header">
|
||||
<account-dropdown/>
|
||||
@*ToDo: account dropdown*@
|
||||
<div class="avatar">
|
||||
<UserAvatar User="Session.Current" OnClick="OpenProfile" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<NavLink href="/" Match="NavLinkMatch.All">
|
||||
|
@ -106,6 +109,11 @@
|
|||
await _compose.OpenDialog();
|
||||
}
|
||||
|
||||
private void OpenProfile()
|
||||
{
|
||||
if (Session.Current != null) Navigation.NavigateTo($"/@{Session.Current.Username}");
|
||||
}
|
||||
|
||||
private void ToggleSidebar()
|
||||
{
|
||||
_open = !_open;
|
||||
|
|
|
@ -114,12 +114,21 @@
|
|||
width: 15rem;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: var(--foreground-color);
|
||||
background-color: var(--background-color);
|
||||
border-right: var(--highlight-color) solid 0.05rem;
|
||||
}
|
||||
|
||||
.bottom-bar {
|
||||
display: none;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.avatar {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
|
|
Loading…
Add table
Reference in a new issue