dkforest

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

commit 9607c28fbddf0800539c8d2505fd175403998a3b
parent e73a1854647f68d0ac31df38a2eb261606d449e2
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 11 Jun 2023 15:43:59 -0700

cleanup

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

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5240,10 +5240,12 @@ Loop: } _, _ = c.Response().Write([]byte(`<style>.square { background-color: transparent !important; }</style>`)) - _, _ = c.Response().Write([]byte(`<style>.square_` + strconv.Itoa(int(payload.Move.S1())) + `, .square_` + strconv.Itoa(int(payload.Move.S2())) + ` { background-color: rgba(0, 255, 0, 0.2) !important; }</style>`)) + _, _ = c.Response().Write([]byte(fmt.Sprintf(`<style>.square_%d, .square_%d { background-color: rgba(0, 255, 0, 0.2) !important; }</style>`, int(payload.Move.S1()), int(payload.Move.S2())))) + // Reset kings background to transparent _, _ = c.Response().Write([]byte(`<style>#img_4 { background-color: transparent !important; }</style>`)) _, _ = c.Response().Write([]byte(`<style>#img_60 { background-color: transparent !important; }</style>`)) + // Render "checks" red background if payload.CheckW { _, _ = c.Response().Write([]byte(`<style>#img_4 { background-color: rgba(255, 0, 0, 0.4) !important; }</style>`)) } else if payload.CheckB {