Skip to content

Commit

Permalink
apply conditional css class for the search bar to be wider when the u…
Browse files Browse the repository at this point in the history
…ser is logged in
  • Loading branch information
Helen Lei committed Nov 14, 2023
1 parent c78a123 commit 0abd3ae
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 9 deletions.
15 changes: 15 additions & 0 deletions client/src/assets/profile_bear/profile_bear_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions client/src/modules/Globals/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ export default function Navbar({ userInput }: NavbarProps) {
<a className="" href="/">
<img
src="/logo.svg"
className="img-fluid scale-logo-navbar"
className="scale-logo-navbar"
alt="CU Reviews Logo"
/>
</a>
</div>
<div className="col navbar-searchbar-container">
<div className={`col navbar-searchbar-container${isLoggedIn ? "-wider" : "-not"}`}>
<SearchBar
userInput={userInput}
contrastingResultsBackground={true}
isInNavbar={true}
/>
</div>
{displayButton()}
</div>
</div >
)
}
20 changes: 20 additions & 0 deletions client/src/modules/Globals/Styles/NavBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
margin-left: 21px;
margin-right: 150px;
}

.navbar-searchbar-container-wider {
width: 100%;
margin-right: 12%;
}

.navbar-searchbar-container-not {
width: 100%;
margin-right: 28%;
}
}

@media screen and (min-width: 992px) {
Expand All @@ -22,6 +32,16 @@
.navbar-searchbar-container {
margin-right: 220px;
}

.navbar-searchbar-container-wider {
width: 100%;
margin-right: 15%;
}

.navbar-searchbar-container-not {
width: 100%;
margin-right: 15%;
}
}

.custom-navbar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
width: 40px;
height: 40px;
}
}
}
2 changes: 1 addition & 1 deletion client/src/modules/Profile/Styles/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
right: 30px;
top: 40px;

width: 137px;
width: 10%;
height: 39px;

background: #ffffff;
Expand Down
5 changes: 2 additions & 3 deletions client/src/modules/Results/Styles/ResultsDisplay.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@
color: #9fcbff !important;
}

.react-major-select__control--is-focused
.react-major-select__dropdown-indicator {
.react-major-select__control--is-focused .react-major-select__dropdown-indicator {
color: #0076ff !important;
}

Expand Down Expand Up @@ -419,4 +418,4 @@ ul {
padding-top: 28px;
padding-right: 8%;
padding-left: 1.5%;
}
}
2 changes: 1 addition & 1 deletion client/src/modules/SearchBar/Styles/SearchBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
border-style: solid;
border-color: #6ba7ec;
border-width: 0 1px 1px 1px;
}
}

0 comments on commit 0abd3ae

Please sign in to comment.