Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: large page header #132

Merged
merged 2 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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