+ {% 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.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 %}
+
+ |
+ {%- 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 %}
+
+