Skip to content
This repository has been archived by the owner on Jun 26, 2018. It is now read-only.

Commit

Permalink
Merge pull request #847 from massgov/release-5.25.0
Browse files Browse the repository at this point in the history
Release 5.25.0
  • Loading branch information
mrossi113 authored May 23, 2018
2 parents d18569b + 497a15a commit a4616ac
Show file tree
Hide file tree
Showing 123 changed files with 244 additions and 129 deletions.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
**For example**
- DP-1234: The short description text on a [service detail](http://mayflower.digital.mass.gov/?p=pages-detail-for-service-howto-location) page banner ([@organisms/by-template/page-banner](http://mayflower.digital.mass.gov/?p=organisms-page-banner)) should now render ([PR #493](https://github.com/massgov/mayflower/pull/493))

## 5.25.0 (5/23/2018)

### Changed
- DP-8631: Provides twig blocks to support overrides and template mapping of data.
- DP-8854: Update the footer template to match the one in Drupal.
- DP-8949: Mayflower Subpatterns for General Teaser.

### Fixed
- DP-9057 - Fix IE11 bug where featured image in mosaic was not appearing.

## 5.24.0 (5/16/2018)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion styleguide/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@massds/mayflower",
"description": "Open source UI components and visual style guide for Massachusetts government websites",
"version": "5.24.0",
"version": "5.25.0",
"author": "Massachusetts Digital Services (MDS)",
"repository": {
"type": "git",
Expand Down
14 changes: 14 additions & 0 deletions styleguide/source/_meta/_01-foot.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@

<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: '{{ languages }}', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
document.querySelector('#google_translate_element') !== null ? document.querySelector('#google_translate_element').classList.add('has-rendered') : '';
}
(function() {
var script = document.createElement('script');
script.src = "//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";
script.async = true;
element = document.getElementsByTagName('head')[0];
element.appendChild(script);
})();
</script>

<!--DO NOT REMOVE-->
{{ patternLabFoot | raw }}
<script>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"emphasizedText": [
"An emphasized text field",
"Another emphasized text field"
]
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Description
Emphasized Text field in block wrapper for the [General Teaser](/?p=molecules-general-teaser)

### Status
* Stable as of TBA

### Variables
~~~
generalTeaser : {
eyebrow:
type: string / optional
}
~~~
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="ma__general-teaser__emph-text-wrapper">
{% for item in emphasizedText %}
<span class="ma__general-teaser__emph-text">
{{ item }}
</span>
{% endfor %}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eyebrow": "Eyebrow"
}
14 changes: 14 additions & 0 deletions styleguide/source/_patterns/02-molecules/general-teaser-eyebrow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Description
Eyebrow field in block wrapper for the [General Teaser](/?p=molecules-general-teaser)

### Status
* Stable as of TBA

### Variables
~~~
generalTeaser : {
emphasizedText: [
type: array of string / optional,
],
}
~~~
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="ma__general-teaser__eyebrow">
<span>{{ eyebrow }}</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"level": "",
"title" : {
"href": "#",
"text": "Link field for a title or name",
"info": "",
"property": ""
}
}
20 changes: 20 additions & 0 deletions styleguide/source/_patterns/02-molecules/general-teaser-title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Description
Title field in block wrapper for the [General Teaser](/?p=molecules-general-teaser)

### Status
* Stable as of TBA

### Pattern Contains
* Decorative Link


### Variables
~~~
generalTeaser : {
title : {
type: decorativeLink / required
},
level:
type: number / optional
}
~~~
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% set headingLevel = level ? : 2 %}
<h{{ headingLevel }} class="ma__general-teaser__title">
{% if title.href %}
{% set decorativeLink = title %}
{% include "@atoms/decorative-link.twig" %}
{% else %}
{{ title.text }}
{% endif %}
</h{{ headingLevel }}>
6 changes: 5 additions & 1 deletion styleguide/source/_patterns/02-molecules/general-teaser.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ If a teaser image is provided, it will link to the title's href, if set.
* Decorative Link
* Image
* Rich Text
* [General Teaser Title](/?p=molecules-general-teaser-title)
* [General Teaser Eyebrow](/?p=molecules-general-teaser-eyebrow)
* [General Teaser Emphasized Text ](/?p=molecules-general-teaser-emphasizedText)


