dkforest

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

commit 08e46093abd637b81d7d9fa38b5b531fbaa0175b
parent fe51865024820cfe29955e86e76ca8fdfd021f89
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu,  8 Jun 2023 12:20:26 -0700

cleanup

Diffstat:
Mpkg/web/handlers/streamModals/codeModal.go | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/streamModals/codeModal.go b/pkg/web/handlers/streamModals/codeModal.go @@ -6,6 +6,7 @@ import ( "dkforest/pkg/utils" "dkforest/pkg/web/handlers/interceptors/command" "strconv" + "strings" ) const name = "code" @@ -47,10 +48,15 @@ func (m *CodeModal) Handle(topic, csrf string, msgTyp database.ChatMessageType, } func getCss() string { - return `.code-modal { display: block; width: calc(100% - 185px - 100px); height: calc(100% - 50px); position: fixed; top: 0; left: calc(50% - ((100% - 185px - 100px)/2) - 92px); background-color: gray; z-index: 999; border-radius: 5px; } + return strings.Join(strings.Split(` +.code-modal { + display: block; width: calc(100% - 185px - 100px); height: calc(100% - 50px); + position: fixed; top: 0; left: calc(50% - ((100% - 185px - 100px)/2) - 92px); + background-color: gray; z-index: 999; border-radius: 5px; +} .code-modal .wrapper { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 30px; } .code-modal .wrapper textarea { width: 100%; height: 100%; color: #fff; background-color: rgba(79,79,79,1); border: 1px solid rgba(90,90,90,1); } - .code-modal .controls { position: absolute; left: 10px; right: 10px; bottom: 5px; }` + .code-modal .controls { position: absolute; left: 10px; right: 10px; bottom: 5px; }`, "\n"), " ") } func getCodeModalHTML(codeModalIdx int, roomName, csrf string, msgTyp database.ChatMessageType) string {