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

Next 90 days

{% for m in timeline.months %}
{{ m.label }}
{% endfor %}
{% 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 conf_rows(heading, item_list, badge) %} {% if item_list %} {% set count = item_list | length %} {{ heading }} {{ count }} conference{{ "" if count == 1 else "s" }} {% set ns = namespace(prev_month="") %} {% for item in item_list %} {% set month_label = item.start_date.strftime("%B %Y") %} {% if month_label != ns.prev_month %} {% set ns.prev_month = month_label %} {{ month_label }} {% endif %} {%- if item.start_date == item.end_date -%} {{ item.start_date.strftime("%-d %b %Y") }} {%- elif item.start_date.year == item.end_date.year and item.start_date.month == item.end_date.month -%} {{ item.start_date.strftime("%-d") }}–{{ item.end_date.strftime("%-d %b %Y") }} {%- else -%} {{ item.start_date.strftime("%-d %b") }}–{{ item.end_date.strftime("%-d %b %Y") }} {%- endif -%} {% if item.url %}{{ item.name }} {% else %}{{ item.name }}{% endif %} {% if item.going and not (item.accommodation_booked or item.travel_booked) %} {{ badge }} {% endif %} {% if item.accommodation_booked %} accommodation {% endif %} {% if item.transport_booked %} transport {% endif %} {% if item.linked_trip %} {% set trip = item.linked_trip %} 🧳{% if trip.title != item.name %} {{ trip.title }}{% endif %} {% endif %} {{ item.topic }} {% set country = get_country(item.country) if item.country else None %} {% if country %}{{ country.flag }} {{ item.location }} {% elif item.online %}💻 Online {% else %}{{ item.location }}{% endif %} {% if item.cfp_end %}{{ item.cfp_end.strftime("%-d %b %Y") }}{% endif %} {% if item.price and item.currency %} {{ "{:,d}".format(item.price | int) }} {{ item.currency }} {% if item.currency != "GBP" and item.currency in fx_rate %} {{ "{:,.0f}".format(item.price / fx_rate[item.currency]) }} GBP {% endif %} {% elif item.free %} free {% endif %} {% endfor %} {% endif %} {% endmacro %} {% block content %}

Conferences

{{ render_timeline(timeline) }} {{ conf_rows("Current", current, "attending") }} {{ conf_rows("Future", future, "going") }} {{ conf_rows("Past", past|reverse|list, "went") }}
Dates Conference Topic Location CFP ends Price
{% endblock %}