diff --git a/templates/index.html b/templates/index.html index 81c5a0e..76ced99 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,43 +1,40 @@ {% extends 'layouts/main.html' %} {% block content %} -

{{ title }}

-

{{ utc_dt }}

+

{{ title }}

+

{{ utc_dt }}

- + .day { + width: 50px; + height: 50px; + border: 1px solid #ccc; + display: flex; + align-items: center; + justify-content: center; + } + -
- -
-
+
+
+
+
+
Heatmap
+
+
-
-
+ +
+ {% for habit_list in habit_lists %} -
-

{{ habit_list.name }}

- Gewohnheit erstellen -
+
+

{{ habit_list.name }}

+ Gewohnheit + erstellen +
-
    - {% for habit in habit_list.habits %} -
  • -
    - -
    -
    - -
    +
      + {% for habit in habit_list.habits %} +
    • +
      + +
      +
      + +
      -
      - {{ habit.name }} -
      +
      + {{ habit.name }} +
      -
      - {{ habit.note }} -
      +
      + {{ habit.note }} -
      - {% if habit %} - 5 🔥 - {% endif %} +
      -
      +
      + {% if habit %} - -
      -
      -
      -
      -
      -
    • + {% else %} + 5 🔥 + {% endif %} - {% endfor %} -
    +
+ + +
+
+
+
+
+ + + {% endfor %} + {% endfor %}
@@ -177,14 +181,11 @@ var habitBlock = document.getElementById("habit-" + habitId); if (percentage == 100) { + progressBar.style.backgroundColor = "green"; habitBlock.classList.add("animate-bounce"); setTimeout(function () { habitBlock.classList.remove("animate-bounce"); }, 2000); - } - - if (percentage >= 100) { - progressBar.style.backgroundColor = "green"; } else { progressBar.style.backgroundColor = ""; habitBlock.classList.remove("animate-bounce"); @@ -212,9 +213,7 @@ var percentage = response.data.percentage; var progressBar = document.getElementById("progress-bar-" + habitId); progressBar.style.width = percentage + "%"; - if (response.data.unchecked) { - checkCompletionAndAnimate(habitId, percentage); - } + checkCompletionAndAnimate(habitId, percentage); }).catch(function (error) { // Handle the error if needed console.error('Error:', error); @@ -242,30 +241,31 @@ }
+
- + }); + {% endblock %} \ No newline at end of file