dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 27f394011cd5de946b8b7dc8aa4aae02bc93a144
parent 2a401a32736655a6d2e35ea1af37aa0271538605
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 12 Jun 2023 15:10:04 -0700

cleanup

Diffstat:
Mpkg/web/handlers/chess.go | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/chess.go b/pkg/web/handlers/chess.go @@ -335,7 +335,10 @@ Loop: } animationIdx++ animationName := fmt.Sprintf("move_anim_%d", animationIdx) - styles.Appendf(`@keyframes %s { from { left: calc(%d*12.5%%); top: calc(%d*12.5%%); } to { left: calc(%d*12.5%%); top: calc(%d*12.5%%); } }`, animationName, x1, y1, x2, y2) + keyframes := "@keyframes %s {" + + "from { left: calc(%d*12.5%%); top: calc(%d*12.5%%); }" + + " to { left: calc(%d*12.5%%); top: calc(%d*12.5%%); } }" + styles.Appendf(keyframes, animationName, x1, y1, x2, y2) styles.Appendf(`#%s { animation-name: %s; animation-duration: %dms; animation-fill-mode: forwards; }`, id, animationName, animationMs) }