Clean up now-working node layout template

This commit is contained in:
benjamin melançon 2018-10-24 18:45:24 -04:00
parent 7084b3ed7c
commit bfe2161ff3

View file

@ -8,8 +8,7 @@
* - attributes: HTML attributes for the layout <div>. * - attributes: HTML attributes for the layout <div>.
* *
* @ingroup themeable * @ingroup themeable
TODO set a variable for background image so we can use base_path rather than / @TODO move to landing page
setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image:url(/themes/custom/agarica/patternlibrary/agaric/images/fpo-video-poster.png)')
{% if is_front %} {% if is_front %}
{% set classes = classes|merge(['hero-main', 'is-large']) %} {% set classes = classes|merge(['hero-main', 'is-large']) %}
{% endif %} {% endif %}
@ -27,7 +26,6 @@
{% if content.field_body_paragraph %} {% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %} {% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
HOLY MOLY THIS HAS TAKEN A WHILE
{% set has_title_paragraph = true %} {% set has_title_paragraph = true %}
{% set title_paragraph_index = i %} {% set title_paragraph_index = i %}
{{ paragraph }} {{ paragraph }}
@ -46,21 +44,13 @@
</section> </section>
{% endif %} {% endif %}
<section{{ attributes.addClass(classes) }}> <section class="section" data-headerbg="light" }}>
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %} {% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if i is not same as(title_paragraph_index) %} {% if i is not same as(title_paragraph_index) %}
{{ paragraph }} {{ paragraph }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{{ content|without('content', 'field_body_paragraph') }} {{ content }}
</section> </section>
SANITY CHECK
{{ content }}
NOPE EVERYTHING IS INSANE OH WELL
{{ content.content }}
{% endif %} {% endif %}