Rearrange sidebar

This commit is contained in:
Georgi Gardev
2023-11-19 23:52:11 +02:00
parent fbe7e26ab4
commit 05d8ddb4c0
2 changed files with 28 additions and 19 deletions

View File

@@ -1,14 +1,15 @@
.Sidebar {
height: 100vh;
width: max(25vw, 180px);
backdrop-filter: blur(20px);
background-color: rgba(0, 0, 0, 0.3);
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
flex-shrink: 0;
justify-content: space-between;
height: 100vh;
width: max(25vw, 180px);
padding-bottom: 1.5rem;
backdrop-filter: blur(20px);
background-color: rgba(0, 0, 0, 0.3);
opacity: 1;
transition: opacity 0.5s ease, transform 0.5s ease;
}
@@ -17,6 +18,12 @@
opacity: 0;
}
.MenuWrapper {
height: 100%;
display: flex;
align-items: center;
}
.Menu {
display: flex;
flex-direction: column;

View File

@@ -22,19 +22,21 @@ export function Sidebar(props: SidebarProps) {
return (
<div classList={{ [style.Sidebar]: true, [style.Loading]: isInitialLoading() }}>
<ul class={style.Menu}>
<For each={props.categories()}>
{(category) => (
<li
classList={{ [style.Active]: isActive(category) }}
onClick={() => props.selectCategory(category, 'permanent')}
onMouseEnter={() => props.selectCategory(category, 'temporary')}
>
{category}
</li>
)}
</For>
</ul>
<div class={style.MenuWrapper}>
<ul class={style.Menu}>
<For each={props.categories()}>
{(category) => (
<li
classList={{ [style.Active]: isActive(category) }}
onClick={() => props.selectCategory(category, 'permanent')}
onMouseEnter={() => props.selectCategory(category, 'temporary')}
>
{category}
</li>
)}
</For>
</ul>
</div>
<div class={style.SettingsWrapper}>
<FavoriteBackground />
<Tooltip withArrow placement="top" label="Settings">