grav-theme-libretic/scss/template/_header.scss

279 lines
6.8 KiB
SCSS
Raw Normal View History

2015-01-15 19:15:54 +01:00
// Header styling
#header {
2015-01-20 15:34:37 +01:00
@extend .padding-horiz;
position: absolute;
z-index: 10;
width: 100%;
height: $header-height;
background-color: rgba(255,255,255,0.90);
box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15);
> .grid, .logo, #navbar, .social-navigation {
height: 50%;
}
2015-01-16 14:39:31 +01:00
.fa {
color: $black;
}
2015-01-15 19:15:54 +01:00
2015-01-16 14:39:31 +01:00
.logo {
h3 {
@extend %vertical-align;
2015-01-21 13:29:23 +01:00
@include breakpoint(mobile-only) {
font-size: 1.9rem;
}
2015-01-16 14:39:31 +01:00
}
2015-01-15 19:15:54 +01:00
ul {
&.social-icons {
@extend %vertical-align;
}
}
}
2015-01-20 15:34:37 +01:00
.search-box {
@extend %vertical-align;
display: block;
float: right;
text-align: right;
i {
color: $header-text;
position: absolute;
top: 0.5rem;
right: 0.6rem;
z-index: -1;
cursor: pointer;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button {
display: none;
}
input[type=search] {
outline: none;
cursor: pointer;
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
font-family: inherit;
font-size: 100%;
border: 0 none;
box-shadow: none;
color: transparent;
background: transparent;
width: 4rem;
height: 1.3rem;
margin-bottom: 0;
font-size: $core-font-size - 0.1rem;
@include transition(all .5s);
&:focus {
width: 10rem;
background-color: transparentize($header-text, 0.7);
cursor: auto;
color: $header-text;
}
}
input:-moz-placeholder {
color: transparent;
}
input::-webkit-input-placeholder {
color: transparent;
}
2015-01-21 13:29:23 +01:00
@include breakpoint(mobile-only) {
float: left;
text-align: left;
i {
left: 0.6rem;
}
input[type=search] {
padding-left: 2rem;
&:focus {
width: 8rem;
}
}
}
2015-01-20 15:34:37 +01:00
}
#navbar {
font-size: $core-font-size + 0.1rem;
ul {
margin: 0;
padding: 0;
list-style: none;
&.navigation {
@extend %vertical-align;
display: inline-block;
float: left;
li {
float: left;
position: relative;
2015-01-15 19:15:54 +01:00
text-transform: uppercase;
2015-01-20 15:34:37 +01:00
a {
font-family: $font-family-header;
display: inline-block;
padding: 0.3rem 0.8rem;
2015-01-15 19:15:54 +01:00
2015-01-20 15:34:37 +01:00
&.active, &:hover {
color: $core-accent;
}
}
2015-01-15 19:15:54 +01:00
&:first-child a {
padding-left: 0;
}
2015-01-21 13:29:23 +01:00
ul {
display: none;
padding: 0;
box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15) !important;
}
2015-01-20 15:34:37 +01:00
2015-01-21 13:29:23 +01:00
ul ul {
left: 100%;
top: 0;
}
2015-01-20 15:34:37 +01:00
2015-01-21 13:29:23 +01:00
&:hover {
& > ul {
display: block;
position: absolute;
background: rgba($white, 0.9);
width: 10rem;
}
2015-01-20 15:34:37 +01:00
2015-01-21 13:29:23 +01:00
li {
float: none;
margin: 0;
padding: 0;
a {
padding: 0.5rem 0.8rem;
display: block;
&:before, &:after {
display: none;
}
}
&.active {
& > a {
background: $core-accent;
color: $white;
}
}
}
}
}
@include breakpoint(desktop-only) {
display: none;
}
}
2015-01-20 15:34:37 +01:00
}
2015-01-21 13:29:23 +01:00
.panel-activation {
@extend %vertical-align;
padding: 1rem;
display: none;
font-size: 1.8rem;
cursor: pointer;
float: right;
@include breakpoint(desktop-only) {
display: inline-block;
2015-01-20 15:34:37 +01:00
}
}
}
}
2015-01-15 19:15:54 +01:00
.header-image {
&.fullwidth {
#body {
padding-left: 0;
padding-right: 0;
>.listing-row {
padding-left: $padding-horiz;
padding-right: $padding-horiz;
}
}
}
.listing-row:last-child {
2015-01-20 15:34:37 +01:00
margin-bottom: 2rem;
2015-01-15 19:15:54 +01:00
}
#body {
.flush-top {
2015-01-20 12:31:35 +01:00
margin-top: - $header-height - $padding-vert - 0.5rem;
2015-01-15 19:15:54 +01:00
padding-top: $header-height + 4rem;
}
}
#breadcrumbs {
2015-01-20 15:34:37 +01:00
margin-top: 1rem;
2015-01-15 19:15:54 +01:00
}
#header {
background-color: rgba($header-text,0);
box-shadow: none;
#logo h3, #logo a {
color: $header-text;
}
a, .menu-btn {
color: $header-text;
}
a:before, a:after {
2015-01-20 15:34:37 +01:00
background-color: rgba($header-text,0.7) !important;
2015-01-15 19:15:54 +01:00
}
#navbar ul.navigation {
ul li a {
color: $core-accent;
&:hover {
color: darken($core-accent, 20%);
}
}
}
}
}
2015-01-26 11:57:05 +01:00
.header-lite {
#body {
padding-top: 12rem;
}
#header {
box-shadow: none;
color: $light-gray;
a, .menu-btn {
color: $light-gray;
}
.search-box {
i {
color: $light-gray;
}
input[type=search] {
&:focus {
background-color: transparentize($light-gray, 0.8);
}
}
}
li.active a {
color: $core-accent;
}
.logo ul.social-icons li {
background: transparentize($light-gray, 0.8);
.fa {
color: white;
}
&:hover {
.fa {
color: $light-gray;
}
}
}
}
}