From: Christian Heller Date: Thu, 30 May 2024 07:09:33 +0000 (+0200) Subject: In Calendar view, highlight today's date. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks?a=commitdiff_plain;h=d916781d66c1aaf4e3a04580153dce61744d5729;p=plomtask In Calendar view, highlight today's date. --- diff --git a/plomtask/http.py b/plomtask/http.py index 280b0f5..537f21f 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -120,7 +120,8 @@ class TaskHandler(BaseHTTPRequestHandler): days = Day.with_filled_gaps(days, start, end) for day in days: day.collect_calendarized_todos(self.conn) - return {'start': start, 'end': end, 'days': days} + today = date_in_n_days(0) + return {'start': start, 'end': end, 'days': days, 'today': today} def do_GET_day(self) -> dict[str, object]: """Show single Day of ?date=.""" diff --git a/templates/calendar.html b/templates/calendar.html index 4d67242..d7ec545 100644 --- a/templates/calendar.html +++ b/templates/calendar.html @@ -16,6 +16,9 @@ tr.month_row td { td.day_name { padding-right: 0.5em; } +td.today { + font-weight: bold; +} {% endblock %} @@ -45,7 +48,7 @@ to {{day.weekday|truncate(2,True,'',0)}} -{{day.date}} +{{day.date}} {{day.comment|e}}