From ef517c98ff2163a850b2145a96716404129e1141 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sat, 14 Mar 2026 10:56:44 +0000 Subject: [PATCH] Replace CSS grid with Bootstrap table on conference list page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Proper with colgroup widths, table-sm table-hover align-middle - Month-divider rows (MARCH 2026, APRIL 2026, …) break up long lists - Date ranges collapsed to a single column (e.g. "25–28 Mar 2026") - Row highlight (conf-going) for conferences marked going=true - Topic and date columns styled text-muted small to reduce visual noise - Trip links replaced with 🧳 emoji: shows just the emoji when the trip title matches the conference name (the common case), otherwise appends the trip title (e.g. "🧳 Budapest" for FOSDEM); full title always in tooltip Co-Authored-By: Claude Sonnet 4.6 --- templates/conference_list.html | 152 +++++++++++++++++++++++---------- 1 file changed, 109 insertions(+), 43 deletions(-) diff --git a/templates/conference_list.html b/templates/conference_list.html index bb98d84..6aef0f0 100644 --- a/templates/conference_list.html +++ b/templates/conference_list.html @@ -1,22 +1,11 @@ {% extends "base.html" %} -{% from "macros.html" import trip_link, conference_row with context %} +{% from "macros.html" import trip_link with context %} {% block title %}Conferences - Edward Betts{% endblock %} {% block style %} -{% set column_count = 9 %} {% endblock %} @@ -74,7 +79,6 @@ {% 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 %} @@ -82,28 +86,22 @@

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 %} + {% if conf.url %}{{ conf.name }} + {% else %}{{ conf.name }}{% endif %}
{% endfor %} @@ -112,25 +110,95 @@ {% 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 %} -

-
- +{% macro conf_table(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 %} - {{ conference_row(item, badge) }} -
- {% if item.linked_trip %} trip: {{ trip_link(item.linked_trip) }} {% endif %} -
+ {% set month_label = item.start_date.strftime("%B %Y") %} + {% if month_label != ns.prev_month %} + {% set ns.prev_month = month_label %} + + + + {% endif %} + + + + + + + + {% endfor %} - {% endif %} + +
DatesConferenceTopicLocationCFP endsPrice
{{ month_label }}
+ {%- 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 %} +
+{% endif %} {% endmacro %} {% block content %} @@ -140,11 +208,9 @@ {{ render_timeline(timeline) }} -
- {{ section("Current", current, "attending") }} - {{ section("Future", future, "going") }} - {{ section("Past", past|reverse|list, "went") }} -
+ {{ conf_table("Current", current, "attending") }} + {{ conf_table("Future", future, "going") }} + {{ conf_table("Past", past|reverse|list, "went") }} {% endblock %}