X-Git-Url: https://plomlompom.com/repos/day_todos?a=blobdiff_plain;ds=sidebyside;f=todo_templates%2Ftodo.html;h=5c6e40b44a96e0641ac229eb4c5be2f771d644c4;hb=9637ae6c570e9cf0cce500d85af03c74d6771362;hp=404ac1c496e32e3fdff533ccb634b2973029a1f6;hpb=979de59ced9fe3fd3860d19288b42485d7f02346;p=misc
diff --git a/todo_templates/todo.html b/todo_templates/todo.html
index 404ac1c..5c6e40b 100644
--- a/todo_templates/todo.html
+++ b/todo_templates/todo.html
@@ -1,134 +1,263 @@
{% extends 'base.html' %}
+
+
{% block css %}
-th.toplevel { padding-right: 1em; }
-input[type="submit"].delete { background-color: #ff7777; }
-div.delete { float: right; }
+tr.toplevel th { padding-right: 1em; }
td.center { text-align: center; }
+tr.toplevel td, tr.toplevel th { padding-top: 1em; }
+tr.lowlevel td, tr.lowlevel th { padding-top: 0em; }
+tr.grey td { background-color: #cccccc; }
{% endblock %}
+
+
+{% macro draw_todo(todo) %}{{todo.title}}{% if todo.comment %}({{todo.comment|e}}){% endif %}{% endmacro %}
+
+
+
+{% macro task_with_deps(task, indent) %}
+{% for i in range(indent) %} {% endfor %}+
+({{task.title.then}})
+{% for t in task.deps %}
+{{ task_with_deps(t, indent+1) }}
+{% endfor %}
+{% endmacro %}
+
+
+
+{% macro todo_with_deps(todo, indent) %}
+{% for i in range(indent) %} {% endfor %}{{ macros.doneness_string(todo) }} {{ draw_todo(todo) }}
+{% for dep in todo.deps %}
+{% if dep.been_observed %}
+{% for i in range(indent+1) %} {% endfor %}{{ macros.doneness_string(dep) }} ({{ draw_todo(dep) }})
+{% else %}
+{{ todo_with_deps(dep, indent+1) }}
+{% endif %}
+{% endfor %}
+{{ todo.observe() }}
+{% endmacro %}
+
+
+
+{% macro draw_deps(deps) %}
+{% for t in deps %}
+