47 lines
1.3 KiB
Twig
47 lines
1.3 KiB
Twig
{#
|
|
/**
|
|
* @file
|
|
* Default theme implementation to display a one-column layout.
|
|
*
|
|
* Available variables:
|
|
* - content: The content for this layout.
|
|
* - attributes: HTML attributes for the layout <div>.
|
|
*
|
|
* @ingroup themeable
|
|
TODO set a variable for background image so we can use base_path rather than /
|
|
setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image:url(/themes/custom/agarica/patternlibrary/agaric/images/fpo-video-poster.png)')
|
|
{% if is_front %}
|
|
{% set classes = classes|merge(['hero-main', 'is-large']) %}
|
|
{% endif %}
|
|
*/
|
|
#}
|
|
{% if content %}
|
|
|
|
{% set bundle = content['#node'].bundle %}
|
|
{% set classes = [ 'hero', 'hero-' ~ bundle|replace({"_": "-"}) ] %}
|
|
{# expected if statement would start here #}
|
|
{% set classes = classes|merge(['is-dark']) %}
|
|
|
|
{% set has_title_paragraph = false %}
|
|
{% if content.field_body_paragraph %}
|
|
{% for paragraph in content.field_body_paragraph['#items'] %}
|
|
{% if paragraph.entity.type.0.entity.id == 'title' %}
|
|
{% set has_title_paragraph = true %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if not has_title_paragraph %}
|
|
<section{{ attributes.addClass(classes) }}>
|
|
{# Header hero region #}
|
|
<div class="container">
|
|
<div class="titlebar">
|
|
{{ content.title }}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endif %}
|
|
|
|
{{ content.content }}
|
|
|
|
{% endif %}
|