From 878b071112d7484fd9b22d70ee06afe895de9018 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Mon, 1 Apr 2024 17:04:28 +0400 Subject: Chore: style change --- assets/style.css | 7 +++++++ components/actions_table.html | 16 +++++++++++++--- internal/handlers/main.go | 3 ++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/assets/style.css b/assets/style.css index 7d04e1f..821a499 100644 --- a/assets/style.css +++ b/assets/style.css @@ -26,3 +26,10 @@ table{ tr{ border: 1px solid white; } +#usertable{ + display: block ruby; +} +.actiontable{ + display: inline flow-root; + margin-inline: 10px; +} diff --git a/components/actions_table.html b/components/actions_table.html index 0e9ecc1..f0c6572 100644 --- a/components/actions_table.html +++ b/components/actions_table.html @@ -1,5 +1,5 @@ {{define "UserScore"}} - +
@@ -11,9 +11,13 @@
ID BurnTime{{.Score}}
+
+

ActionTypePlus

- + + + {{range $action := .Actions}} {{if eq $action.Type "ActionTypePlus"}} @@ -25,9 +29,14 @@ {{end}} {{end}}
ActionTypePlusNameMagnitudeRepeatable
+
+
+

ActionTypeMinus

- + + + {{range $action := .Actions}} {{if eq $action.Type "ActionTypeMinus"}} @@ -39,4 +48,5 @@ {{end}} {{end}}
ActionTypeMinusNameMagnitudeRepeatable
+
{{end}} diff --git a/internal/handlers/main.go b/internal/handlers/main.go index 4abc8e1..38da212 100644 --- a/internal/handlers/main.go +++ b/internal/handlers/main.go @@ -58,7 +58,8 @@ func (h *Handlers) HandleForm(w http.ResponseWriter, r *http.Request) { h.log.Info("got postform request", "payload", r.PostForm) magnitude := uint8(1) mS := r.PostFormValue("magnitude") - if mS != "1" || mS != "" || mS != " " { + h.log.Info("showing magnitude send", "mS", mS) + if mS != "1" { u64, err := strconv.ParseUint(mS, 10, 64) magnitude = uint8(u64) if err != nil { -- cgit v1.2.3