1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-01 21:57:09 +01:00
blog/_src/assets/less/navigation.less

246 lines
3.9 KiB
Plaintext

/////////////////////////////////////
// NAVIGATION
/////////////////////////////////////
.menu-btn,
.search-btn {
line-height: 1em;
text-align: center;
vertical-align: middle;
display: inline-block;
margin: 0;
position: absolute;
right: 0;
top: 0;
// icons
&:before {
color: @link-color;
.transition;
}
&:hover:before {
color: @link-color-hover
}
&:active:before {
.transition(none);
color: #fff
}
}
.search-btn { right: 50px }
//
// Main Navigation
//
.nav-main {
.menu-btn {
margin-right: -.5em;
padding: .5em .7em;
&:before { font-size: 26px; }
}
li { display: inline-block; }
}
.nav-popover {
padding: @line-height-computed*1.5 0;
width: 100%;
background: @body-bg;
.clearfix;
}
.nav-link {
.h6;
display: block;
padding: .5em 1em;
width: 50%;
@media @breakpoint2 { width: 33.3% }
float: left;
text-align: center;
padding: 1em;
color: @link-color;
line-height: @line-height-computed;
text-transform: uppercase;
font-size: .8em;
// the icons
&:before {
display: block;
width: 100%;
text-align: center;
font-size: 32px;
height: 32px;
color: fade(@text-color-dimmed, 70%);
.transition;
}
&:hover,
&:hover:before {
color: @link-color;
border-bottom-color: @link-color
}
&:hover { background: rgba(255,255,255,.5); }
&:active {
background: @link-color;
top: 0;
}
&:active:before {
color: #fff;
.transition(none)
}
}
//
// Site Search
//
.site-search {
margin-right: 4%;
.nav-popover {
left: 0;
width: 100%;
}
}
.search-btn {
padding: .65em .85em;
}
.search-close {
position: absolute;
right: 1em;
&,
&:active { top: 1em; }
}
.topbar .search-area {
position: absolute;
width: 100%;
left: 0;
top: -3px;
z-index: 3;
background: #f1f4f7;
// hidden by default
.translate(0, -60px);
.transition;
&.ready {
.translate(0, 0);
}
}
.topbar .search-field {
width: 97%;
border: none;
.box-shadow(none);
background: transparent;
&:hover,
&:focus {
background: rgba(255,255,255,.7) !important;
}
}
.search-results {
.clearfix;
.nav-link {
@media @breakpoint2 {
width: 50%;
float: left;
font-size: .85em;
line-height: 1.3em
}
}
}
.popover {
position: absolute;
left: 0;
top: 71px;
z-index: 6;
background: lighten(@page-bg, 3%);
border-bottom: 1px solid rgba(255,255,255,.7);
box-shadow: 0 1px 4px fade(@brand-dark, 10%);
@media @breakpoint2 {
top: 0;
.row {
margin-top: @line-height-computed;
margin-bottom: @line-height-computed
}
}
}
//
// Paginator
//
.paginator {
.clearfix;
p { position: relative; }
a { display: block; }
i {
position: absolute;
left: 0;
top: 0;
}
.next {
text-align: right;
float: right;
a { margin-right: 1.5em; }
i {
margin-left: .5em;
left: auto;
right: 0;
}
}
.previous {
float: left;
a { margin-left: 1.5em; }
i { margin-right: .5em; }
}
}
// Infinite Loader
/////////////////////////////////////
.infiniteLoader .next {
width: 100%;
float: none;
margin-left: 0;
a {
.btn;
.aligncenter;
padding-top: @line-height-computed/1.5;
padding-bottom: @line-height-computed/1.5;
}
}
.infiniteLoader .previous,
.infiniteLoader .pagenumber,
.infiniteLoader i {
.hide;
}