Skip to content

Commit

Permalink
Standardize blast header component
Browse files Browse the repository at this point in the history
  • Loading branch information
ashley-hebler committed Aug 11, 2019
1 parent e2f2c13 commit c490568
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/scss/6-components/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Styleguide 6.0.0
@import 'ad/ad';
@import 'back-to-top/back-to-top';
@import 'blast-header/blast-header';
@import 'button/button';
@import 'card/card';
@import 'caption/caption';
Expand Down
45 changes: 45 additions & 0 deletions assets/scss/6-components/blast-header/_blast-header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Blast Header (c-blast-header)
//
// Header for Blast product.
//
// Markup: 6-components/blast-header/blast-header.html
//
// Styleguide 6.1.1
$blast-header-height: 18rem;

// Header w/ logos
.c-blast-header {
background-size: cover;
height: $blast-header-height;

&__col {
margin-left: auto;
margin-right: auto;

&--logo {
max-width: px-to-rem(450px);
}

&--title {
max-width: px-to-rem(250px);
align-self: center;

img {
height: px-to-rem(20px);
}
}
}
@supports (display: grid) {
@include mq($from: bp-m) {
&__inner {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: $size-b;
}

&__col {
margin: 0;
}
}
}
}
11 changes: 11 additions & 0 deletions assets/scss/6-components/blast-header/blast-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<header class="c-blast-header l-align-center-children has-bg-black-off has-text-white has-l-btm-marg" style="background-image: url('/img/blast-header/TT-Blast-landing_photo.jpg')">
<div class="c-blast-header__inner l-container l-width-full has-page-padding">
<div class="c-blast-header__col c-blast-header__col--logo has-m-btm-marg">
<a class="l-display-block" href="/theblast/"><img class="l-width-max" src="/img/blast-header/TT-TheBlast-logo_PSvitek.png" alt="The Blast Logo"></a>
</div>
<div class="c-blast-header__col c-blast-header__col--title">
<h1 class="is-hidden-until-bp-m t-size-m has-s-btm-marg">The best political<br>newsletter in Texas.</h1>
<a class="l-display-block" href="/"><img class="l-width-max" src="/img/blast-header/TT-aprojectby-horizontal-white.svg" alt="A project by The Texas Tribune"></a>
</div>
</div>
</header>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/src/img/blast-header/TT-aprojectby-horizontal-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c490568

Please sign in to comment.