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

337 lines
8.1 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: 10000;
2015-01-20 15:34:37 +01:00
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
.fixed {
background: #fff;
padding-left: 14rem;
padding-right: 14rem;
position: fixed;
top: 0;
left: 0;
width: 100%;
2016-12-08 21:34:56 +01:00
opacity: 0.9;
box-shadow: 0 0px 20px 0px rgba(0,0,0,0.2);
2016-12-10 09:07:17 +01:00
@include breakpoint(mobile-only) {
padding-left: 10px;
padding-right: 10px;
}
}
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;
2015-01-20 15:34:37 +01:00
}
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
2016-12-10 09:07:17 +01:00
@include breakpoint(desktop-only) {
text-align: right;
position: absolute;
right: 10px;
top: 50%;
@include transform(translateY(1rem));
2015-01-21 13:29:23 +01:00
i {
left: 0.6rem;
}
input[type=search] {
2016-12-10 09:07:17 +01:00
padding-right: 2rem;
2015-01-21 13:29:23 +01:00
&:focus {
width: 8rem;
}
}
}
2015-01-20 15:34:37 +01:00
}
2016-12-10 09:07:17 +01:00
.fixed {
.search-box {
@include breakpoint(desktop-only) {
top: 50%;
@include transform(translateY(-50%));
}
}
.panel-activation {
@include breakpoint(desktop-only) {
top: 50% !important;
@include transform(translateY(-50%) !important);
}
}
}
2015-01-20 15:34:37 +01:00
#navbar {
font-size: $core-font-size + 0.1rem;
2016-12-10 09:07:17 +01:00
@include breakpoint(mobile-only) {
margin-left: -1rem;
margin-right: -1rem;
&.fixed {
margin: 0;
}
}
2015-01-20 15:34:37 +01:00
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;
2016-12-10 09:07:17 +01:00
position: absolute;
left: 0;
top: 50%;
@include transform(translateY(0));
2015-01-20 15:34:37 +01:00
}
}
}
}
2015-01-15 19:15:54 +01:00
.modular.header-image #header .fixed {
background: #666;
2016-12-10 09:07:17 +01:00
@include transition(background 0.3s ease-in-out);
}
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;
text-shadow: 1px 1px 3px #656161;
2015-01-15 19:15:54 +01:00
&: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;
}
}
}
}
2016-12-10 09:07:17 +01:00
}