{% import '/shared-component--editorialcard/src/editorialCard.html' as editorialCard %} {% macro render(content, cms, config='') %} {%- set backgroundColour = '' -%} {%- if content.background and content.background.class -%} {%- set backgroundColour = content.background.class -%} {%- endif -%} {% if content.heading %} {% set contentParent = content.heading %} {% else %} {% set contentParent = content.name %} {% endif %} {% set isHorizontal = false %} {% if content.editorialCards %} {% if content.editorialCards|length == 1 %} {% set editorialCardClass = 'coop-l-grid__item--small-12 coop-l-grid__item--medium-12' %} {% set isHorizontal = true %} {% elif content.editorialCards|length == 2 %} {% set editorialCardClass = 'coop-l-grid__item--small-6 coop-l-grid__item--medium-6' %} {% else %} {% set editorialCardClass = 'coop-l-grid__item--small-4 coop-l-grid__item--medium-4' %} {% endif %} {% endif %} {% endmacro %}