Skip to content

Commit

Permalink
Improve/standardize the navigation bar
Browse files Browse the repository at this point in the history
- Give the navigation bar a solid color if there's no jumbotron image
- Add 'jumbotron' FrontMatter spec to allow for pages to specify
  jumbotrons

Blocked by stakx-io/stakx#95
  • Loading branch information
allejo committed Dec 11, 2018
1 parent 6873109 commit c8fb0c9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 20 deletions.
14 changes: 12 additions & 2 deletions layout/_header.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.site-header {
background: scrim-gradient();
position: relative;
background: $color-primary;
width: 100%;
z-index: 1;

a {
text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 0, 0, 0.9);
Expand All @@ -20,3 +21,12 @@
font-size: 1.5em;
}
}

// Only use a fancy gradient when
.page-jumbotron .site-header {
position: absolute;

@include respond-up(lg) {
background: scrim-gradient();
}
}
18 changes: 18 additions & 0 deletions layout/_jumbotron.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.page-jumbotron {
overflow: hidden;
}

.page-jumbotron__image {
height: 300px;
left: 50%;
position: relative;
transform: translateX(-50%);

@include respond-up(md) {
height: 400px;
}

@include respond-up(lg) {
height: 500px;
}
}
10 changes: 7 additions & 3 deletions layout/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $_default-nav-breakpoint: 'lg';

.c-hamburger {
position: absolute;
right: 0;
right: 5px;
top: 0;

@include respond-up($_default-nav-breakpoint) {
Expand Down Expand Up @@ -35,8 +35,6 @@ $_default-nav-breakpoint: 'lg';
li {
@include respond-down($_default-nav-breakpoint) {
border-top: $border-default;
padding-bottom: 10px;
padding-top: 10px;
}

@include respond-up($_default-nav-breakpoint) {
Expand All @@ -52,7 +50,13 @@ $_default-nav-breakpoint: 'lg';

a {
color: $color-text-primary;
display: block;
text-decoration: none;

@include respond-down($_default-nav-breakpoint) {
padding-bottom: 10px;
padding-top: 10px;
}
}
}

Expand Down
13 changes: 0 additions & 13 deletions pages/_index.scss

This file was deleted.

3 changes: 1 addition & 2 deletions styles.scss.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ permalink: /assets/css/styles.css
@import 'layout/footer';
@import 'layout/hamburger';
@import 'layout/header';
@import 'layout/jumbotron';
@import 'layout/navigation';

@import 'components/buttons';
Expand All @@ -38,8 +39,6 @@ permalink: /assets/css/styles.css
@import 'components/theater';
@import 'components/video-player';

@import 'pages/index';

@import 'utilities/border-helpers';
@import 'utilities/os';
@import 'utilities/positioning';
Expand Down

0 comments on commit c8fb0c9

Please sign in to comment.