Do not print header section when no content meant for it

This commit is contained in:
benjamin melançon 2018-11-12 09:20:23 -05:00
parent 96c9923929
commit 400e817229

View file

@ -45,11 +45,10 @@
{% block header %} {% block header %}
<section{{ header_section_attributes }}>
{# We've moved the header section to the content level for nodes, with an {# We've moved the header section to the content level for nodes, with an
exception for the front page. #} exception for the front page. #}
{% if not node or is_front %} {% if not node or is_front %}
<section{{ header_section_attributes }}>
{% block header_title %} {% block header_title %}
{% if page.header %} {% if page.header %}
{# Header hero region #} {# Header hero region #}
@ -66,6 +65,7 @@
</div> </div>
{% endif %} {% endif %}
{% endblock header_title %} {% endblock header_title %}
</section>
{% endif %} {% endif %}
{% block tabs %} {% block tabs %}
@ -78,7 +78,6 @@
</div> </div>
{% endif %} {% endif %}
{% endblock tabs %} {% endblock tabs %}
</section>
{% endblock header %} {% endblock header %}