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

DP -825 board org accordion #842

Merged
merged 9 commits into from
Jun 11, 2018
Merged
Show file tree
Hide file tree
Changes from 4 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
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.
3 changes: 3 additions & 0 deletions changelogs/DP-8825.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Added
Minor
- DP-8825: Adds teaser listing group organism to apply accordion behavior to multiple teaser listings at once.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Description
This Pattern shows a group of multiple General Teaser List patterns.

### Status
* Stable as of TBD

### Pattern Contains
* General Teaser

### JavaScript Used
* Accordion (js/modules/accordions.js)

### Usage Guidelines


### Variables
~~~
teaserListingGroup: {
totalShown:
type: number / required
moreItemsLabel:
type: string / required
lessItemsLabel:
type: string / required
teaserListings: [
type: teaserListing / required
],
more: {
type: link / optional
}
}
~~~
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="ma__teaser-listing-group js-teaser-listing-group" data-total-visible="{{ teaserListingGroup.totalShown }}">
{% block teaserListingGroupItems %}
{% for teaserListing in teaserListingGroup.teaserListings %}
{% include "@organisms/by-author/teaser-listing.twig" %}
{% endfor %}
{% endblock %}

<button
class="ma__teaser-listing-group__toggle ma__content-link ma__content-link--chevron ma__content-link__acordion-toggle js-teaser-listing-group-toggle"
aria-label="{{ teaserListingGroup.moreItemsLabel }}">
<div class="more">{{ teaserListingGroup.moreItemsLabel }}</div>
<div class="less">{{ teaserListingGroup.lessItemsLabel }}</div>
</button>
</div>

Large diffs are not rendered by default.

Loading