MTShop/web/themes/custom/martis/templates/block/block--deals.html.twig

46 lines
1.2 KiB
Twig

{#
/**
* @file
* Theme override to display a block.
*/
#}
{%
set classes = [
'block',
'deals-block',
'block-' ~ configuration.provider|clean_class,
'block-' ~ plugin_id|clean_class,
]
%}
<div{{ attributes.addClass(classes) }} {% if block_style %}style="{{ block_style }}"{% endif %}>
<div class="container-wrap clearfix">
{{ title_prefix }}
{% if label %}
<div class="block-title-wrap clearfix">
<div class="block-title-content">
{% if block_title_style == 'block-title-2' %}
{% if block_subtitle %}<h5 class="block-subtitle">{{ block_subtitle }}</h5>{% endif %}
<h2{{ title_attributes.addClass('block-title') }}>{{ label }}</h2>
{% else %}
<h2{{ title_attributes.addClass('block-title') }}>{{ label }}</h2>
{% if block_subtitle %}<h5 class="block-subtitle">{{ block_subtitle }}</h5>{% endif %}
{% endif %}
</div>
{% if content.field_countdown | render %}
<div class="countdown-wrap clearfix">
{{ content.field_countdown }}
</div>
{% endif %}
</div>
{% endif %}
{{ title_suffix }}
{% block content %}
<div class="block-content deals-layout deals-{{ content.field_deals_layout['#items'].value }}">
{{ content.field_product_block }}
</div>
{% endblock %}
</div>
</div>