dkforest

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

commit f82341f31a4db67d7fec7ff2a78cddf14f65b363
parent 00d45159cecca5d1702b5e17e0772633434df9ca
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri, 16 Jun 2023 22:36:57 -0700

better ui

Diffstat:
Mpkg/web/handlers/chess.go | 21++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/pkg/web/handlers/chess.go b/pkg/web/handlers/chess.go @@ -334,20 +334,35 @@ func ChessGameFormHandler(c echo.Context) error { htmlTmpl := ` <style> button { - width: 50%; background-color: transparent; position: absolute; top: 0; bottom: 0; border: none; } +#prev { + width: 30%; + cursor: pointer; + left: 0; +} +#prev:hover { + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.3) , transparent); +} +#next { + width: 30%; + cursor: pointer; + right: 0; +} +#next:hover { + background-image: linear-gradient(to left, rgba(0, 0, 0, 0.3) , transparent); +} </style> <form method="post" target="iframeStats" action="/chess/{{ .Key }}/stats"> <input type="hidden" name="csrf" value="{{ .CSRF }}" /> <input type="hidden" name="move_idx" value="{{ .MoveIdx }}" /> <div style="position: fixed; top: 0; left: 0; right: 0; bottom: 0;"> - <button name="btn_submit" value="prev_position" type="submit"></button> - <button name="btn_submit" value="next_position" type="submit" style="right: 0;"></button> + <button name="btn_submit" value="prev_position" type="submit" id="prev"></button> + <button name="btn_submit" value="next_position" type="submit" id="next"></button> </div> </form>`