Remplace les boutons des entrées par des pictos groupés
Modifier (crayon, primary), Dupliquer et Supprimer deviennent des icônes SVG avec title/aria-label, réunies dans un .btn-group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3dfe1a5828
commit
fdba078b51
2 files changed
+13
-3
No files matched your search
@@ -87,6 +87,14 @@ 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.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
|
||||||
.btn.danger { color: var(--danger); }
|
.btn.danger { color: var(--danger); }
|
||||||
.btn.small { padding: .2rem .55rem; font-size: .85rem; }
|
.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 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:hover { position: relative; z-index: 1; }
|
||||||
.htmx-request .btn, .btn.htmx-request { opacity: .6; }
|
.htmx-request .btn, .btn.htmx-request { opacity: .6; }
|
||||||
|
|
||||||
.badge { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
|
.badge { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
<td class="note">{{ e.note }}</td>
|
<td class="note">{{ e.note }}</td>
|
||||||
<td class="num">{{ e.duration() }}</td>
|
<td class="num">{{ e.duration() }}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<button class="btn small" hx-get="/ui/entries/{{ e.id }}/edit" hx-target="closest tr" hx-swap="outerHTML">Modifier</button>
|
<div class="btn-group">
|
||||||
<button class="btn small" hx-get="/ui/entries/{{ e.id }}/dupliquer" hx-target="closest tr" hx-swap="afterend">Dupliquer</button>
|
<button class="btn small icon primary" title="Modifier" aria-label="Modifier" hx-get="/ui/entries/{{ e.id }}/edit" hx-target="closest tr" hx-swap="outerHTML"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg></button>
|
||||||
<button class="btn small danger" hx-delete="/ui/entries/{{ e.id }}" hx-target="closest tr" hx-swap="outerHTML" hx-confirm="Supprimer cette entrée ?">Suppr.</button>
|
<button class="btn small icon" title="Dupliquer" aria-label="Dupliquer" hx-get="/ui/entries/{{ e.id }}/dupliquer" hx-target="closest tr" hx-swap="afterend"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg></button>
|
||||||
|
<button class="btn small icon danger" title="Supprimer" aria-label="Supprimer" hx-delete="/ui/entries/{{ e.id }}" hx-target="closest tr" hx-swap="outerHTML" hx-confirm="Supprimer cette entrée ?"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M10 11v6"/><path d="M14 11v6"/></svg></button>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
Reference in new issue
Block a user