Print special header for front page even if front page is a node
This commit is contained in:
parent
e6cbc3482f
commit
ed32e0afd2
1 changed files with 7 additions and 11 deletions
|
@ -35,25 +35,21 @@
|
|||
{% endif %}
|
||||
{% endblock navbar %}
|
||||
|
||||
{% set header_section_attributes = create_attribute({'class': ['hero', 'is-dark']}) %}
|
||||
{% set header_section_attributes = create_attribute() %}
|
||||
{% if is_front %}
|
||||
{# TODO set a variable for background image so we can use base_path rather than / #}
|
||||
{% set header_section_attributes = header_section_attributes.addClass('hero-main is-large').setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image:url(/themes/custom/agarica/patternlibrary/agaric/images/fpo-video-poster.png)') %}
|
||||
{% endif %}
|
||||
{% if false %}
|
||||
{% set header_section_attributes = header_section_attributes.removeClass('is-dark').setAttribute('data-headerbg', 'light') %}
|
||||
{% endif %}
|
||||
|
||||
{% if node %}
|
||||
{% set header_section_attributes = header_section_attributes.removeClass('hero', 'is-dark', 'hero-main', 'is-large').removeAttribute(['data-headerbg', 'style']) %}
|
||||
{% set header_section_attributes = header_section_attributes.addClass(['hero', 'is-dark', 'hero-main', 'is-large']).setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image:url(/themes/custom/agarica/patternlibrary/agaric/images/fpo-video-poster.png)') %}
|
||||
{% elseif not node %}
|
||||
{% set header_section_attributes = header_section_attributes.addClass(['hero']).setAttribute('data-headerbg', 'light') %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% block header %}
|
||||
<section{{ header_section_attributes }}>
|
||||
|
||||
{# We've moved the header section to the content level for nodes #}
|
||||
{% if not node %}
|
||||
{# We've moved the header section to the content level for nodes, with an
|
||||
exception for the front page. #}
|
||||
{% if not node or is_front %}
|
||||
{% block header_title %}
|
||||
{% if page.header %}
|
||||
{# Header hero region #}
|
||||
|
|
Loading…
Reference in a new issue