diff --git a/CHANGELOG.org b/CHANGELOG.org index a8ea501..359f321 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -9,4 +9,6 @@ Add the TailwindCSS. ** 0.2.3 <2023-07-14 Fri> Update the main container block. +** 0.2.4 <2023-07-14 Fri> + Update the table to a list of items and the header. diff --git a/templates/partials/task_item.html b/templates/partials/task_item.html new file mode 100644 index 0000000..5ff6d19 --- /dev/null +++ b/templates/partials/task_item.html @@ -0,0 +1,13 @@ +
+ {% if task.status == "TODO" %} +

+ {% elif task.status == "DOING" %} +

+ {% elif task.status == "DONE" or task.status == "CANCELED" %} +

+ {% endif %} + {{ task.status }} +

+

{{ task.name }}

+

{{ task.description | truncatewords:10 }}

+
diff --git a/templates/tasks/index.html b/templates/tasks/index.html index db2565a..793f9ed 100644 --- a/templates/tasks/index.html +++ b/templates/tasks/index.html @@ -2,20 +2,11 @@ {% load static %} {% block content %} -

Tasks

+

Tasks

- - - - - - +
{% for task in tasks %} -
- - - - + {% include "partials/task_item.html" %} {% endfor %} -
StatusNameDescription
{{ task.status }}{{ task.name }}{{ task.description | truncatewords:10 }}
+ {% endblock %}