$masthead-height: 180px; $masthead-image-blur: 1px; $menu-link-background-color-active: rgba(255, 255, 255, 0.3); $menu-link-background-color-hover: rgba(255, 255, 255, 0.15); @mixin masthead-background-containers() { position: absolute; left: 0; right: 0; display: block; width: auto; height: inherit; } @mixin masthead-navigation-menu() { border: 0; border-radius: 0; ul.nav.navbar-nav { > li { text-transform: uppercase; a { color: $gray-lighter; letter-spacing: 1.2px; } } a:hover { background-color: $menu-link-background-color-hover; } > .active > a { background-color: $menu-link-background-color-active; color: $white; } .dropdown-menu { text-transform: none; > li a { color: $black; &:hover { background-color: $gray-lighter; } } } } // Curated Features menu link when it has dropdown menu .navbar-nav > .open > a, .navbar-nav > .open > a:hover, .navbar-nav > .open > a:focus { background-color: $menu-link-background-color-hover; } } #exhibit-masthead, #exhibit-navbar { z-index: 1; } #exhibit-navbar { z-index: 100; &.page-masthead { @include masthead-navigation-menu(); background-color: rgba(0, 0, 0, 0.5); border-bottom: 1px solid $gray; margin-bottom: 0; margin-top: 0; .navbar-nav { float: right; } .navbar-brand, .navbar-nav li { color: $gray-lighter; &.active a { color: $gray; } a { color: $gray-lighter; } } } .navbar-form { text-align: right; } } #exhibit-masthead.with-image + #exhibit-navbar.navbar-default { @include masthead-navigation-menu(); background-color: rgba(0, 0, 0, 0.2); border-top: 1px solid $gray; } .navbar + .navbar { margin-top: 0; } #header-navbar { margin-bottom: 0; } #exhibit-masthead { height: $masthead-height; margin-bottom: -50px; padding: 0; position: static; & > .container { position: relative; top: 33%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } &.with-page-masthead { margin-bottom: $padding-base-vertical; margin-top: -51px; > .container { top: 60%; } .navbar-brand { font-size: $font-size-large; text-shadow: 1px 1px 0 $black; } .search-title { text-align: center; small { text-transform: uppercase; } } } .site-title { font-size: 30px; } small { display: block; padding-top: $padding-base-vertical; @extend .hidden-xs; } &.with-image { .site-title, .search-title { color: $white; text-shadow: 1px 1px 0 $black; } small { color: $white; } .more-exhibits { a { color: $gray-lighter; background: rgba(0, 0, 0, 0.4); border-top-left-radius: $border-radius-base; border-top-right-radius: $border-radius-base; } a:hover, a:focus, a:active { background: rgba(0, 0, 0, 0.6); } .dropdown-menu a { background: none; color: $gray; &:hover, &:focus, &:active { background-color: $gray-lighter; } } } } .more-exhibits { @extend .navbar-right; } &.with-page-masthead { .site-title { margin-top: $padding-large-vertical * 3; } .more-exhibits { @extend .navbar-left; padding-top: $padding-base-vertical; .dropdown-menu { left: 0; right: auto; } } } // This is to add a background image to the masthead, in a way that // enables the site title and subtitle text to be visible above it. .background-container { @include masthead-background-containers(); background-repeat: no-repeat; background-size: cover; // Add small amount of blur to help text stand out //filter: url(masthead/blur.svg#blur); // for older versions of FF -webkit-filter: blur($masthead-image-blur); filter: blur($masthead-image-blur); // Shift image slightly to hide blurred edge of image margin-left: -$masthead-image-blur; margin-top: -$masthead-image-blur; overflow: hidden; // Add right border to image to hide lighter blurred edge border-right: 1px solid $black; } // Include gradient to improve text legibility, // especially on light background images. .background-container-gradient { @include masthead-background-containers(); background: linear-gradient( rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5) ); } } // Margin between bottom of masthead and start of page content. // Need to apply bottom margin to different element, depending on // whether it is a regular masthead or a browse category masthead #exhibit-masthead + #exhibit-navbar, #exhibit-navbar + #exhibit-masthead { margin-bottom: $padding-large-vertical * 2.5; } .col-md-4 { .submit-search-text { // hide 'search' label // copied from .sr-only, sadly can't seem to use @extend in a media // query like this, have to copy. border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; } .glyphicon-search { line-height: $line-height-computed; } }