1
Fork 0

Make navbar look better on mobile

This commit is contained in:
Jake Howard 2016-01-08 19:05:50 +00:00
parent cb691cbea0
commit a67915b611
3 changed files with 44 additions and 32 deletions

View file

@ -14,7 +14,7 @@ export default class NavBar extends React.Component {
<Header />
<div className="collapse navbar-collapse" id="navbar">
<ul className="nav navbar-nav home-button hidden-sm">
<li className="active home"><a href=""><i className="icon ion-home"></i></a></li>
<Item href="" icon="ion-home" />
</ul>
<ul className="nav navbar-nav" id="navigation">
<Dropdown title="Projects">

View file

@ -1,3 +1,25 @@
#navigation {
@media (min-width: @screen-xs-max) {
.flexbox();
justify-content: center;
float: none;
}
& a {
.transition(~"ease-in-out .3s color");
}
& > li {
@media (min-width: @screen-md-min) {
margin-right: 23px;
}
& > a {
@media (min-width: @screen-md-min) {
padding: 15px 10px;
}
@media (max-width: @screen-xs-max) {
padding: 15px 15px;
}
}
}
.dropdown-menu {
@media (min-width: @screen-sm) {
right: auto;
@ -17,50 +39,37 @@
.open & {
opacity: 1;
}
a {
padding-left: 20px;
}
}
}
#navigation {
@media (min-width: @screen-xs-max) {
.flexbox();
justify-content: center;
float: none;
}
& a {
.transition(~"ease-in-out .3s color");
}
& > li {
@media (min-width: @screen-md-min) {
margin-right: 23px;
}
@media (max-width: @screen-sm-max) {
margin-right: 10px;
margin-left: 11px;
}
& > a {
@media (min-width: @screen-md-min) {
padding: 15px 10px;
}
@media (max-width: @screen-sm-max) {
padding: 15px 3px;
}
}
}
}
.navbar {
border-radius: 0;
.home-button a {
.transition(~"ease-in-out .3s color");
}
}
.navbar-nav.nav {
margin: 0;
}
.navbar-toggle {
right: 10px;
}
#navbar-container {
z-index: 0;
width: 96%;
left: 2%;
margin: 0;
z-index: 10000;
i + * {
margin-right: 5px;
}
& .container-fluid{
padding-right: 0;
padding-left: 0;
@ -73,7 +82,8 @@
@media (max-width: @screen-sm) {
position: fixed;
top: 0;
width: 100%;
width: 95%;
}
}
}
@ -83,9 +93,11 @@
height: 52px;
}
@media (min-width: @screen-xs-max) {
.home-button {
margin-right: 15px !important;
}
}
#navbar {
margin: 0;