From cbf7dfcef690dba3f7b83f77008be1bda0b4894c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dejan=20Ro=C5=BEi=C4=8D?= Date: Thu, 4 Dec 2025 13:59:21 +0100 Subject: [PATCH] modify dropdown menu --- main.go | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index fc38c30..476a20d 100644 --- a/main.go +++ b/main.go @@ -145,7 +145,15 @@ func handleAddSet(w http.ResponseWriter, r *http.Request) { return } - exercise := r.FormValue("exercise") + // NEW: exercise from dropdown + optional custom + selected := r.FormValue("exercise_select") + exerciseCustom := r.FormValue("exercise_custom") + + exercise := selected + if selected == "custom" { + exercise = exerciseCustom + } + repsStr := r.FormValue("reps") weightStr := r.FormValue("weight") @@ -464,11 +472,23 @@ const indexHTML = ` grid-template-columns: 1.1fr 0.9fr; } } + .flex-row { + display:flex; + gap:0.5rem; + align-items:center; + } + .flex-row input[type="text"] { + flex:1; + } + .small { + font-size:0.8rem; + color:#9ca3af; + }

Minimal Fitness Tracker

-

Simple self-hosted Go app – log sets, see rest times and training volume.

+

Simple self-hosted Go app – 5×5 friendly: pick standard lifts, track volume and rest.

@@ -490,9 +510,28 @@ const indexHTML = ` {{if .HasWorkout}}
+ +