dkforest

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

commit 5fcdb9c0938f19745d892e902ddc831864b716ff
parent 7a145df278a462759e61f9d390c24b7d11ccdb6d
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 24 Dec 2023 15:25:45 -0500

UI

Diffstat:
Mpkg/web/handlers/poker/poker.go | 15+++++++++++++++
Apkg/web/public/img/throne.png | 0
2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -1866,6 +1866,7 @@ func buildSeatsHtml(g *PokerGame, authUser *database.User) (html string) { for i := range gPlayers { idxStr := itoa(i + 1) html += `<div class="seat" id="seat` + idxStr + `">` + html += ` <div class="throne"></div>` html += ` <iframe src="/poker/` + g.roomID.String() + `/sit/` + idxStr + `" class="takeSeat takeSeat` + idxStr + `"></iframe>` html += ` <div class="inner"></div>` html += ` <div id="seat` + idxStr + `_cash" class="cash"></div>` @@ -1901,11 +1902,13 @@ func drawSeatsStyle(authUser *database.User, g *PokerGame) string { html += drawSeatPotLabel(idxStr, itoa2(op.GetBet())) } } + html += fmt.Sprintf(`#seat%s .throne { display: none; }`, idxStr) } else { html += fmt.Sprintf(`#seat%s { border: 1px solid #333; }`, idxStr) html += fmt.Sprintf(`#seat%s .inner:before { content: ""; }`, idxStr) html += drawSeatCashLabel(idxStr, "") html += drawSeatStatusLabel(idxStr, "") + html += fmt.Sprintf(`#seat%s .throne { display: block; }`, idxStr) } } }) @@ -2273,6 +2276,8 @@ body { margin-left: auto; margin-right: auto; margin-top: 7px; + position: absolute; + left: 10px; } .seat { border: 1px solid #333; @@ -2286,6 +2291,16 @@ body { .seat .inner { display: flex; justify-content: center; } .seat .cash { display: flex; justify-content: center; } .seat .status { display: flex; justify-content: center; } +.seat .throne { + background-image: url(/public/img/throne.png); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + position: absolute; + width: 100%; + height: 90%; + opacity: 0.3; +} .dev_seat1_card1 { top: 55px; left: 610px; transform: rotateZ(-95deg); width:50px; height:70px; background-color: white; position: absolute; } .dev_seat1_card2 {} diff --git a/pkg/web/public/img/throne.png b/pkg/web/public/img/throne.png Binary files differ.