{% extends "base.html" %} {% from "macros.html" import trip_link, conference_row with context %} {% block title %}Conferences - Edward Betts{% endblock %} {% block style %} {% set column_count = 9 %} {% endblock %} {% set tl_colors = ["#0d6efd","#198754","#dc3545","#fd7e14","#6f42c1","#20c997","#0dcaf0","#d63384"] %} {% macro render_timeline(timeline) %} {% if timeline %} {% set bar_h = 26 %} {% set row_h = 32 %} {% set header_h = 22 %} {% set total_h = timeline.lane_count * row_h + header_h %}

Next 90 days

{# Month markers #} {% for m in timeline.months %}
{{ m.label }}
{% endfor %} {# Today marker (always at left: 0) #}
{# Conference bars #} {% for conf in timeline.confs %} {% set color = tl_colors[conf.lane % tl_colors | length] %} {% set top_px = conf.lane * row_h + header_h %}
{% if conf.url %} {{ conf.name }} {% else %} {{ conf.name }} {% endif %}
{% endfor %}
{% endif %} {% endmacro %} {% macro section(heading, item_list, badge) %} {% if item_list %}

{{ heading }}

{% set item_count = item_list|length %} {% if item_count == 1 %}{{ item_count }} conference{% else %}{{ item_count }} conferences{% endif %}

{% for item in item_list %} {{ conference_row(item, badge) }}
{% if item.linked_trip %} trip: {{ trip_link(item.linked_trip) }} {% endif %}
{% endfor %} {% endif %} {% endmacro %} {% block content %}

Conferences

{{ render_timeline(timeline) }}
{{ section("Current", current, "attending") }} {{ section("Future", future, "going") }} {{ section("Past", past|reverse|list, "went") }}
{% endblock %}