Skip to content

Commit

Permalink
Wrap nav and main into App-controllable style blocks (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Dec 9, 2024
1 parent 7570109 commit 61395d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,24 @@ body {
}

.container {
display: flex;
position: relative;
width: 100%;
}

/* ===================== Main ===================== */
.main {
.navigationSection {

}

.mainSection {
position: absolute;
width: calc(100% - 300px);
left: 300px;
min-height: 100vh;
background: var(--white);
transition: 0.5s;
}
.main.active {
.mainSection.active {
width: calc(100% - 80px);
left: 80px;
}
Expand Down
6 changes: 4 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ function App() {
return (
<>
<div className="container">
<Navigation/>
<div className={navigationExpanded ? "main" : "main active"}>
<div className="navigationSection">
<Navigation/>
</div>
<div className={navigationExpanded ? "mainSection" : "mainSection active"}>
<TopBar/>

<div className="flashcards">
Expand Down

0 comments on commit 61395d5

Please sign in to comment.