1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-11-02 00:05:37 +01:00
site/_src/_assets/styles/bigchain/_menus.scss

390 lines
7.3 KiB
SCSS
Raw Normal View History

2016-01-07 20:15:09 +01:00
.menu {
position: relative;
z-index: 10;
width: 100%;
align-self: flex-start;
text-align: left;
2016-01-07 20:15:09 +01:00
}
.menu__link {
display: inline-block;
padding: $spacer ($spacer / 2);
2016-01-30 13:34:11 +01:00
box-shadow: none;
position: relative;
line-height: 1;
&:first-child {
padding-left: 0;
}
2016-01-21 12:08:23 +01:00
@media ($screen-md) {
&,
&:first-child {
padding: ($spacer * 2) $spacer;
}
2016-01-21 12:08:23 +01:00
}
// link line
&:after {
2017-05-31 00:22:14 +02:00
content: '';
position: absolute;
height: 2px;
width: 30px;
background: #fff;
display: block;
left: 50%;
margin-left: -15px;
bottom: ($spacer / 2);
// hidden by default
transform: scale(0);
transform-origin: center;
transition: transform .2s ease-out;
@media ($screen-md) {
2017-04-12 19:08:58 +02:00
bottom: $spacer * 1.3;
}
}
&:hover,
&:focus,
&.active {
2016-01-30 13:34:11 +01:00
background: transparent;
// show link line
&:after { transform: scale(1); }
}
2016-01-07 20:15:09 +01:00
}
.menu__logo {
display: inline-block;
2016-01-30 13:34:11 +01:00
box-shadow: none;
padding-top: $spacer;
@media ($screen-md) {
padding-top: 0;
vertical-align: middle;
}
2016-01-10 02:11:27 +01:00
svg {
@extend .transition;
opacity: .8;
display: inline;
2017-03-02 13:26:00 +01:00
@media ($screen-md) {
display: inline-block;
}
2016-01-10 02:11:27 +01:00
}
2016-01-30 13:34:11 +01:00
&:hover,
&:focus {
background: transparent;
svg { opacity: 1; }
2016-01-10 02:11:27 +01:00
}
}
2017-03-02 13:26:00 +01:00
.menu__hiring {
@extend .small;
color: $brand-main-green;
2017-03-02 13:26:00 +01:00
box-shadow: none;
padding: $spacer ($spacer / 4);
display: inline-block;
float: right;
2017-03-02 13:26:00 +01:00
@media ($screen-md) {
margin-left: $spacer;
float: none;
2017-03-02 13:26:00 +01:00
}
&:hover,
&:focus {
background: transparent;
color: $link-hover-bg;
.icon {
stroke: $link-hover-bg;
}
}
.icon {
@extend .transition;
width: $font-size-sm;
height: $font-size-sm;
stroke: $brand-main-green;
2017-03-02 13:26:00 +01:00
stroke-width: 1.5;
margin-bottom: -1px;
}
}
//
// Main menu overlaying a dark background image
// in front page hero or page headers
//
2016-01-07 20:15:09 +01:00
.menu--main {
background: rgba($brand-main-blue-dark, .35);
backdrop-filter: saturate(150%) blur(10px);
border-bottom: 1px solid rgba($brand-main-gray, .5);
padding-top: ($spacer / 2);
padding-bottom: ($spacer / 2);
.menu__logo {
margin-bottom: ($spacer / 2);
@media ($screen-md) {
margin-bottom: 0;
}
}
.menu__link {
color: #fff;
opacity: .9;
2016-01-07 20:15:09 +01:00
&:hover,
2016-01-14 12:28:02 +01:00
&:focus,
&.active {
opacity: 1;
}
}
@media ($screen-md) {
padding-top: 0;
padding-bottom: 0;
}
2016-01-07 20:15:09 +01:00
}
.menu-overflow {
// yummy scrolling
white-space: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-left: -$gutter-space / 2;
margin-right: -$gutter-space / 2;
padding-left: $gutter-space / 2;
padding-right: $gutter-space / 2;
text-align: center;
&::-webkit-scrollbar { display: none; }
@media ($screen-md) {
margin: 0;
padding: 0;
white-space: normal;
overflow: visible;
text-align: right;
}
}
//
// Footer Menu
//
2016-01-07 20:15:09 +01:00
.menu--footer {
2016-02-14 02:16:02 +01:00
.grid__col {
&:nth-child(2) {
margin-top: $spacer;
2016-01-21 12:08:23 +01:00
2016-02-14 02:16:02 +01:00
@media ($screen-sm) {
margin-top: 0;
}
2016-01-30 14:28:19 +01:00
}
2016-01-21 12:08:23 +01:00
}
2016-02-14 02:16:02 +01:00
.menu__logo {
margin-top: ($spacer / 3);
margin-bottom: 0;
svg {
@media ($screen-sm) {
margin: 0;
}
}
}
2016-01-14 16:01:45 +01:00
.menu__link {
@extend .small;
padding: ($spacer / 2) ($spacer / 4);
color: $text-color;
2016-02-14 02:16:02 +01:00
@media ($screen-sm) {
display: block;
text-align: left;
padding: ($spacer / 2);
}
2016-02-14 02:16:02 +01:00
// hide link line
&:after { display: none; }
&:hover,
&:focus,
2016-01-30 14:28:19 +01:00
&.active { color: $brand-primary; }
2016-01-14 16:01:45 +01:00
}
2016-02-14 15:06:01 +01:00
}
2016-02-14 02:16:02 +01:00
2016-02-14 15:06:01 +01:00
.footer__copyright {
border-top: 1px solid $brand-main-gray;
2016-02-14 15:06:01 +01:00
text-align: center;
display: block;
2016-11-25 11:56:35 +01:00
margin-top: ($spacer * 2);
padding-top: ($spacer * 2);
2016-02-14 02:16:02 +01:00
2016-11-25 11:56:35 +01:00
@media ($screen-md) {
padding-bottom: $spacer * 2;
2016-02-14 15:06:01 +01:00
text-align: left;
2016-11-25 11:56:35 +01:00
display: flex;
align-items: center;
justify-content: space-between;
2016-02-14 15:06:01 +01:00
}
2016-02-14 02:16:02 +01:00
2016-02-14 15:06:01 +01:00
.menu__link {
display: inline-block;
text-transform: none;
2016-11-25 11:56:35 +01:00
@media ($screen-md) {
padding: 0 $spacer;
}
2016-02-14 15:06:01 +01:00
&:first-child { margin-left: ($spacer / 2); }
2016-02-14 15:06:01 +01:00
&:last-child { padding-right: 0; }
}
&,
2016-11-25 11:56:35 +01:00
small,
2016-02-14 15:06:01 +01:00
.menu__link {
@extend .mini;
color: $gray-light;
2016-02-14 02:16:02 +01:00
}
2016-01-07 20:15:09 +01:00
}
2016-11-25 11:56:35 +01:00
//
// ERDF logo
//
.erdf {
display: block;
margin-top: $spacer * 2;
margin-bottom: $spacer;
box-shadow: none;
text-align: center;
@media ($screen-md) {
margin: 0;
}
&:hover,
&:focus {
background: none;
.logo-erdf {
fill: $brand-main-green;
}
}
}
.logo-erdf {
@extend .transition;
fill: $gray-light;
2016-12-07 11:42:34 +01:00
width: 122px;
2016-11-25 11:56:35 +01:00
height: 30px;
display: inline-block;
}
2017-03-28 14:22:01 +02:00
2017-06-27 20:39:49 +02:00
//
// On-page sub menu
//
2017-03-28 14:22:01 +02:00
.menu--sub {
2017-06-27 13:21:53 +02:00
@include transition;
2017-06-27 20:39:49 +02:00
transform: translate3d(0, 0, 0);
background: lighten($gray, 30%);
2017-06-27 13:21:53 +02:00
2017-06-27 20:39:49 +02:00
.menu__link {
2017-06-27 13:21:53 +02:00
color: $gray-dark;
2017-06-27 20:39:49 +02:00
margin-left: $spacer;
margin-right: $spacer;
2017-06-27 13:21:53 +02:00
&:after {
background: darken($gray-dark, 10%);
}
&.active {
color: darken($gray-dark, 10%);
}
}
.menu-overflow {
text-align: center;
}
2017-03-28 14:22:01 +02:00
.icon {
width: 1rem;
height: 1rem;
vertical-align: baseline;
margin-right: $spacer / 6;
margin-bottom: -2px;
2017-06-27 20:39:49 +02:00
stroke-width: 4px; // that's weird
2017-06-27 13:21:53 +02:00
color: $gray;
2017-06-27 20:39:49 +02:00
stroke: $gray-dark;
}
.number {
text-align: center;
display: inline-block;
width: 1rem;
height: 1rem;
border-radius: 50%;
font-size: $font-size-xs;
vertical-align: .1rem;
background: $gray;
color: $gray-light;
font-weight: $font-weight-bold;
line-height: 1rem;
margin-right: .2rem;
margin-left: -1.2rem;
}
&.sticky {
background: rgba(lighten($gray, 30%), .85);
backdrop-filter: saturate(200%) blur(10px);
box-shadow: 0 2px 6px rgba($gray-dark, .4);
// fake less padding and smaller menu bar
// for performant and smoooth transition
transform: translate3d(0, -2rem, 0);
.menu__link {
@media ($screen-sm) {
transform: scale(.85) translate3d(0, .6rem, 0);
transform-origin: bottom;
}
&.active {
color: $headings-color;
.number {
background: $headings-color;
color: $gray;
}
&:after {
background: $headings-color;
}
}
}
}
}
//
// Sticky sub menu
//
body {
position: relative;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
z-index: 2;
@supports (position: sticky) {
position: sticky;
2017-03-28 14:22:01 +02:00
}
}