-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor the Sidebar component to be a hook - The previous JSX and CSS was a mess. This looks much cleaner imo <3 - Make the sidebar fixed in mobile view in order to remove dead space. - Fix a bug where the sidebar in mobile view would overflow vertically if too many tabs where opened
- Loading branch information
Showing
2 changed files
with
44 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,49 @@ | ||
@import url('~app/styles/variables.css'); | ||
|
||
.side { | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
box-sizing: border-box; | ||
background-color: rgba(var(--rgb-min), var(--rgb-min), var(--rgb-min), 2%); | ||
margin-bottom: 5em; | ||
width: 290px; | ||
} | ||
|
||
.sidebar { | ||
margin: 0 1.1em; | ||
width: 100%; | ||
padding-top: 20px; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
@media (--mobile-device) { | ||
margin: 0; | ||
padding-right: 1.5rem; | ||
} | ||
width: 290px; | ||
flex-shrink: 0; | ||
padding: 1.1em; | ||
padding-bottom: 4.4em; | ||
background-color: rgba(var(--rgb-min), var(--rgb-min), var(--rgb-min), 2%); | ||
border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg); | ||
z-index: 11; | ||
} | ||
|
||
.sidebarHeader { | ||
margin-top: 20px; | ||
width: 95%; | ||
margin: 1em 0 1.4em 0; | ||
align-self: center; | ||
text-align: center; | ||
border-bottom: 2px solid var(--border-gray); | ||
padding-bottom: 0.6em; | ||
width: 93%; | ||
border-bottom: 2px solid var(--border-gray); | ||
} | ||
|
||
.sidebarPicture { | ||
margin-top: 30px; | ||
display: none; | ||
flex-wrap: wrap; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.sidebarTop { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.sidebarBottom { | ||
margin-top: 2em; | ||
} | ||
|
||
.oldImg { | ||
filter: grayscale(100%); | ||
} | ||
|
||
.pictureInfo { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.sidebarCloseBtn { | ||
width: 40px; | ||
height: 25px; | ||
.sidebarCloseButton { | ||
display: none; | ||
align-items: right; | ||
justify-content: flex-end; | ||
color: var(--lego-font-color); | ||
z-index: 10; | ||
|
||
@media (--mobile-device) { | ||
display: inline-block; | ||
position: absolute; | ||
right: 0.7em; | ||
top: 0.5em; | ||
} | ||
} | ||
|
||
@media (--mobile-device) { | ||
.side, | ||
.sidebarPicture { | ||
display: none; | ||
} | ||
|
||
.side.isOpen { | ||
display: block; | ||
position: absolute; | ||
z-index: 11; | ||
width: 100%; | ||
box-shadow: var(--shadow-lg); | ||
height: 100%; | ||
} | ||
|
||
.sidebar { | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
max-width: 100%; | ||
height: 100vh; | ||
border-radius: 0; | ||
background-color: var(--lego-card-color); | ||
height: 100%; | ||
overflow-y: auto; | ||
overscroll-behavior: none; | ||
} | ||
|
||
.sidebarWrapper { | ||
width: 100%; | ||
position: absolute; | ||
height: 100%; | ||
background-color: rgba(var(--rgb-min), var(--rgb-min), var(--rgb-min), 7%); | ||
z-index: 10; | ||
.sidebarClosed { | ||
display: none; | ||
} | ||
|
||
.sidebarCloseButton { | ||
display: block; | ||
align-self: flex-end; | ||
color: var(--lego-font-color); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters