You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.4 KiB
58 lines
2.4 KiB
6 years ago
|
{#
|
||
|
/**
|
||
|
* @file
|
||
|
* Magazine+'s theme override for the main slideshow custom block
|
||
|
*
|
||
|
* @see magazineplus_preprocess_field__block_content__mt_main_slideshow_block()
|
||
|
*/
|
||
|
#}
|
||
|
{{ attach_library('magazineplus/collapsible-block') }}
|
||
|
{%
|
||
|
set classes = [
|
||
|
'field',
|
||
|
'field--name-' ~ field_name|clean_class,
|
||
|
'field--type-' ~ field_type|clean_class,
|
||
|
'field--label-' ~ label_display,
|
||
|
'field--mt-collapsible-block',
|
||
|
'clearfix',
|
||
|
]
|
||
|
%}
|
||
|
{%
|
||
|
set title_classes = [
|
||
|
'field__label',
|
||
|
label_display == 'inline' ? 'inline',
|
||
|
]
|
||
|
%}
|
||
|
<div{{ attributes.addClass(classes) }}>
|
||
|
{% if not label_hidden %}
|
||
|
<h3{{ title_attributes.addClass(title_classes) }}>{{ label }}</h3>
|
||
|
{% endif %}
|
||
|
{% if field_mt_cb_trigger_position_value == "top" %}
|
||
|
<div class="collapsible-block__trigger">
|
||
|
<h3>
|
||
|
<a role="button" class="{{ field_mt_cb_trigger_state_value }}" data-toggle="collapse" href="#{{block_data.id}}" aria-expanded="false" aria-controls="{{block_data.id}}">
|
||
|
{{ field_mt_cb_title_value }}
|
||
|
<span class="collapsible-block-icon collapsible-block__expand-icon"><i class="fa {{ field_mt_cb_expand_icon_value }}"><span class="sr-only">{{ field_mt_cb_expand_icon_value }}</span></i></span>
|
||
|
<span class="collapsible-block-icon collapsible-block__collapse-icon"><i class="fa {{ field_mt_cb_collapse_icon_value }}"><span class="sr-only">{{ field_mt_cb_collapse_icon_value }}</span></i></span>
|
||
|
</a>
|
||
|
</h3>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
<div class="collapse {{ field_mt_cb_state_value }}" id="{{block_data.id}}">
|
||
|
{% for item in items %}
|
||
|
{{ item.content }}
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
{% if field_mt_cb_trigger_position_value == "bottom" %}
|
||
|
<div class="collapsible-block__trigger">
|
||
|
<h3>
|
||
|
<a role="button" class="{{ field_mt_cb_trigger_state_value }}" data-toggle="collapse" href="#{{block_data.id}}" aria-expanded="false" aria-controls="{{block_data.id}}">
|
||
|
{{ field_mt_cb_title_value }}
|
||
|
<span class="collapsible-block-icon collapsible-block__expand-icon"><i class="fa {{ field_mt_cb_expand_icon_value }}"><span class="sr-only">{{ field_mt_cb_expand_icon_value }}</span></i></span>
|
||
|
<span class="collapsible-block-icon collapsible-block__collapse-icon"><i class="fa {{ field_mt_cb_collapse_icon_value }}"><span class="sr-only">{{ field_mt_cb_collapse_icon_value }}</span></i></span>
|
||
|
</a>
|
||
|
</h3>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|