Completed and abandoned habits were both lumped under a single terminal state, making it impossible to tell "finished successfully" apart from "gave up" when reviewing habit history.
35 lines
1.3 KiB
HTML
35 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}습관 관리 · 습관 트래커{% endblock %}
|
|
{% block nav_habits %}active{% endblock %}
|
|
{% block content %}
|
|
<h1>습관 관리</h1>
|
|
|
|
<div class="tabs">
|
|
<a href="/habits?tab=build" class="{{ 'active' if tab == 'build' }}">만들고 싶은 습관</a>
|
|
<a href="/habits?tab=quit" class="{{ 'active' if tab == 'quit' }}">멈추고 싶은 습관</a>
|
|
<a href="/habits?tab=completed" class="{{ 'active' if tab == 'completed' }}">완료된 습관</a>
|
|
<a href="/habits?tab=abandoned" class="{{ 'active' if tab == 'abandoned' }}">포기한 습관</a>
|
|
</div>
|
|
|
|
{% if tab in ("build", "quit") %}
|
|
{% include "partials/habit_form.html" %}
|
|
{% endif %}
|
|
|
|
<div class="card">
|
|
{% if habits %}
|
|
<div id="habit-list">
|
|
{% for habit in habits %}
|
|
{% include "partials/habit_item.html" %}
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state">
|
|
{% if tab == "build" %}만들고 싶은 습관이 아직 없어요. 위에서 추가해보세요.
|
|
{% elif tab == "quit" %}끊고 싶은 습관이 아직 없어요. 위에서 추가해보세요.
|
|
{% elif tab == "abandoned" %}아직 포기한 습관이 없어요.
|
|
{% else %}아직 완료된 습관이 없어요.{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|