{% macro render(content, cms) %} {% set mediaClass = '' %} {% set squircleClass = '' %} {% set contentPullClass = '' %} {% set squircleBgColour = '' %} {% set fontColour = '' %} {% set clockColour = '' %} {% if content.image %} {% set mediaClass = 'coop-c-hero--media' %} {% endif %} {% if content.contentPull %} {% set contentPullClass = 'coop-c-hero--pull' %} {% endif %} {% if content.showSquircle == true %} {% set squircleClass = 'coop-c-hero--squircle' %} {% endif %} {% if content.background and content.background.class %} {% set squircleBgColour = content.background.class %} {% endif %} {% if content.background and content.background.fontColour %} {% set fontColour = content.background.fontColour %} {% endif %} {% if content.background and content.background.clockColour %} {% set clockColour = content.background.clockColour %} {% endif %}
{% if content.heading %} {# Conditionally enable mega heading #}

{{ content.heading }}

{% endif %} {% if content.image %} {% with image = cms.get_asset(content.image.sys.id) %} {% if image.data.fields.description %} {% set altText = image.data.fields.description %} {% else %} {% set altText = image.data.fields.title %} {% endif %}
{%- set imageType = image.fields.file.contentType.split('/')[1] -%} {%- if imageType == 'jpeg' -%} {%- set imageType = 'jpg' -%} {%- endif -%} {{ altText }}
{% endwith %} {% endif %}
{% if content.bodyText %} {{ content.bodyText | markdown }} {% endif %} {% if content.disclaimer %}
{{ content.disclaimer | markdown }}
{% endif %} {% if content.link or content.secondaryLink %} {% endif %} {%- if content.endDate -%}

Until {{globals.iso_to_design_manual_date(content.endDate)}}

{%- endif -%}
{% if content.showSquircle == true %} {% endif %}
{% endmacro %}