dkforest

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

commit 2bff7d4f26bec22fbc9a1987e21270f1d2814d02
parent c0b485e80fb40ac01c01baf4460fe0cf80f12f88
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu,  7 Dec 2023 02:54:32 -0500

UI

Diffstat:
Mpkg/web/handlers/poker/poker.go | 38+++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -469,9 +469,9 @@ func dealerThread(db *database.DkfDB, g *PokerGame, roomID string) { {Top: 50, Left: 600, Top2: 50 + 5, Left2: 600 + 5, Angle: "-90deg"}, {Top: 150, Left: 574, Top2: 150 + 5, Left2: 574 + 3, Angle: "-80deg"}, {Top: 250, Left: 530, Top2: 250 + 5, Left2: 530 + 1, Angle: "-70deg"}, - {Top: 300, Left: 485, Top2: 300 + 5, Left2: 485 + 1, Angle: "0deg"}, - {Top: 300, Left: 300, Top2: 300 + 5, Left2: 300 + 1, Angle: "0deg"}, - {Top: 300, Left: 95, Top2: 300 + 5, Left2: 95 + 1, Angle: "0deg"}, + {Top: 300, Left: 380, Top2: 300 + 5, Left2: 380 + 1, Angle: "0deg"}, + {Top: 300, Left: 210, Top2: 300 + 5, Left2: 210 + 1, Angle: "0deg"}, + {Top: 300, Left: 40, Top2: 300 + 5, Left2: 40 + 1, Angle: "0deg"}, } var card string @@ -1121,11 +1121,11 @@ func drawCountDownStyle(evt PokerWaitTurnEvent) string { } else if evt.Idx == 2 { html += `#countdown3 { top: 250px; left: 530px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` } else if evt.Idx == 3 { - html += `#countdown4 { top: 300px; left: 485px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` + html += `#countdown4 { top: 300px; left: 380px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` } else if evt.Idx == 4 { - html += `#countdown5 { top: 300px; left: 300px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` + html += `#countdown5 { top: 300px; left: 210px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` } else if evt.Idx == 5 { - html += `#countdown6 { top: 300px; left: 95px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` + html += `#countdown6 { top: 300px; left: 40px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` } html += "</style>" return html @@ -1272,27 +1272,27 @@ body { #seat1 { position: absolute; top: 80px; left: 700px; } #seat2 { position: absolute; top: 200px; left: 670px; } #seat3 { position: absolute; top: 300px; left: 610px; } -#seat4 { position: absolute; top: 380px; left: 485px; } -#seat5 { position: absolute; top: 380px; left: 300px; } -#seat6 { position: absolute; top: 380px; left: 95px; } +#seat4 { position: absolute; top: 380px; left: 380px; } +#seat5 { position: absolute; top: 380px; left: 210px; } +#seat6 { position: absolute; top: 380px; left: 40px; } #seat1_cash { position: absolute; top: 100px; left: 700px; } #seat2_cash { position: absolute; top: 220px; left: 670px; } #seat3_cash { position: absolute; top: 320px; left: 610px; } -#seat4_cash { position: absolute; top: 400px; left: 485px; } -#seat5_cash { position: absolute; top: 400px; left: 300px; } -#seat6_cash { position: absolute; top: 400px; left: 95px; } +#seat4_cash { position: absolute; top: 400px; left: 380px; } +#seat5_cash { position: absolute; top: 400px; left: 210px; } +#seat6_cash { position: absolute; top: 400px; left: 40px; } #seat1Pot { position: absolute; top: 80px; left: 530px; } #seat2Pot { position: absolute; top: 170px; left: 530px; } #seat3Pot { position: absolute; top: 230px; left: 530px; } -#seat4Pot { position: absolute; top: 280px; left: 485px; } -#seat5Pot { position: absolute; top: 280px; left: 300px; } -#seat6Pot { position: absolute; top: 280px; left: 95px; } +#seat4Pot { position: absolute; top: 280px; left: 380px; } +#seat5Pot { position: absolute; top: 280px; left: 210px; } +#seat6Pot { position: absolute; top: 280px; left: 40px; } .takeSeat1 { position: absolute; top: 80px; left: 700px; } .takeSeat2 { position: absolute; top: 200px; left: 670px; } .takeSeat3 { position: absolute; top: 300px; left: 610px; } -.takeSeat4 { position: absolute; top: 333px; left: 485px; } -.takeSeat5 { position: absolute; top: 333px; left: 300px; } -.takeSeat6 { position: absolute; top: 333px; left: 95px; } +.takeSeat4 { position: absolute; top: 333px; left: 380px; } +.takeSeat5 { position: absolute; top: 333px; left: 210px; } +.takeSeat6 { position: absolute; top: 333px; left: 40px; } #actionsDiv { position: absolute; top: 450px; left: 0; display: flex; } #dealBtn { width: 80px; height: 30px; } #unSitBtn { width: 80px; height: 30px; } @@ -1436,7 +1436,7 @@ func PokerHandler(c echo.Context) error { send(cssReset) send(pokerCss) - //send(`<script>document.onclick = function(e) { console.log(e.x, e.y); };</script>`) // TODO: dev only + send(`<script>document.onclick = function(e) { console.log(e.x, e.y); };</script>`) // TODO: dev only send(buildCardsHtml()) send(buildTakeSeatHtml(authUser, g, roomID)) send(buildSeatsHtml(g))