dkforest

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

commit 644bfb5958af8a3764633c2bb90e5abc29be91ff
parent 58c1e84d6540f87bdfd28fdf9d8e13474d821b28
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 26 Dec 2022 17:07:54 -0800

donate page with qrcodes

Diffstat:
Mpkg/web/handlers/handlers.go | 4++++
Apkg/web/public/img/btc.png | 0
Apkg/web/public/img/qr-code-scan-icon.png | 0
Apkg/web/public/img/xmr.png | 0
Apkg/web/public/views/pages/donate.gohtml | 16++++++++++++++++
Mpkg/web/public/views/pages/home.gohtml | 4++++
Mpkg/web/web.go | 1+
7 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -2445,6 +2445,10 @@ func ChatCreateRoomHandler(c echo.Context) error { return c.Render(http.StatusOK, "chat-create-room", data) } +func DonateHandler(c echo.Context) error { + return c.Render(http.StatusOK, "donate", nil) +} + func ShopHandler(c echo.Context) error { getImgStr := func(img image.Image) string { buf := bytes.NewBuffer([]byte("")) diff --git a/pkg/web/public/img/btc.png b/pkg/web/public/img/btc.png Binary files differ. diff --git a/pkg/web/public/img/qr-code-scan-icon.png b/pkg/web/public/img/qr-code-scan-icon.png Binary files differ. diff --git a/pkg/web/public/img/xmr.png b/pkg/web/public/img/xmr.png Binary files differ. diff --git a/pkg/web/public/views/pages/donate.gohtml b/pkg/web/public/views/pages/donate.gohtml @@ -0,0 +1,15 @@ +{{ define "extra-head" }} +{{ end }} + +{{ define "content" }} + +<div class="container"> + <p>XMR: <span style="color: #eaac45;">83pJEonAgps6F61RSk6SAmFi4xmq4zVYmaDTk8eFGLE49dm1ZE2bLVaWqumHLRGU8gewV6wGffmhrV3RN35TXy8CK9UhWMa</span></p> + <img src="/public/img/xmr.png" width="240" alt="" class="img-thumbnail" /> + <hr /> + + <p>BTC: <span style="color: #eaac45;">bc1qup5rdsrxh5dfh9gxvdzwapdltxkc50wgda8n7t</span></p> + <img src="/public/img/btc.png" width="240" alt="" class="img-thumbnail" /> +</div> + +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/home.gohtml b/pkg/web/public/views/pages/home.gohtml @@ -278,6 +278,10 @@ BTC: <span style="color: #eaac45;">bc1qup5rdsrxh5dfh9gxvdzwapdltxkc50wgda8n7t</span><br /> XMR: <span style="color: #eaac45;">83pJEonAgps6F61RSk6SAmFi4xmq4zVYmaDTk8eFGLE49dm1ZE2bLVaWqumHLRGU8gewV6wGffmhrV3RN35TXy8CK9UhWMa</span> </p> + <a href="/donate"> + <img src="/public/img/qr-code-scan-icon.png" width="25" alt="" class="mb-1" /> + Click here for qrcode + </a> <hr /> diff --git a/pkg/web/web.go b/pkg/web/web.go @@ -90,6 +90,7 @@ func getMainServer() echo.HandlerFunc { authGroup.POST("/captcha-required", handlers.CaptchaRequiredHandler, middlewares.AuthRateLimitMiddleware(time.Second, 1)) authGroup.GET("/captcha", handlers.CaptchaHandler, middlewares.AuthRateLimitMiddleware(time.Second, 1)) authGroup.POST("/captcha", handlers.CaptchaHandler, middlewares.AuthRateLimitMiddleware(time.Second, 1)) + authGroup.GET("/donate", handlers.DonateHandler) authGroup.GET("/shop", handlers.ShopHandler) authGroup.GET("/chess", handlers.ChessHandler) authGroup.POST("/chess", handlers.ChessHandler)