Override Bulma block header and add our classes
Ideally Bulma would use attributes in its templates making overriding like this unnecessary. Still need a way to basically configure when different classes get sent in— for instance, for us the header is dark in the campaigns section, but Drupal doesn't even have a concept of campaign 'section' let alone a way to configure and pass in classes or other variables.
This commit is contained in:
parent
3e3b09eecb
commit
012d98d707
1 changed files with 37 additions and 0 deletions
|
@ -34,3 +34,40 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% endblock navbar %}
|
||||
|
||||
{% set header_section_attributes = create_attribute() %}
|
||||
|
||||
{% block header %}
|
||||
<section{{ header_section_attributes.addClass(['hero', 'is-dark']) }}>
|
||||
{% block header_and_search %}
|
||||
{% if page.header or page.header_search %}
|
||||
{# Header hero region + search #}
|
||||
<div class="hero-body is-primary">
|
||||
<div class="container">
|
||||
<div class="columns is-vcentered">
|
||||
<div class="column">
|
||||
{{ page.header }}
|
||||
{% if is_front and site_slogan %}
|
||||
<h1 class="title">{{ site_slogan }}</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
{{ page.header_search }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock header_and_search %}
|
||||
{% block tabs %}
|
||||
{# Drupal tabs #}
|
||||
{% if page.header_tabs %}
|
||||
<div class="hero-footer">
|
||||
<div class="container">
|
||||
{{ page.header_tabs }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock tabs %}
|
||||
</section>
|
||||
{% endblock header %}
|
||||
|
|
Loading…
Reference in a new issue