Skip to content

Commit

Permalink
feat: large page header (#132)
Browse files Browse the repository at this point in the history
* new: large version of the page header

* large header responsive styles

Co-authored-by: Nathan Rogan <nathan.rogan@wmca.org.uk>
  • Loading branch information
rolorogan and nathan-rogan committed Apr 29, 2021
1 parent 95f44b4 commit e7eaf0f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/wmcads/assets/sass/wmcads-grid/_grid-cols.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ textarea,
.wmcads-grid {
display: flex;
width: 100%;
letter-spacing: -0.31em;
text-rendering: optimizespeed;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
Expand Down
1 change: 0 additions & 1 deletion src/wmcads/assets/sass/wmcads-grid/_wmcads-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ textarea,
[class*="wmcads-col-"] {
display: inline-block;
zoom: 1;
letter-spacing: normal;
word-spacing: normal;
text-rendering: auto;
vertical-align: top;
Expand Down
2 changes: 1 addition & 1 deletion src/wmcads/components/page-header/_page-header.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% set text = params.text if params.text else "Page header" %}
{% set iconName = params.icon if params.icon else "" %}

<div class="wmcads-page-header {% if(params.home) %} wmcads-page-header__home {% endif %} {% if(params.topm) %} wmcads-m-t-md {% endif %}" style="background-image:url('https://www.wmca.org.uk/media/3415/wmca-bournville-131.jpg?anchor=center&mode=crop&width=2500&height=800&rnd=132122595620000000')">
<div class="wmcads-page-header {% if(params.home) %} wmcads-page-header__home {% endif %} {% if(params.topm) %} wmcads-m-t-md {% endif %} {% if(params.large) %} wmcads-page-header__large {% endif %}" style="background-image:url('https://www.wmca.org.uk/media/3415/wmca-bournville-131.jpg?anchor=center&mode=crop&width=2500&height=800&rnd=132122595620000000')">
{% if(params.title) %}
<div class="wmcads-container wmcads-page-header-container">
<div class="wmcads-page-header-box">
Expand Down
7 changes: 7 additions & 0 deletions src/wmcads/components/page-header/_page-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
}
}

&__large {
height: 600px;
@media screen and (max-width: $breakpoint-md) {
height: 300px;
}
}

img {
display: block;
width: 100%;
Expand Down
10 changes: 10 additions & 0 deletions src/www/pages/components/page-header/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
})
])
}}
<h2>Plain Header - Large</h2>
<p>Where a larger page header is needed you can use the following which will modify the height to 600px.</p>
{{
compExample([
wmcadsPageHeader({
title: false,
large: true
})
])
}}
<h2>Homepage Header</h2>
{{
compExample([
Expand Down

0 comments on commit e7eaf0f

Please sign in to comment.