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