diff --git a/templates/conference_list.html b/templates/conference_list.html
index a375dc6..a0e891b 100644
--- a/templates/conference_list.html
+++ b/templates/conference_list.html
@@ -31,12 +31,22 @@
{% for item in item_list %}
+ {% if item == "today" %}
+ {% set bg="bg-warning-subtle" %}
+
{{ today.strftime("%a, %d %b %Y") }}
+
+
today
+
+
+
+ {% else %}
{{ item.start.strftime("%a, %d %b %Y") }}
{{ item.end.strftime("%a, %d %b") }}
{{ item.name }}
{{ item.topic }}
{{ item.location }}
+ {% endif %}
{% endfor %}
diff --git a/web_view.py b/web_view.py
index 112a824..1b5e826 100755
--- a/web_view.py
+++ b/web_view.py
@@ -3,6 +3,7 @@
"""Web page to show upcoming events."""
import inspect
+import operator
import os.path
import sys
import traceback
@@ -79,10 +80,18 @@ def conference_list() -> str:
data_dir = config["data"]["personal-data"]
filepath = os.path.join(data_dir, "conferences.yaml")
item_list = yaml.safe_load(open(filepath))["conferences"]
+ today = date.today()
+ for conf in item_list:
+ conf["as_date"] = as_date(conf["start"])
- item_list.sort(key=lambda conf: as_date(conf["start"]))
+ item_list.sort(key=operator.itemgetter("as_date"))
- return flask.render_template("conference_list.html", item_list=item_list)
+ past = [conf for conf in item_list if conf["as_date"] < today]
+ future = [conf for conf in item_list if conf["as_date"] >= today]
+
+ return flask.render_template(
+ "conference_list.html", item_list=past + ["today"] + future, today=today
+ )
if __name__ == "__main__":