Finished first pass on new navbar

This commit is contained in:
John O'Nolan 2014-07-29 01:34:34 +03:00
parent 76c8c86ada
commit 38f3101518
4 changed files with 117 additions and 56 deletions

View File

@ -8,7 +8,6 @@
@include position(fixed, 0px 0px auto 0px); @include position(fixed, 0px 0px auto 0px);
z-index: 9999; z-index: 9999;
background: $darkgrey; background: $darkgrey;
box-shadow: 0 0 2px rgba(6,8,8,0.15)
} }
// Wrapper for each item // Wrapper for each item
@ -16,26 +15,29 @@
position: relative; position: relative;
display: block; display: block;
float: left; float: left;
padding-left: 10px; height: 60px;
color: rgba(255,255,255,0.8); padding-right: 10px;
font-size: 1.5rem; font-size: 1.1rem;
line-height: 1; letter-spacing: 1px;
font-weight: 200;
line-height: 1.1em;
} }
// Pill shaped background // Pill shaped background
.nav-label { .nav-label {
height: 34px; height: 33px;
margin-top: 13px; margin-top: 14px;
padding: 8px 10px; padding: 10px 12px;
color: rgba(255,255,255,0.7);
text-transform: uppercase;
border-radius: 4px; border-radius: 4px;
@include transition(background 0.5s); @include transition(all 0.5s);
}
.nav-item.active .nav-label {
background: darken($darkgrey, 5%);
} }
.nav-item.active .nav-label,
.nav-item:hover .nav-label { .nav-item:hover .nav-label {
background: darken($darkgrey, 10%); color: rgba(255,255,255,0.9);
@include transition(background 0.1s); background: darken($darkgrey, 7%);
@include transition(all 0.1s);
} }
// Ghost branding // Ghost branding
@ -48,6 +50,7 @@
padding: 23px; padding: 23px;
color: lighten($grey, 20%); color: lighten($grey, 20%);
font-size: 1.5rem; font-size: 1.5rem;
line-height: 1em;
@include transition(color 0.5s); @include transition(color 0.5s);
} }
.ghost-logo:hover, .ghost-logo:hover,
@ -63,11 +66,18 @@
right: 0; right: 0;
padding: 0; padding: 0;
margin: 0; margin: 0;
cursor: pointer;
.nav-label {
margin: 0;
padding: 0 12px;
background: none !important;
}
// Profile picture // Profile picture
.image { .image {
float: left; float: left;
margin: 0 7px 0 0; margin: 14px 7px 0 0;
img { img {
display: block; display: block;
@ -79,19 +89,41 @@
// Descriptive label for mobile menu // Descriptive label for mobile menu
.name { .name {
display: none; // Hide until mobile float: right;
float: left; height: 33px;
text-overflow: ellipsis; margin-top: 14px;
white-space: nowrap; padding: 10px 12px;
overflow: hidden; border-radius: 4px;
line-height: 19px; @include transition(background 0.5s);
padding-bottom: 5px;
small { small {
display: none; // hide until mobile
font-size: 12px; font-size: 12px;
color: #cacaca; color: #cacaca;
margin-top: 0; margin-top: 0;
line-height: 19px; line-height: 19px;
} }
} }
} &:hover .name {
color: rgba(255,255,255,0.9);
background: darken($darkgrey, 7%);
@include transition(background 0.1s);
}
}//.user-menu
/* mobile styles
.name {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
line-height: 19px;
padding-bottom: 5px;
small {
display: block;
}
}
*/

View File

@ -24,12 +24,9 @@
<div class="nav-label"> <div class="nav-label">
<div class="image"><img src="https://pbs.twimg.com/profile_images/2424666637/rm02mq43w94amr8jbhz3.jpeg" alt="John O'Nolan"></div> <div class="image"><img src="https://pbs.twimg.com/profile_images/2424666637/rm02mq43w94amr8jbhz3.jpeg" alt="John O'Nolan"></div>
<div class="name"> <div class="name">
John O'Nolan John O'Nolan<span class="menu-arrow"></span>
<small>Profile &amp; Settings</small> <small>Profile &amp; Settings</small>
</div> </div>
<div class="me">
Me<span class="count hidden"></span><span class="menu-arrow"></span>
</div>
</div> </div>
</div><!--menu-holder--> </div><!--menu-holder-->

View File

@ -629,35 +629,37 @@ a, a:active {
bottom: auto; bottom: auto;
left: 0px; left: 0px;
z-index: 9999; z-index: 9999;
background: #242628; background: #242628; }
box-shadow: 0 0 2px rgba(6, 8, 8, 0.15); }
.nav-item { .nav-item {
position: relative; position: relative;
display: block; display: block;
float: left; float: left;
padding-left: 10px; height: 60px;
color: rgba(255, 255, 255, 0.8); padding-right: 10px;
font-size: 1.5rem; font-size: 1.1rem;
line-height: 1; } letter-spacing: 1px;
font-weight: 200;
line-height: 1.1em; }
.nav-label { .nav-label {
height: 34px; height: 33px;
margin-top: 13px; margin-top: 14px;
padding: 8px 10px; padding: 10px 12px;
color: rgba(255, 255, 255, 0.7);
text-transform: uppercase;
border-radius: 4px; border-radius: 4px;
-webkit-transition: background 0.5s; -webkit-transition: all 0.5s;
-moz-transition: background 0.5s; -moz-transition: all 0.5s;
transition: background 0.5s; } transition: all 0.5s; }
.nav-item.active .nav-label {
background: #18191b; }
.nav-item.active .nav-label,
.nav-item:hover .nav-label { .nav-item:hover .nav-label {
background: #0c0d0d; color: rgba(255, 255, 255, 0.9);
-webkit-transition: background 0.1s; background: #131415;
-moz-transition: background 0.1s; -webkit-transition: all 0.1s;
transition: background 0.1s; } -moz-transition: all 0.1s;
transition: all 0.1s; }
.ghost-logo { .ghost-logo {
display: inline-block; display: inline-block;
@ -667,6 +669,7 @@ a, a:active {
padding: 23px; padding: 23px;
color: #656d71; color: #656d71;
font-size: 1.5rem; font-size: 1.5rem;
line-height: 1em;
-webkit-transition: color 0.5s; -webkit-transition: color 0.5s;
-moz-transition: color 0.5s; -moz-transition: color 0.5s;
transition: color 0.5s; } transition: color 0.5s; }
@ -697,25 +700,54 @@ a, a:active {
top: 0; top: 0;
right: 0; right: 0;
padding: 0; padding: 0;
margin: 0; } margin: 0;
cursor: pointer; }
.user-menu .nav-label {
margin: 0;
padding: 0 12px;
background: none !important; }
.user-menu .image { .user-menu .image {
float: left; float: left;
margin: 0 7px 0 0; } margin: 14px 7px 0 0; }
.user-menu .image img { .user-menu .image img {
display: block; display: block;
width: 32px; width: 32px;
height: 32px; height: 32px;
border-radius: 100%; } border-radius: 100%; }
.user-menu .name { .user-menu .name {
display: none; float: right;
float: left; height: 33px;
text-overflow: ellipsis; margin-top: 14px;
white-space: nowrap; padding: 10px 12px;
overflow: hidden; border-radius: 4px;
line-height: 19px; -webkit-transition: background 0.5s;
padding-bottom: 5px; } -moz-transition: background 0.5s;
transition: background 0.5s; }
.user-menu .name small { .user-menu .name small {
display: none;
font-size: 12px; font-size: 12px;
color: #cacaca; color: #cacaca;
margin-top: 0; margin-top: 0;
line-height: 19px; } line-height: 19px; }
.user-menu:hover .name {
color: rgba(255, 255, 255, 0.9);
background: #131415;
-webkit-transition: background 0.1s;
-moz-transition: background 0.1s;
transition: background 0.1s; }
/* mobile styles
.name {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
line-height: 19px;
padding-bottom: 5px;
small {
display: block;
}
}
*/

File diff suppressed because one or more lines are too long