mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
main menu as part of expandable topbar area
This commit is contained in:
parent
ac9d5ecda8
commit
81adb766b5
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<nav role="navigation" class="nav-main">
|
<nav role="navigation" class="nav-main">
|
||||||
<a class="menu-btn icon-list" href="#"></a>
|
<a class="menu-btn icon-list" href="#"></a>
|
||||||
<div class="nav-popover hide">
|
<div class="nav-popover">
|
||||||
<a class="nav-link goodies icon-gift" href="/goodies/">goodies</a>
|
<a class="nav-link goodies icon-gift" href="/goodies/">goodies</a>
|
||||||
<a class="nav-link photos icon-pictures" href="/photos/">photos</a>
|
<a class="nav-link photos icon-pictures" href="/photos/">photos</a>
|
||||||
<a class="nav-link personal icon-user" href="/personal/">personal</a>
|
<a class="nav-link personal icon-user" href="/personal/">personal</a>
|
||||||
|
@ -38,8 +38,8 @@ var siteNavigation = {
|
|||||||
$searchresults.removeClass('hide');
|
$searchresults.removeClass('hide');
|
||||||
|
|
||||||
// hide menu too just in case
|
// hide menu too just in case
|
||||||
if ( $navpop.is(':visible') ) {
|
if ( $('body').hasClass('menu-open') ) {
|
||||||
$navpop.addClass('hide');
|
$('body').removeClass('menu-open');
|
||||||
}
|
}
|
||||||
|
|
||||||
// bind the hide controls
|
// bind the hide controls
|
||||||
@ -80,13 +80,13 @@ var siteNavigation = {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
// toggle menu
|
// toggle menu
|
||||||
$thepop.toggleClass('show').toggleClass('hide');
|
$('body').toggleClass('menu-open');
|
||||||
|
|
||||||
// bind the hide controls
|
// bind the hide controls
|
||||||
$(document).bind("click.hidethepop", function() {
|
$(document).bind('click.hidethepop', function() {
|
||||||
$thepop.removeClass('show').addClass('hide');
|
$('body').removeClass('menu-open');
|
||||||
// unbind the hide controls
|
// unbind the hide controls
|
||||||
$(document).unbind("click.hidethepop");
|
$(document).unbind('click.hidethepop');
|
||||||
});
|
});
|
||||||
|
|
||||||
// dont close thepop when you click on thepop
|
// dont close thepop when you click on thepop
|
||||||
|
@ -2,16 +2,6 @@
|
|||||||
// NAVIGATION
|
// NAVIGATION
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
.nav-popover {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
z-index: 5; // so it's always above page content
|
|
||||||
.border-bottom-radius;
|
|
||||||
background: #f1f4f7;
|
|
||||||
box-shadow: 0 2px 7px rgba(0,0,0,.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-btn,
|
.menu-btn,
|
||||||
.search-btn {
|
.search-btn {
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
@ -20,17 +10,17 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
// icons
|
// icons
|
||||||
&:before { .transition; }
|
&:before { .transition; }
|
||||||
&:hover:before {
|
&:hover:before {
|
||||||
color: @link-color
|
color: @link-color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.search-btn { right: 50px }
|
||||||
.nav-main,
|
|
||||||
.site-search {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Main Navigation
|
// Main Navigation
|
||||||
@ -46,15 +36,15 @@
|
|||||||
li { display: inline-block; }
|
li { display: inline-block; }
|
||||||
|
|
||||||
.nav-popover {
|
.nav-popover {
|
||||||
top: 130%;
|
background: @body-bg;
|
||||||
right: 0;
|
padding: @line-height-computed*1.5 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.clearfix;
|
.clearfix;
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@media @breakpoint2 {
|
@media @breakpoint2 {
|
||||||
width: 33%
|
width: 33.3%
|
||||||
}
|
}
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -13,7 +13,6 @@ body {
|
|||||||
//
|
//
|
||||||
.topbar {
|
.topbar {
|
||||||
.clearfix;
|
.clearfix;
|
||||||
background: fade(@brand-dark, 3%);
|
|
||||||
border-bottom: 1px solid rgba(255,255,255,.7);
|
border-bottom: 1px solid rgba(255,255,255,.7);
|
||||||
box-shadow: inset 0 1px 4px fade(@brand-dark, 20%), inset 0 -1px 4px fade(@brand-dark, 20%);
|
box-shadow: inset 0 1px 4px fade(@brand-dark, 20%), inset 0 -1px 4px fade(@brand-dark, 20%);
|
||||||
|
|
||||||
@ -190,15 +189,22 @@ a.close,
|
|||||||
//
|
//
|
||||||
|
|
||||||
@media @breakpoint2 {
|
@media @breakpoint2 {
|
||||||
|
body {
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
section[role=document] {
|
section[role=document] {
|
||||||
background-color: @body-bg;
|
background-color: @page-bg;
|
||||||
margin-top: 71px;
|
margin-top: 71px;
|
||||||
|
.transition;
|
||||||
|
.menu-open & {
|
||||||
|
margin-top: 300px;
|
||||||
|
}
|
||||||
margin-bottom: 380px;
|
margin-bottom: 380px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
border-top: 1px solid rgba(255,255,255,.7);
|
border-top: 1px solid rgba(255,255,255,.7);
|
||||||
border-bottom: 1px solid rgba(255,255,255,.7);
|
border-bottom: 1px solid rgba(255,255,255,.7);
|
||||||
box-shadow: 0 1px 4px fade(@brand-dark, 20%), 0 -1px 4px fade(@brand-dark, 20%);
|
box-shadow: 0 1px 4px fade(@brand-dark, 10%), 0 -1px 4px fade(@brand-dark, 10%);
|
||||||
}
|
}
|
||||||
.topbar,
|
.topbar,
|
||||||
.footer {
|
.footer {
|
||||||
@ -207,9 +213,9 @@ a.close,
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.topbar {
|
.topbar {
|
||||||
height: 71px;
|
min-height: 71px;
|
||||||
top: 0;
|
top: 0;
|
||||||
box-shadow: inset 0 1px 4px fade(@brand-dark, 20%);
|
box-shadow: inset 0 1px 4px fade(@brand-dark, 10%);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,5 +223,7 @@ a.close,
|
|||||||
height: 380px;
|
height: 380px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
|
.menu-open & { .hide; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -41,7 +41,8 @@
|
|||||||
// Scaffolding
|
// Scaffolding
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|
||||||
@body-bg: @brand-light;
|
@body-bg: #dfe8ef;
|
||||||
|
@page-bg: @brand-light;
|
||||||
@border-radius-base: 3px;
|
@border-radius-base: 3px;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user