server: highlight today's date on the calendar widget

This commit is contained in:
2025-08-19 16:57:26 -07:00
parent ea60cce86b
commit 6ca2459034
2 changed files with 22 additions and 7 deletions

View File

@@ -69,13 +69,25 @@
{% for week in all_days|batch(7) %}
<tr>
{% for day in week %}
{% if event_days.contains(day) %}
{% if event_days.contains(day) && today.is_some() && today.unwrap() == day %}
<td
style="background:#ffd700; color:#222; font-weight:bold; border:2px solid #2196f3; border-radius:4px; text-align:center; box-shadow:0 0 0 2px #2196f3;">
{{ day.day() }}
</td>
{% elif event_days.contains(day) %}
<td
style="background:#ffd700; color:#222; font-weight:bold; border:1px solid #aaa; border-radius:4px; text-align:center;">
{{ day.day() }}</td>
{{ day.day() }}
</td>
{% elif today.is_some() && today.unwrap() == day %}
<td
style="border:2px solid #2196f3; border-radius:4px; text-align:center; background:#e3f2fd; color:#222; box-shadow:0 0 0 2px #2196f3;">
{{ day.day() }}
</td>
{% else %}
<td style="border:1px solid #eee; text-align:center;background:#f7f7f7;color:#bbb;">{{
day.day() }}</td>
<td style="border:1px solid #eee; text-align:center;background:#f7f7f7;color:#bbb;">
{{ day.day() }}
</td>
{% endif %}
{% endfor %}
</tr>
@@ -93,4 +105,4 @@
<p style="margin: 0 0 8px 0; color:#444;">{{ p }}</p>
{% endfor %}
</div>
{% endif %}
{% endif %}