{% if page.header.type == 'default' %} {% capture header_type %}overlay{% endcapture %} {% capture overlay_title %}true{% endcapture %} {% capture overlay_text %}{{ page.header.description }}{% endcapture %} {% capture overlay_actions %}false{% endcapture %} {% capture img_path %}{{ author.banner | default: site.banner }}{% endcapture %} {% else %} {% capture header_type %}{{ page.header.type }}{% endcapture %} {% if page.header.fixed_image contains "://" %} {% capture fixed_img_path %}{{ page.header.fixed_image}}{% endcapture %} {% else %} {% capture fixed_img_path %}{{ page.header.fixed_image | relative_url }}{% endcapture %} {% endif %} {% if page.header.overlay_image contains "://" %} {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} {% elsif page.header.overlay_image %} {% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %} {% endif %} {% if header_type == 'overlay' %} {% capture img_path %}{{ overlay_img_path }}{% endcapture %} {% elsif header_type == 'image' %} {% capture img_path %}{{ fixed_img_path }}{% endcapture %} {% endif %} {% capture overlay_title %}{{ page.header.overlay_title }}{% endcapture %} {% if page.header.show_text == 'description' %} {% capture overlay_text %}{{ page.description }}{% endcapture %} {% elsif page.header.show_text == 'custom' %} {% capture overlay_text %}{{ page.header.custom_text }}{% endcapture %} {% endif %} {% if page.header.actions %} {% assign overlay_actions = true %} {% endif %} {% endif %} {% if page.header.cta_url contains "://" %} {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} {% else %} {% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %} {% endif %} {% if page.header.overlay_filter contains "rgba" %} {% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %} {% elsif page.header.overlay_filter %} {% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %} {% endif %} {% if page.header.image_description %} {% assign image_description = page.header.image_description %} {% else %} {% assign image_description = page.title %} {% endif %} {% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %}
{% if header_type == 'overlay' %}
{% if overlay_title %}

{% if paginator and site.paginate_show_page_num %} {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %} {% else %} {{ page.title | default: site.title | markdownify | remove: "

" | remove: "

" }} {% endif %}

{% endif %} {% if overlay_text %}

{{ overlay_text | markdownify | remove: "

" | remove: "

" }}

{% endif %} {% if page.read_time %}

{% include read-time.html %}

{% endif %} {% if page.header.cta_url %}

{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}

{% endif %} {% if overlay_actions == true and page.header.actions %}

{% for action in page.header.actions %} {% if action.url contains "://" %} {% assign url = action.url %} {% else %} {% assign url = action.url | relative_url %} {% endif %} {{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }} {% endfor %} {% endif %}

{% if page.header.caption %} {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
{% endif %} {% elsif header_type == 'image' %} {{ img_path }} {% elsif page.header_type == 'video' %} {% capture video_id %}{{ page.header.video.id }}{% endcapture %} {% capture video_provider %}{{ page.header.video.provider }}{% endcapture %} {% include video id=video_id provider=video_provider %} {% endif %}