Skip to content

Commit

Permalink
client: add tranistion
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal committed Apr 22, 2024
1 parent ab83b81 commit 478eeb4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
12 changes: 1 addition & 11 deletions client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,10 @@
#main {
padding: 10px;
width: 100%;
max-height: calc(100dvh - 120px);
margin-top: 60px;
padding-top: 70px;
}

#main.expand {
filter: blur(4px);
}

#main.full-height {
max-height: 100dvh;
margin-top: 0;
}

.hide {
display: none !important;
}
}
2 changes: 1 addition & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function App() {
return (
<div id='app'>
<LeftSidebar isVisible={isScrollingUp} />
<main id='main' ref={mainRef} className={`${expand ? 'expand' : ''} ${isScrollingUp ? '' : 'full-height'}`}>
<main id='main' ref={mainRef} className={expand ? 'expand' : ''}>
<Routes>
<Route path='/' element={<HomePage />} />
<Route path='/auth' element={<AuthPage />} />
Expand Down
10 changes: 10 additions & 0 deletions client/src/components/sidebar/left-sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@
}

@media screen and (max-width: 767px) {
#left-sidebar.reveal {
margin-bottom: 0;
transition: all 0.15s ease-in;
}

#left-sidebar.hide {
margin-bottom: -60px;
transition: all 0.3s ease-out;
}

#left-sidebar ul {
gap: 30px;
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/sidebar/left-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const LeftSidebar: React.FC<SidebarProps> = ({ isVisible }) => {
}

return (
<div id='left-sidebar' className={isVisible ? '' : 'hide'}>
<div id='left-sidebar' className={isVisible ? 'reveal' : 'hide'}>
<Link to='/' className='logo__wrapper'>
<img src="/logo.png" alt="" />
</Link>
Expand Down
10 changes: 10 additions & 0 deletions client/src/components/sidebar/right-sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@
}

@media screen and (max-width: 480px) {
#right-sidebar.reveal {
margin-top: 0;
transition: all 0.15s ease-in;
}

#right-sidebar.hide {
margin-top: -60px;
transition: all 0.3s ease-out;
}

#right-sidebar .right-sidebar__container {
padding: 0 10px;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/sidebar/right-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const RightSidebar: React.FC<SidebarProps> = ({ isVisible }) => {
const { expand } = useNavStore();

return (
<div id='right-sidebar' className={isVisible ? '' : 'hide'}>
<div id='right-sidebar' className={isVisible ? 'reveal' : 'hide'}>
<div className='right-sidebar__container'>
<Link to='/' className='logo__container'>
<img src="/logo.png" />
Expand Down

0 comments on commit 478eeb4

Please sign in to comment.