### Variables
~~~
Expand All @@ -21,7 +25,7 @@ generalTeaser : {
type: string / optional
image:
type: image / optional
eyebrow:
eyebrow:
type: string / optional
title : {
type: decorativeLink / required
Expand Down
80 changes: 44 additions & 36 deletions styleguide/source/_patterns/02-molecules/general-teaser.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,79 @@
{% set layout = generalTeaser.layout ?: 'side-by-side' %}

<section class="ma__general-teaser {{ imageClass }} {{ layout }}">
{% if generalTeaser.image %}
{% if generalTeaser.title.href %}
<a
{% block teaserImage %}
{% if generalTeaser.image %}

{% if generalTeaser.title.href %}
<a
class="ma__general-teaser__image-wrapper"
href="{{ generalTeaser.title.href }}"
title="{{ generalTeaser.title.text }}">
{% else %}
<span class="ma__general-teaser__image-wrapper">
{% endif %}
{% set image = generalTeaser.image %}
{% include "@atoms/09-media/image.twig" %}
{% if generalTeaser.title.href %}
</a>
{% else %}
</span>
{% else %}
<span class="ma__general-teaser__image-wrapper">
{% endif %}

{% set image = generalTeaser.image %}
{% include "@atoms/09-media/image.twig" %}

{% if generalTeaser.title.href %}
</a>
{% else %}
</span>
{% endif %}

{% endif %}
{% endif %}
{% endblock %}

{% if layout == 'inline-image' %}
<div class="ma__general-teaser__header">
{% else %}
<div class="ma__general-teaser__details">
{% endif %}

{% block eyebrow %}
{% if generalTeaser.eyebrow %}
<div class="ma__general-teaser__eyebrow">
<span>{{ generalTeaser.eyebrow }}</span>
</div>
{% set eyebrow = generalTeaser.eyebrow %}
{% include "@molecules/general-teaser-eyebrow.twig" %}
{% endif %}
{% endblock %}

{% block title %}
{% if generalTeaser.title.text %}
{% set title = generalTeaser.title %}
{% set headingLevel = generalTeaser.level ? : 2 %}
<h{{ headingLevel }} class="ma__general-teaser__title">
{% if generalTeaser.title.href %}
{% set decorativeLink = generalTeaser.title %}
{% include "@atoms/decorative-link.twig" %}
{% else %}
{{ generalTeaser.title.text }}
{% endif %}
</h{{ headingLevel }}>
{% include "@molecules/general-teaser-title.twig" %}
{% endif %}
{% endblock %}

{% block emphasizedText %}
{% if generalTeaser.emphasizedText %}
<div class="ma__general-teaser__emph-text-wrapper">
{% for emphasizedText in generalTeaser.emphasizedText %}
<span class="ma__general-teaser__emph-text">
{{ emphasizedText }}
</span>
{% endfor %}
</div>
{% endif %}
{% if layout == 'inline-image' %}
</div><!-- end ma__general-teaser__header -->
<div class="ma__general-teaser__details">
{% set emphasizedText = generalTeaser.emphasizedText %}
{% include "@molecules/general-teaser-emphasizedText.twig" %}
{% endif %}
{% endblock %}

{% if layout == 'inline-image' %}
</div><!-- end ma__general-teaser__header -->
<div class="ma__general-teaser__details">
{% endif %}

{% if generalTeaser.contents and layout != 'contents-stacked' %}
<div class="ma__general-teaser__contents">
{% for content in generalTeaser.contents %}
{% include content.path with content.data %}
{% endfor %}
</div>
{% endif %}
</div>

</div><!-- ma__general-teaser__details -->

{% if generalTeaser.contents and layout == 'contents-stacked' %}
<div class="ma__general-teaser__contents">
{% for content in generalTeaser.contents %}
{% include content.path with content.data %}
{% endfor %}
</div>
{% endif %}

</section>
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
{% endif %}
{% if teaserListing.description %}
<div class="ma__teaser-listing__description">
{% set paragraph = teaserListing.description %}
{% include "@atoms/11-text/paragraph.twig" %}
{% set paragraph = teaserListing.description %}
{% include "@atoms/11-text/paragraph.twig" %}
</div>
{% endif %}
{% if teaserListing.featuredItems %}
Expand All @@ -31,46 +31,48 @@
{% endfor %}
</div>
{% endif %}
{% if teaserListing.items %}
{% if teaserListing.expandable %}
<ul class="ma__teaser-listing__items {{ columnClass }}">
{% for generalTeaser in teaserListing.items[:shownNumber] %}
{% block teaserListItem %}
<li class="ma__teaser-listing__item">
{% set generalTeaser = generalTeaser|merge({"level":teaserHeading}) %}
{% include "@molecules/general-teaser.twig" %}
</li>
{% endblock %}
{% endfor %}
</ul>
{% if teaserListing.items|length > shownNumber %}
<div class="ma__teaser-listing__extra js-accordion-content">
<ul class="ma__teaser-listing__items {{columnClass}}">
{% for generalTeaser in teaserListing.items[shownNumber:last] %}
{% block teaserListingItems %}
{% if teaserListing.items %}
{% if teaserListing.expandable %}
<ul class="ma__teaser-listing__items {{ columnClass }}">
{% for generalTeaser in teaserListing.items[:shownNumber] %}
{% block teaserListItem %}
<li class="ma__teaser-listing__item">
{% set generalTeaser = generalTeaser|merge({"level":teaserHeading}) %}
{% include "@molecules/general-teaser.twig" %}
</li>
{% endblock %}
{% endfor %}
</ul>
{% if teaserListing.items|length > shownNumber %}
<div class="ma__teaser-listing__extra js-accordion-content">
<ul class="ma__teaser-listing__items {{columnClass}}">
{% for generalTeaser in teaserListing.items[shownNumber:last] %}
{{ block('teaserListItem') }}
{% endfor %}
</ul>
</div>
<button
class="ma__content-link ma__content-link--chevron ma__content-link__acordion-toggle js-accordion-link"
aria-label="{{ teaserListing.moreItemsLabel }}">
<span class="more">{{teaserListing.moreItemsLabel}}</span>
<span class="less">{{teaserListing.lessItemsLabel}}</span>
</button>
{% endif %}
{% else %}
<ul class="ma__teaser-listing__items {{ columnClass }}">
{% for generalTeaser in teaserListing.items %}
{{ block('teaserListItem') }}
{% endfor %}
</ul>
</div>
<button
class="ma__content-link ma__content-link--chevron ma__content-link__acordion-toggle js-accordion-link"
aria-label="{{ teaserListing.moreItemsLabel }}">
<span class="more">{{teaserListing.moreItemsLabel}}</span>
<span class="less">{{teaserListing.lessItemsLabel}}</span>
</button>
</ul>
{% endif %}
{% else %}
<ul class="ma__teaser-listing__items {{ columnClass }}">
{% for generalTeaser in teaserListing.items %}
{{ block('teaserListItem') }}
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endblock %}
{% if teaserListing.more %}
<div class="ma__teaser-listing__more">
{% set link = teaserListing.more %}
{% include "@atoms/11-text/link.twig" %}
</div>
{% endif %}
</div>
</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ This is a site wide footer.
* Floating Action
* Footer Links
* Social Links

### JavaScript Used
* This pattern includes JavaScript to generate the Google translate dropdown.
* Privacy Policy

### Variables
~~~
Expand All @@ -25,4 +23,8 @@ footerLinks: {
socialLinks {
type: socialLinks / required
}
privacyPolicy {
type: privacyPolicy / required
}
~~~
Loading

0 comments on commit a4616ac

Please sign in to comment.