Well all the action is in Bulma so let's override that

This commit is contained in:
benjamin melançon 2018-12-31 23:19:07 -05:00
parent 087c21c1df
commit 7e05e7354f

View file

@ -1,10 +1,50 @@
{% extends '@bulma/block/block.html.twig' %}
{% set view_mode = configuration['view_mode'] ?? null %}
{% if view_mode is same as ('columnar') %}
{% extends "@stable/block/block.html.twig" %}
{# Child templates can override the default classes. #}
{%
set classes = classes ?? [
'block',
'block-' ~ configuration.provider|clean_class,
'block-' ~ plugin_id|clean_class,
'clearfix',
]
%}
{# Footer blocks display in columns. #}
{% if region == 'footer' %}
{%
set classes = [
'column'
set classes = classes|merge([
'column',
'is-narrow',
])
%}
{% endif %}
{% if block_panel_style %}
{% set classes = classes|merge(['panel']) %}
{%
set title_classes = title_classes ?? []
%}
{%
set title_classes = title_classes|merge([
'panel-heading',
])
%}
{% elseif not title_classes %}
{%
set title_classes = [
'subtitle',
'is-4',
'is-uppercase'
]
%}
{% set attributes = attributes.addClass(classes) %}
{% endif %}
{% set attributes = attributes.addClass(classes) %}
{% set title_attributes = title_attributes.addClass(title_classes) %}
{# Override the content block to conditionally add a panel wrapper. #}
{% block content %}
{% if block_panel_style %}
<div class="panel-block">
{% endif %}
{{ content }}
{% if block_panel_style %}
</div>
{% endif %}
{% endblock %}