FastAPI + SQLAlchemy/Alembic + MariaDB backend with Jinja2/htmx/Alpine server-rendered frontend. Multi-user via Google OAuth, daily habit tracking, monthly/weekly history views, Web Push reminders via APScheduler, and PWA support (manifest, service worker, offline caching). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
1.2 KiB
HTML
28 lines
1.2 KiB
HTML
<div class="habit-item{{ ' today-checked' if item.checked }}">
|
|
<div class="habit-item-main">
|
|
<button
|
|
type="button"
|
|
class="check-indicator{{ ' checked' if item.checked }}"
|
|
hx-post="/today/{{ item.habit_id }}/toggle"
|
|
hx-target="#today-content"
|
|
hx-swap="innerHTML"
|
|
aria-label="{{ item.name }} 체크"
|
|
>{% if item.checked %}✓{% endif %}</button>
|
|
<div>
|
|
<div class="habit-item-name">{{ item.name }}</div>
|
|
{% if item.condition_text %}<div class="habit-item-condition">{{ item.condition_text }}</div>{% endif %}
|
|
{% if item.reminder_time %}<div class="habit-item-meta">알람 {{ item.reminder_time }}</div>{% endif %}
|
|
{% if item.scheduled_days > 0 %}
|
|
<div class="habit-item-stats">
|
|
<span class="badge">완료율 {{ item.completion_rate }}%</span>
|
|
{% if item.current_streak > 0 %}
|
|
<span class="badge{{ ' badge-milestone' if is_milestone_streak(item.current_streak) }}">
|
|
{{ '🏆' if is_milestone_streak(item.current_streak) else '🔥' }} 연속 {{ item.current_streak }}일
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|