diff --git a/templates/conference_list.html b/templates/conference_list.html index c834f4b..7ac5ddc 100644 --- a/templates/conference_list.html +++ b/templates/conference_list.html @@ -68,15 +68,6 @@ tr.conf-hl > td { } /* Conference table */ -.conf-section-row td { - background: #343a40 !important; - color: #fff; - font-weight: 700; - font-size: 0.85em; - padding-top: 0.5rem; - padding-bottom: 0.4rem; - border-bottom: none; -} .conf-month-row td { background: #e9ecef !important; font-weight: 600; @@ -130,74 +121,94 @@ tr.conf-hl > td { {% endif %} {% endmacro %} -{% macro conf_rows(heading, item_list, badge) %} +{% 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 %} - {% set month_label = item.start_date.strftime("%B %Y") %} - {% if month_label != ns.prev_month %} - {% set ns.prev_month = month_label %} - - {{ month_label }} +

{{ heading }} {{ count }} conference{{ "" if count == 1 else "s" }}

+ + + + + + + + + + + + + + + + + - {% endif %} - - - + + {% 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 %} + + + {% 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 %} - - - - - - -{% endfor %} + + + + + + + + + {% endfor %} + +
DatesConferenceTopicLocationCFP endsPrice
- {%- 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 }} +
{{ month_label }}
{{ 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 %} -
+ {%- 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 %} @@ -208,31 +219,9 @@ tr.conf-hl > td { {{ render_timeline(timeline) }} - - - - - - - - - - - - - - - - - - - - - {{ conf_rows("Current", current, "attending") }} - {{ conf_rows("Future", future, "going") }} - {{ conf_rows("Past", past|reverse|list, "went") }} - -
DatesConferenceTopicLocationCFP endsPrice
+ {{ conf_table("Current", current, "attending") }} + {{ conf_table("Future", future, "going") }} + {{ conf_table("Past", past|reverse|list, "went") }}