From d2d8e94abafc4fe118e6dc1027be07a149951268 Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Fri, 13 Nov 2026 18:36:44 +0100 Subject: [PATCH] =?UTF-8?q?Met=20des=20pictos=20sur=20la=20page=20clients?= =?UTF-8?q?=20et=20aligne=20les=20contr=C3=B4les?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajouter / Enregistrer (primary), Réinitialiser la couleur, Archiver / Réactiver et Supprimer deviennent des icônes groupées ; les SVG sont centralisés dans la macro _icons.html. Hauteurs communes (--control, --control-sm) pour champs, pastilles de couleur et boutons-icônes ; les pastilles ne s'étirent plus. Tiret devant les projets. Co-Authored-By: Claude Opus 5.5 --- static/app.css | 22 +++++++++++++----- templates/_entry_row.html | 7 +++--- templates/_icons.html | 12 ++++++++++ templates/clients.html | 47 +++++++++++++++++++++++++-------------- 4 files changed, 62 insertions(+), 26 deletions(-) create mode 100644 templates/_icons.html diff --git a/static/app.css b/static/app.css index 518b728..0120217 100644 --- a/static/app.css +++ b/static/app.css @@ -1,4 +1,7 @@ :root { + /* Hauteur commune des champs, pastilles de couleur et boutons-icônes. */ + --control: 2.5rem; + --control-sm: 1.9rem; --bg: #f6f5f2; --surface: #ffffff; --text: #1d1d1f; @@ -64,7 +67,8 @@ main { max-width: 960px; margin: 1.5rem auto; padding: 0 16px; display: grid; ga .row { display: flex; gap: .5rem; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } -.row.grow input { flex: 1; min-width: 0; } +.row.grow input:not([type="color"]) { flex: 1; min-width: 0; } +.row input, .row select { height: var(--control); } .stack { display: grid; gap: .35rem; } .muted, .empty { color: var(--muted); } .empty { margin: .25rem 0; } @@ -87,13 +91,17 @@ label { display: flex; align-items: center; gap: .35rem; color: var(--muted); } .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; } .btn.danger { color: var(--danger); } .btn.small { padding: .2rem .55rem; font-size: .85rem; } -.btn.icon { display: inline-flex; align-items: center; justify-content: center; padding: .3rem; line-height: 0; } +.btn.icon { + display: inline-flex; align-items: center; justify-content: center; flex: none; + width: var(--control); height: var(--control); padding: 0; line-height: 0; +} +.btn.small.icon { width: var(--control-sm); height: var(--control-sm); } .btn.icon svg { display: block; } .btn-group { display: inline-flex; } .btn-group > .btn { border-radius: 0; } .btn-group > .btn + .btn { margin-left: -1px; } -.btn-group > .btn:first-child { border-radius: 8px 0 0 8px; } -.btn-group > .btn:last-child { border-radius: 0 8px 8px 0; } +.btn-group > .btn:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; } +.btn-group > .btn:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; } .btn-group > .btn:hover { position: relative; z-index: 1; } .htmx-request .btn, .btn.htmx-request { opacity: .6; } @@ -133,9 +141,10 @@ td.actions { text-align: right; white-space: nowrap; } } .client-card { border-left: 6px solid var(--color); } input[type="color"] { - width: 2.2rem; height: 2.2rem; padding: .15rem; flex: none; cursor: pointer; + width: var(--control); height: var(--control); padding: .15rem; flex: none; cursor: pointer; } -.projects input[type="color"] { width: 1.8rem; height: 1.8rem; } +.projects input { height: var(--control-sm); padding-block: 0; } +.projects input[type="color"] { width: var(--control-sm); padding: .1rem; } /* Projects list */ .projects { list-style: none; margin: 0 0 1rem; padding: 0; } @@ -144,6 +153,7 @@ input[type="color"] { padding: .4rem 0; border-bottom: 1px solid var(--border); } .projects li.archived { opacity: .6; } +.projects li > form::before { content: "-"; color: var(--muted); flex: none; } /* Periods & reports */ .presets { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; } diff --git a/templates/_entry_row.html b/templates/_entry_row.html index c580190..22e1e7a 100644 --- a/templates/_entry_row.html +++ b/templates/_entry_row.html @@ -1,3 +1,4 @@ +{% import "_icons.html" as icons %} {{ e.start_time() }} – {{ e.end_time() }} @@ -8,9 +9,9 @@ {{ e.duration() }}
- - - + + +
diff --git a/templates/_icons.html b/templates/_icons.html new file mode 100644 index 0000000..21c2337 --- /dev/null +++ b/templates/_icons.html @@ -0,0 +1,12 @@ +{# Icônes SVG (tracés Lucide), en couleur du texte. #} +{% macro icon(name) %}{% endmacro %} diff --git a/templates/clients.html b/templates/clients.html index f077d5e..d103885 100644 --- a/templates/clients.html +++ b/templates/clients.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "_icons.html" as icons %} {% block title %}Clients{% endblock %} {% block content %}
@@ -6,7 +7,7 @@
- +
@@ -20,17 +21,22 @@
- +
{% if c.client.archived %}archivé{% endif %} -
+ - -
-
-
+ +
+ {% if c.client.archived %} + + {% else %} + + {% endif %} + +
@@ -41,20 +47,27 @@ - - {% if p.color.is_some() %} - - {% endif %} +
+ + {% if p.color.is_some() %} + + {% endif %} +
{% if p.archived %}archivé{% endif %} -
+ - -
-
-
+ +
+ {% if p.archived %} + + {% else %} + + {% endif %} + +
{% endfor %} @@ -63,7 +76,7 @@
- +
{% endfor %}