Skip to content

Commit

Permalink
hero banner component
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Knox committed Oct 24, 2017
1 parent fb045e4 commit 7f16174
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
12 changes: 3 additions & 9 deletions css/decanter.css
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ dfn {
.decanter-hero-banner {
padding-top: 3rem;
padding-bottom: 3rem;
background-image: url("../img/hero.png");
background-image: url("../img/hero-banner.png");
background-position: center;
background-size: cover; }
/* line 14, ../scss/components/_hero-banner.scss */
Expand All @@ -1813,7 +1813,7 @@ dfn {

/* line 19, ../scss/components/_hero-banner.scss */
.decanter-hero-banner-callout {
background-color: #b1040e;
background-color: #ffffff;
padding: 3rem; }
@media screen and (min-width: 481px) {
/* line 19, ../scss/components/_hero-banner.scss */
Expand All @@ -1825,15 +1825,9 @@ dfn {
margin-bottom: 3rem; }
/* line 32, ../scss/components/_hero-banner.scss */
.decanter-hero-banner-callout .decanter-button {
font-size: 1.4rem;
margin-top: 7rem;
margin-top: 3rem;
width: 100%; }

/* line 39, ../scss/components/_hero-banner.scss */
.decanter-hero-banner-callout-alt {
color: #ffffff;
display: block; }

/* line 9, ../scss/components/_layout.scss */
.decanter-layout-docs {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion css/decanter.min.css

Large diffs are not rendered by default.

21 changes: 18 additions & 3 deletions examples/components/hero-banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,29 @@
<div class="grid-example">
<div class="decanter-grid">
<h1>Hero Banner</h1>
<h2>Full Width</h2>
</div>
<div class="decanter-grid-full">
<div class="decanter-hero-banner">
<div class="decanter-grid">
<div class="decanter-hero-banner-callout">
<h2><span class="decanter-hero-banner-callout-alt">Hero callout:</span> Call attention to a current priority</h2>
<a class="decanter-hero-banner-link" href="#">Link to more about that priority</a>
<a class="decanter-button decanter-button-big decanter-button-secondary" href="#">Learn about what we do</a>
<h2>Header lorem ipsum dolor</h2>
<a class="decanter-hero-banner-link" href="#">Link sed ut perspiciatis unde omnis iste</a>
<p>Paragraph text lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p>
<a class="decanter-button" href="#">Button link vero eos et</a>
</div>
</div>
</div>
</div>
<div class="decanter-grid">
<h2>12 Column</h2>
<div class="decanter-hero-banner">
<div class="decanter-grid">
<div class="decanter-hero-banner-callout">
<h2>Header lorem ipsum dolor</h2>
<a class="decanter-hero-banner-link" href="#">Link sed ut perspiciatis unde omnis iste</a>
<p>Paragraph text lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p>
<a class="decanter-button" href="#">Button link vero eos et</a>
</div>
</div>
</div>
Expand Down
Binary file added img/hero-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/hero.png
Binary file not shown.
12 changes: 3 additions & 9 deletions scss/components/_hero-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.decanter-hero-banner {
@include padding($site-margins null);

background-image: url("#{$image-path}/hero.png");
background-image: url("#{$image-path}/hero-banner.png");
background-position: center;
background-size: cover;

Expand All @@ -17,7 +17,7 @@
}

.decanter-hero-banner-callout {
background-color: $color-bright-red;
background-color: $color-white;
padding: 3rem;

@include media($small-screen) {
Expand All @@ -30,13 +30,7 @@
}

.decanter-button {
font-size: $small-font-size;
margin-top: 7rem;
margin-top: 3rem;
width: 100%;
}
}

.decanter-hero-banner-callout-alt {
color: $color-white;
display: block;
}

0 comments on commit 7f16174

Please sign in to comment.