add day-detail view to monthly history calendar

날짜 셀 클릭 시 그 날 예정된 습관별 완료/실패/미완료 상태를 htmx로 불러와 보여준다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 13:21:49 +09:00
co-authored by Claude Sonnet 5
parent 800f42eab1
commit 9dfcbcec8f
8 changed files with 228 additions and 2 deletions
+6 -1
View File
@@ -32,8 +32,11 @@
{% for d in week %}
{% set summary = summary_map.get(d) %}
<div
class="calendar-cell{{ '' if d.month == month else ' muted' }}"
class="calendar-cell clickable{{ '' if d.month == month else ' muted' }}"
style="background: rgba(var(--color-accent-rgb), {{ heatmap_opacity(summary.checked_count, summary.scheduled_count) if summary else 0 }});"
hx-get="/history/day/{{ d.isoformat() }}"
hx-target="#day-detail"
hx-swap="innerHTML"
>
<span class="calendar-date">{{ d.day }}</span>
{% if summary and summary.scheduled_count %}
@@ -45,6 +48,8 @@
{% endfor %}
</div>
<div id="day-detail"></div>
{% else %}
<div class="card" style="overflow-x:auto;">
<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom: var(--space-2);">