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/%27%29;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chunks.push%28escapeHTML%28span%5B2%5D%29%29;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chunks.push%28%27?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}}