Attempted to make the nav bar closer in style to the old beta site / current main site. Adjusted the font weights, the size and position of the search bar, and the nav bar on the right. Also made the <li> tags for the curriculum and forum buttons clickable and change styles when hovered over, just like on the main freecodecamp.org site.

Partially solves https://github.com/freeCodeCamp/freeCodeCamp/issues/17266
This commit is contained in:
Kris Koishigawa
2018-07-28 18:53:33 +09:00
committed by Mrugesh Mohapatra
parent 1dfe1f1ec0
commit 2dc609efca
2 changed files with 31 additions and 17 deletions

View File

@ -8,7 +8,7 @@ header {
#top-nav { #top-nav {
background: #006400; background: #006400;
margin-bottom: 0.45rem; margin-bottom: 0.45rem;
height: 38px; height: 36px;
margin-bottom: 0px; margin-bottom: 0px;
border-radius: 0; border-radius: 0;
border: none; border: none;
@ -17,12 +17,6 @@ header {
padding: 0 30px 0 15px; padding: 0 30px 0 15px;
} }
@media screen, (max-width: 630px) {
#top-nav {
padding: 0;
}
}
#top-nav .home-link { #top-nav .home-link {
display: flex; display: flex;
align-items: center; align-items: center;
@ -31,12 +25,12 @@ header {
#top-nav img { #top-nav img {
max-height: 25px; max-height: 25px;
min-width: 35px; min-width: 35px;
margin: 0 5px 0 10px; margin: 0 5px 0 15px;
} }
#top-right-nav { #top-right-nav {
display: flex; display: flex;
width: 270px; width: auto;
margin: 0; margin: 0;
list-style: none; list-style: none;
justify-content: space-around; justify-content: space-around;
@ -62,12 +56,20 @@ header {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
margin: 0 3px; margin: 0;
}
#top-right-nav > li > a {
padding: 10px 15px;
}
.sign-in-btn {
padding: 10px 0 10px 15px;
} }
#top-right-nav li > a, #top-right-nav li > span { #top-right-nav li > a, #top-right-nav li > span {
color:#fff; color:#eee;
font-size: 17px; font-size: 15px;
font-weight: 500; font-weight: 500;
} }
@ -76,6 +78,14 @@ header {
font-weight: 500; font-weight: 500;
} }
.nav-btn:hover {
background-color: #eee;
}
#top-right-nav .nav-btn a:hover {
color: darkgreen;
}
.user-state-spinner { .user-state-spinner {
height: 40px; height: 40px;
} }
@ -86,8 +96,12 @@ header {
/* Search bar */ /* Search bar */
.fcc_searchBar { .fcc_searchBar {
flex-grow: 0.8; flex-grow: 0.4;
padding: 2px 10px 0; padding: 3px 10px 0;
margin-right: auto;
}
#fcc_instantsearch {
max-height: 30px;
} }
.ais-SearchBox-form { .ais-SearchBox-form {
margin-bottom: 0; margin-bottom: 0;

View File

@ -16,15 +16,15 @@ function Header() {
</a> </a>
<FCCSearch /> <FCCSearch />
<ul id='top-right-nav'> <ul id='top-right-nav'>
<li> <li className='nav-btn'>
<Link to='/'>Curriculum</Link> <Link to='/'>Curriculum</Link>
</li> </li>
<li> <li className='nav-btn'>
<a href='https://forum.freecodecamp.org' target='_blank'> <a href='https://forum.freecodecamp.org' target='_blank'>
Forum Forum
</a> </a>
</li> </li>
<li> <li className='sign-in-btn'>
<UserState /> <UserState />
</li> </li>
</ul> </ul>