From 10d29f93e2e8db7812485c5fa6baa027f25f0d4c Mon Sep 17 00:00:00 2001 From: Hans K Date: Wed, 7 Feb 2024 17:31:16 -0500 Subject: [PATCH] Visual feedback when swapping elements in the editor --- OpenShow/slides/editor/static/editor/editor.css | 10 ++++++++++ .../slides/editor/templates/editor/edit_slide.html | 2 +- .../slides/editor/templates/editor/show_editor.html | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/OpenShow/slides/editor/static/editor/editor.css b/OpenShow/slides/editor/static/editor/editor.css index 0791609..a151e9c 100644 --- a/OpenShow/slides/editor/static/editor/editor.css +++ b/OpenShow/slides/editor/static/editor/editor.css @@ -214,4 +214,14 @@ ul > a { height: 3rem; background-color: #3A7734; transition: height, background-color 500ms; +} + +.htmx-swapping:not(#dummy) { + background-color: #539c68; + opacity: 0; + transition: background-color 0.1s, opacity 0.1s; +} + +:not(.htmx-swapping) { + transition: background-color 0.1s, opacity 0.1s; } \ No newline at end of file diff --git a/OpenShow/slides/editor/templates/editor/edit_slide.html b/OpenShow/slides/editor/templates/editor/edit_slide.html index 8731fe0..166ffbf 100644 --- a/OpenShow/slides/editor/templates/editor/edit_slide.html +++ b/OpenShow/slides/editor/templates/editor/edit_slide.html @@ -24,7 +24,7 @@ {{ form.order }} {# #} - +