diff options
-rw-r--r-- | assets/style.css | 7 | ||||
-rw-r--r-- | components/actions_table.html | 16 | ||||
-rw-r--r-- | 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"}} -<table> +<table id="usertable"> <tr> <th>ID</th> <th>BurnTime</th> @@ -11,9 +11,13 @@ <td>{{.Score}}</td> </tr> </table> +<div class="actiontable"> +<p>ActionTypePlus</p> <table> <tr> - <th>ActionTypePlus</th> + <th>Name</th> + <th>Magnitude</th> + <th>Repeatable</th> </tr> {{range $action := .Actions}} {{if eq $action.Type "ActionTypePlus"}} @@ -25,9 +29,14 @@ {{end}} {{end}} </table> +</div> +<div class="actiontable"> +<p>ActionTypeMinus</p> <table> <tr> - <th>ActionTypeMinus</th> + <th>Name</th> + <th>Magnitude</th> + <th>Repeatable</th> </tr> {{range $action := .Actions}} {{if eq $action.Type "ActionTypeMinus"}} @@ -39,4 +48,5 @@ {{end}} {{end}} </table> +</div> {{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 { |