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

Feature/dp 13965 change title and h1 #646

Merged
merged 2 commits into from
Jul 11, 2019
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
6 changes: 5 additions & 1 deletion assets/scss/03-organisms/_page-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ $page-header-widget-width: 350px;
&:last-child {
margin-bottom: 0;
}

.ma__page-header__sub-title {
margin-top: .8em;
}
}

.ma__page-banner ~ & &__title {
Expand All @@ -210,7 +214,7 @@ $page-header-widget-width: 350px;
}

// Control font size and line height
// regardless of it's added to page
// regardless of it's added to page
&__sub-title,
&__sub-title * {
font-size: 1.625rem !important;
Expand Down
4 changes: 4 additions & 0 deletions changelogs/DP-13965.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
___DESCRIPTION___
Minor
Added
- (Patternlab) [page-header] DP-13965: MF Change title and H1 on news overflow pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Description
This is a variant of the [Page Header](./?p=organisms-page-header) pattern showing an example of how it is being used on the news overflow page.

### How to generate
* set the `nested` variable to true
* add a `title`, `subTitle`, and `headerTags`
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@
{% include "@atoms/04-headings/comp-heading.twig" %}
</div>
{% endif %}

<h1 class="ma__page-header__title">{% if prefix %}<span class="visually-hidden">{{ prefix }}&nbsp;</span>{% endif %}{{pageHeader.title}}</h1>
{% if pageHeader.subTitle %}
<div class="ma__page-header__sub-title">{{pageHeader.subTitle}}</div>
{% if pageHeader.nested %}
<h1 class="ma__page-header__title">{% if prefix %}<span class="visually-hidden">{{ prefix }}&nbsp;</span>{% endif %}{{pageHeader.title}}
{% if pageHeader.subTitle %}
<div class="ma__page-header__sub-title">{{pageHeader.subTitle}}</div>
{% endif %}
</h1>
{% else %}
<h1 class="ma__page-header__title">{% if prefix %}<span class="visually-hidden">{{ prefix }}&nbsp;</span>{% endif %}{{pageHeader.title}}
</h1>
{% if pageHeader.subTitle %}
<div class="ma__page-header__sub-title">{{pageHeader.subTitle}}</div>
{% endif %}
{% endif %}
{% if pageHeader.optionalContents %}
<div class="ma__page-header__optional-content">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pageHeader": {
"title": "News and Announcements",
"nested": true,
"subTitle": "For <a href=''>Office of Attorney General Maura Healey</a>",
"headerTags": {
"label": "Related to:",
"taxonomyTerms": [{
"href": "#",
"text": "Office of Attorney General Maura Healey"
}]
}
}
}