{% from "@cnbritain/wc-common-image/template/macro.html" import common_image %} {%- from '@cnbritain/wc-card/template/macro.html' import card_core_link, card_core_image, card_core_title -%} {%- macro show_season_hub(unique_id, latest_shows=None, highlighted_shows=None, a_to_z_shows=None) -%}
{{- show_season_hub_radio(unique_id, latest_shows, highlighted_shows, a_to_z_shows) -}} {{- show_season_hub_small_viewer(unique_id, latest_shows, highlighted_shows, a_to_z_shows) -}} {{- show_season_hub_large_viewer(unique_id, latest_shows, highlighted_shows, a_to_z_shows) -}}
{%- endmacro -%} {%- macro show_season_hub_radio(unique_id, latest_shows=False, highlighted_shows=False, a_to_z_shows=False) -%} {%- if latest_shows -%} {%- endif -%} {%- if highlighted_shows -%} {%- endif -%} {%- if a_to_z_shows -%} {%- endif -%} {%- endmacro -%} {%- macro show_season_hub_nav(unique_id, latest_shows=False, highlighted_shows=False, a_to_z_shows=False) -%}
{%- endmacro -%} {%- macro show_season_hub_small_viewer(unique_id, latest_shows=None, highlighted_shows=None, a_to_z_shows=None) -%}
{{- show_season_hub_nav(unique_id, latest_shows, highlighted_shows, a_to_z_shows) -}}
{%- if latest_shows -%}
    {%- for group in latest_shows -%}
  • {{ group['date_time']|dt_format('%A, %-d %B %Y') }}
  • {%- for show in group['shows'] -%}
  • {{- show_season_hub_card(show) -}}
  • {%- endfor -%} {%- endfor -%}
{%- endif -%} {%- if highlighted_shows -%}
    {%- for show in highlighted_shows -%}
  • {{- show_season_hub_card(show) -}}
  • {%- endfor -%}
{%- endif -%} {%- if a_to_z_shows -%}
    {%- for group in a_to_z_shows -%}
  • {{ group['letter']|upper }}
  • {%- for show in group['shows'] -%}
  • {{- show_season_hub_card(show) -}}
  • {%- endfor -%} {%- endfor -%}
{%- endif -%}
{%- endmacro -%} {%- macro show_season_hub_large_viewer(unique_id, latest_shows=None, highlighted_shows=None, a_to_z_shows=None) -%}
{{- show_season_hub_nav(unique_id, latest_shows, highlighted_shows, a_to_z_shows) -}} {%- if latest_shows -%}
    {%- for group in latest_shows -%}
  • {{ group['date_time']|dt_format('%A, %-d %B %Y') }}
  • {%- for show in group['shows'] -%}
  • {{ show['title'] }}
  • {%- endfor -%} {%- endfor -%}
{%- endif -%} {%- if highlighted_shows -%}
{%- endif -%} {%- if a_to_z_shows -%}
    {%- for group in a_to_z_shows -%}
  • {{ group['letter']|upper }}
  • {%- for show in group['shows'] -%}
  • {{ show['title'] }}
  • {%- endfor -%} {%- endfor -%}
{%- endif -%}
{%- endmacro -%} {%- macro show_season_hub_card(show, brand='default', cls='') -%}
{{- card_core_link(show, url_for_show_summary(show)) -}}
{{- card_core_image(show, image_sources=[('portrait')], brand=brand) -}}
{{- card_core_title(show['title']) -}}
{%- endmacro -%}