gnocchi

Golang weight tracking application
Log | Files | Refs

commit c2761afedf8474d477465453b423e6613189c3f6
parent 76191472b87970ec764d4df63274a234b35ae332
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Mon,  3 Aug 2026 14:00:25 +0100

Now the recent table is at the bottom, order from most recent

Diffstat:
Mmain.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/main.go b/main.go @@ -185,7 +185,8 @@ func handleIndex(w http.ResponseWriter, r *http.Request) { } recentRows := "" - for _, e := range recent { + for i := len(recent) - 1; i >= 0; i-- { + e := recent[i] parts := strings.SplitN(e, ",", 2) date, val := parts[0], "" if len(parts) == 2 { @@ -233,7 +234,8 @@ func handleIndex(w http.ResponseWriter, r *http.Request) { table{border-collapse:collapse} td:last-child{text-align:right;font-variant-numeric:tabular-nums} td{padding:6px 4px;border-bottom:1px solid #333} - tr:last-child td{border-bottom:none;font-weight:600} + tr:first-child td{font-weight:600} + tr:last-child td{border-bottom:none} details summary{cursor:pointer;list-style:none} details summary::-webkit-details-marker{display:none} details summary h2{display:inline}