From: Christian Heller Date: Sat, 8 Jun 2024 19:04:07 +0000 (+0200) Subject: Improve multiple template layouts and refactor CSS. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/feed.xml?a=commitdiff_plain;h=83c31bdf2a1b2cd1f3beadee482feb91c64759f9;p=plomtask Improve multiple template layouts and refactor CSS. --- diff --git a/templates/_base.html b/templates/_base.html index 0d2debe..0b44171 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -7,6 +7,9 @@ body { text-align: left; padding: 0; } +input[type="text"] { + width: 100em; +} input.btn-harmless { color: green; } @@ -29,6 +32,11 @@ th, td { a { color: black; } +table.edit_table > tbody > tr > td, table.main > tbody > tr > th { + border-bottom: 0.1em solid #bbbbbb; + padding-top: 0.5em; + padding-bottom: 0.5em; +} {% block css %} {% endblock %} diff --git a/templates/condition.html b/templates/condition.html index 8deb71c..7142363 100644 --- a/templates/condition.html +++ b/templates/condition.html @@ -3,34 +3,29 @@ -{% block css %} -input[name="title"] { - width: 100em; -} -{% endblock %} - - - {% block content %} -

{% if is_new %}NEW {% endif %}condition

+

+{% if is_new %} +add NEW condition +{% else %} +edit condition of ID {{condition.id_}} +{% endif %} +

- +
- + - - - - - - -
title{% if condition.id_ %} [history]{% endif %}{% if condition.id_ %} [history]{% endif %}
is active
description {% if condition.id_ %} [history]{% endif %}
enables @@ -39,7 +34,6 @@ input[name="title"] { {% endfor %}
disables @@ -48,7 +42,6 @@ input[name="title"] { {% endfor %}
enabled by @@ -57,7 +50,6 @@ input[name="title"] { {% endfor %}
disabled by @@ -66,8 +58,8 @@ input[name="title"] { {% endfor %}
+ {{ macros.edit_buttons() }} {% endblock %} diff --git a/templates/day.html b/templates/day.html index 3b2e96a..c3a20aa 100644 --- a/templates/day.html +++ b/templates/day.html @@ -4,26 +4,23 @@ {% block css %} -td, th, tr, table { - padding: 0; - margin: 0; -} table { border-collapse: collapse; } th { border: 1px solid black; } -td.cond_line_0 { +td.cond_line_0, td.cond_line_1, td.cond_line_2 { + padding: 0; border-top: 1px solid white; +} +td.cond_line_0 { background-color: #bfbfbf; } td.cond_line_1 { - border-top: 1px solid white; background-color: #dfdfdf; } td.cond_line_2 { - border-top: 1px solid white; background-color: #fffff; } td.cond_line_corner { @@ -36,10 +33,10 @@ td.todo_line { border-bottom: 1px solid #bfbfbf; height: 1.7em; } -tr.inactive td.todo_line { +tr.inactive > td.todo_line { background-color: #bfbfbf; } -tr.hidden_undone td, tr.hidden_undone a { +tr.hidden_undone > td, tr.hidden_undone a { color: #9f9f9f; } td.left_border { diff --git a/templates/process.html b/templates/process.html index 064e83d..4027f50 100644 --- a/templates/process.html +++ b/templates/process.html @@ -4,9 +4,6 @@ {% block css %} -input[type="text"] { - width: 100em; -} details > summary::after { content: '[+]'; } @@ -16,11 +13,6 @@ details summary { details[open] > summary::after { content: '[-]'; } -table.main > tbody > tr > td, table.main > tbody > tr > th { - border-bottom: 0.1em solid #bbbbbb; - padding-top: 0.5em; - padding-bottom: 0.5em; -} {% endblock %} @@ -61,11 +53,11 @@ table.main > tbody > tr > td, table.main > tbody > tr > th { {% endif %} - {% if (not step_node.is_explicit) and (not step_node.seen) %} + suppress -{% endif %} +{% endif %} {% if step_node.is_explicit or not step_node.seen %} {% for substep_id, substep in step_node.steps.items() %} @@ -85,48 +77,40 @@ edit process of ID {{process.id_}} {% endif %} - +
- + - - - - - - - - - - -
title{% if process.id_ %} [history]{% endif %}{% if process.id_ %} [history]{% endif %}
default effort {% if process.id_ %} [history]{% endif %}
description
{% if process.id_ %} [history]{% endif %}
calendarize
conditions {{ macros.simple_checkbox_table("condition", process.conditions, "condition", "condition_candidates") }}
blockers {{ macros.simple_checkbox_table("blocker", process.blockers, "condition", "condition_candidates") }}
enables {{ macros.simple_checkbox_table("enables", process.enables, "condition", "condition_candidates") }}
disables {{ macros.simple_checkbox_table("disables", process.disables, "condition", "condition_candidates") }}
steps @@ -138,23 +122,20 @@ edit process of ID {{process.id_}} add:
step of {{ macros.simple_checkbox_table("step_of", owners, "process", "process_candidates") }}
todos {{n_todos}}
+ {{ macros.edit_buttons() }}
- {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }} {{ macros.datalist_of_titles("process_candidates", process_candidates) }} {% endblock %} diff --git a/templates/todo.html b/templates/todo.html index 870eab3..05e5b62 100644 --- a/templates/todo.html +++ b/templates/todo.html @@ -6,58 +6,48 @@ {% block content %}

Todo: {{todo.title_then|e}}

- +
- - - - - + - - - - - - - +make: -
day {{todo.date}}
process {{todo.process.title.newest|e}}
done
effort
comment
calendarize
conditions {{ macros.simple_checkbox_table("condition", todo.conditions, "condition", "condition_candidates") }}
blockers {{ macros.simple_checkbox_table("blocker", todo.blockers, "condition", "condition_candidates") }}
enables {{ macros.simple_checkbox_table("enables", todo.enables, "condition", "condition_candidates") }}
disables {{ macros.simple_checkbox_table("disables", todo.disables, "condition", "condition_candidates") }}
parents @@ -66,17 +56,15 @@ {% endfor %}
children {{ macros.simple_checkbox_table("adopt", todo.children, "todo", "todo_candidates", "adopt", true) }}
-make:
+ {{ macros.edit_buttons() }}
- {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }} {{ macros.datalist_of_titles("process_candidates", process_candidates) }}