dkforest

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

commit a20c11b64e2659e326b07c8a0cda7b60ab4c5fff
parent 6003577edb16ec0a4c11109c6acc49ba68daf475
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 12 Jun 2023 08:43:43 -0700

better ui

Diffstat:
Mpkg/web/handlers/interceptors/chess.go | 29+++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/pkg/web/handlers/interceptors/chess.go b/pkg/web/handlers/interceptors/chess.go @@ -307,18 +307,35 @@ func (g *ChessGame) DrawPlayerCard(key string, isBlack, isYourTurn bool) string func (g *ChessGame) drawPlayerCard(key string, isBlack, isSpectator, isYourTurn bool) string { htmlTmpl := ` +<style> +#p1Status { +} +#p2Status { +} +#p1Status, #p2Status { + width: 16px; height: 16px; border-radius: 8px; + background-color: darkred; + display: inline-block; +} +</style> <table style="width: 100%; height: 100%;"> <tr> <td align="center"> <table style="aspect-ratio: 1/1; height: 70%; max-width: 90%;"> <tr> <td style="padding: 10px 0;"> - <div style="color: #eee;"> - <div id="p1Status" style="width: 18px; height: 18px; border-radius: 9px; background-color: darkred; display: inline-block;"></div> - <span {{ .White.UserStyle | attr }}>@{{ .White.Username }}</span> (white) VS - <span {{ .Black.UserStyle | attr }}>@{{ .Black.Username }}</span> (black) - <div id="p2Status" style="width: 18px; height: 18px; border-radius: 9px; background-color: darkred; display: inline-block;"></div> - </div> + <table> + <tr> + <td style="padding-right: 10px;"><div id="p1Status"></div></td> + <td> + <span style="color: #eee; vertical-align: bottom;"> + <span {{ .White.UserStyle | attr }}>@{{ .White.Username }}</span> (white) VS + <span {{ .Black.UserStyle | attr }}>@{{ .Black.Username }}</span> (black) + </span> + </td> + <td style="padding-left: 10px;"><div id="p2Status"></div></td> + </tr> + </table> </td> </tr> <tr>