gnocchi

Golang weight tracking application
Log | Files | Refs

commit 6c7a421742cfbf95682f9dd418926d613f046bb9
parent f8b9aaf96fca83cacb0a47db5a8fc324c32069a0
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Wed,  2 Sep 2026 12:47:29 +0100

Sort CSS and inline current date

Diffstat:
Mmain.go | 30+++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/main.go b/main.go @@ -218,36 +218,40 @@ func handleIndex(w http.ResponseWriter, r *http.Request) { .card h2{margin-bottom:12px} .card,body{padding:16px} .card{background:#222;border-radius:12px;margin-bottom:16px;border:1px solid #333;box-shadow:none} - .date-label{font-size:.85rem;color:#777;margin-bottom:8px} - .logged,table{font-size:.9rem} + .date-label,.heading-row h2{margin-bottom:0} + .date-label{font-size:.85rem;color:#777;margin-left:auto} + .heading-row{display:flex;align-items:baseline;gap:8px;margin-bottom:12px} .input-row{display:flex;gap:8px;align-items:center} - .logged{color:#7cbf7c;font-weight:600;margin-top:8px} + .logged,table{font-size:.9rem} + .logged,tr:first-child td{font-weight:600} + .logged{color:#7cbf7c;margin-top:8px} body{font-family:monospace;background:#1a1a1a;max-width:600px;margin:0 auto} button:active{opacity:.8} button:hover{background:#2e2e2e} button{padding:10px 20px;background:#2a2a2a;border:1px solid #333;border-radius:8px;cursor:pointer;white-space:nowrap} + details summary h2{display:inline} + details summary::after{content:" ▸";color:#777} + details summary::-webkit-details-marker{display:none} + details summary:hover{color:#5b9bd5} + details summary{cursor:pointer;list-style:none} + details[open] summary::after{content:" ▾"} input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none} input[type=number]{flex:1;font-size:1.4rem;padding:10px 14px;border:2px solid #333;border-radius:8px;background:#1a1a1a;color:#d4d4d4;-moz-appearance:textfield} + svg text{fill:#d4d4d4} svg,table{width:100%} svg{height:auto;display:block} - svg text{fill:#d4d4d4} 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: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} - details summary:hover{color:#5b9bd5} - details summary::after{content:" ▸";color:#777} - details[open] summary::after{content:" ▾"} </style> </head> <body> <div class="card"> - <h2>Log today's weight</h2> - <p class="date-label">` + today + `</p> + <div class="heading-row"> + <h2>Log today's weight</h2> + <p class="date-label">` + today + `</p> + </div> <form method="POST" action="/submit"> <div class="input-row"> <input type="number" name="weight" step="0.1" min="30" max="300"