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 %}
|
{% endif %}
|
||||||
{% endblock navbar %}
|
{% endblock navbar %}
|
||||||
|
|
||||||
{% set header_section_attributes = create_attribute({'class': ['hero', 'is-dark']}) %}
|
{% set header_section_attributes = create_attribute() %}
|
||||||
{% if is_front %}
|
{% if is_front %}
|
||||||
{# TODO set a variable for background image so we can use base_path rather than / #}
|
{# 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)') %}
|
{% 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)') %}
|
||||||
{% endif %}
|
{% elseif not node %}
|
||||||
{% if false %}
|
{% set header_section_attributes = header_section_attributes.addClass(['hero']).setAttribute('data-headerbg', 'light') %}
|
||||||
{% 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']) %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<section{{ header_section_attributes }}>
|
<section{{ header_section_attributes }}>
|
||||||
|
|
||||||
{# We've moved the header section to the content level for nodes #}
|
{# We've moved the header section to the content level for nodes, with an
|
||||||
{% if not node %}
|
exception for the front page. #}
|
||||||
|
{% if not node or is_front %}
|
||||||
{% block header_title %}
|
{% block header_title %}
|
||||||
{% if page.header %}
|
{% if page.header %}
|
||||||
{# Header hero region #}
|
{# Header hero region #}
|
||||||
|
|
Loading…
Reference in a new issue