{# Shared timeline chrome for the full document and the inplace fragment. Imported with context so macros see page, participant, config, and experiment. #} {% macro template_data_script() %} {# Shared bootstrap payload for both full-page loads and inplace fragment swaps. #} {% endmacro %} {% macro timeline_header() %}
{% if config.show_progress_bar %}
{# Centred on the track rather than inside the fill, which is too narrow to hold it early on; participant.css puts it on a pill so one colour reads over both. #}
{% endif %}
{% endmacro %} {% macro timeline_hold_region() %}
{% if page.is_timeline_hold %}
{{ page.overlay_html(participant) | safe }}
{% endif %}
{% endmacro %} {% macro media_download_bar() %} {# Rides the footer's top edge when there is a footer, and the bottom edge of the window when there is not; participant.css owns which. Only the per-render width is set here. #}
{% endmacro %} {% macro timeline_footer() %} {# Omit the footer element when it is hidden or has no content. Appearance and in-flow placement live in participant.css. #} {% set show_comment_button = config.get("leave_comments_on_every_page") %} {# Page.early_exit_available has already combined the page, recruiter and config settings, and suppressed Leave for participants who are finishing. #} {% set footer_has_content = experiment.show_reward or show_comment_button or show_early_exit_button %} {% if config.show_footer != false and footer_has_content %} {% else %} {# A standalone completed bar reads as a stray stripe. Footerless pages only need the bar while they have media to download. #} {% if page.media.num_files > 0 %} {{ media_download_bar() }} {% endif %} {% endif %} {% endmacro %}