dkforest

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

commit 38a1003003bd8b57183055b680079b8a987326ba
parent 5811aa734ba562a9252cf3d55adad7f9c40f4261
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue,  5 Dec 2023 23:09:29 -0500

UI

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -323,6 +323,9 @@ func dealerThread(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"}, } var card string @@ -711,7 +714,7 @@ func colorForCard1(name string) string { } func buildYourCardsHtml(authUser *database.User, g *PokerGame) string { - html := `<div style="position: absolute; top: 450px; left: 200px;"><div id="yourCard1"></div><div id="yourCard2"></div></div>` + html := `<div style="position: absolute; top: 480px; left: 200px;"><div id="yourCard1"></div><div id="yourCard2"></div></div>` if g.Ongoing != nil { cards := make([]PlayerCard, 0) for _, p := range g.Ongoing.Players { @@ -776,7 +779,7 @@ func buildCountdownsHtml() (html string) { func buildActionsBtns(roomID string) string { return ` -<div style="position: absolute; top: 400px; left: 200px;"> +<div style="position: absolute; top: 430px; left: 200px;"> <iframe src="/poker/` + roomID + `/bet" id="betBtn"></iframe> <iframe src="/poker/` + roomID + `/call" id="callBtn"></iframe> <iframe src="/poker/` + roomID + `/check" id="checkBtn"></iframe> @@ -896,6 +899,12 @@ func drawCountDownStyle(evt PokerWaitTurnEvent) string { html += `#countdown2 { top: 150px; left: 574px; display: block; animation: time calc(var(--duration) * 1s) steps(1000, start) forwards; }` } 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; }` + } else if evt.Idx == 4 { + html += `#countdown5 { top: 300px; left: 300px; 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 += "</style>" return html @@ -1034,9 +1043,15 @@ 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; } #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; } #seat1Pot { position: absolute; top: 80px; left: 500px; } .takeSeat1 { position: absolute; top: 80px; left: 700px; } .takeSeat2 { position: absolute; top: 200px; left: 670px; } @@ -1044,8 +1059,8 @@ body { .takeSeat4 { position: absolute; top: 333px; left: 485px; } .takeSeat5 { position: absolute; top: 333px; left: 300px; } .takeSeat6 { position: absolute; top: 333px; left: 95px; } -#dealBtn { position: absolute; top: 400px; left: 50px; width: 80px; height: 30px; } -#unSitBtn { position: absolute; top: 430px; left: 50px; width: 80px; height: 30px; } +#dealBtn { position: absolute; top: 430px; left: 50px; width: 80px; height: 30px; } +#unSitBtn { position: absolute; top: 460px; left: 50px; width: 80px; height: 30px; } #checkBtn { width: 60px; height: 30px; } #foldBtn { width: 50px; height: 30px; } #callBtn { width: 50px; height: 30px; } @@ -1060,7 +1075,7 @@ body { #winner { position: absolute; top: 265px; left: 250px; } #yourCard1 { font-size: 22px; display: inline-block; margin-right: 15px; } #yourCard2 { font-size: 22px; display: inline-block; } -#errorMsg { position: absolute; top: 500px; left: 150px; color: darkred; } +#errorMsg { position: absolute; top: 530px; left: 150px; color: darkred; } .timer {