From 6f874ba9b237a476254e22abbf47325dfaec4dc7 Mon Sep 17 00:00:00 2001 From: Andrew-71 Date: Thu, 28 Mar 2024 10:56:13 +0300 Subject: [PATCH] Fix previous days list order --- public/main.css | 15 ++++----------- routes.go | 3 ++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/public/main.css b/public/main.css index e28b99c..6431c15 100644 --- a/public/main.css +++ b/public/main.css @@ -29,12 +29,7 @@ textarea, input { margin-bottom: 1em; font-size: 18px; } - -input { - height: 2.5em; -} - -footer { margin-top: auto; } +input { height: 2.5em; } button { background-color: #f85552; @@ -48,16 +43,15 @@ button { margin: 4px 2px; border-radius: 4px; cursor: pointer; - max-width: 640px; width: 100%; } button:hover { background-color: #e66868; } - +footer { margin-top: auto; } header > h1, header > p { - margin-bottom:0; - margin-top:0; + margin-bottom: 0; + margin-top: 0; } /* Dark theme */ @@ -66,7 +60,6 @@ header > h1, header > p { color: #f5f0e1; background-color: #2c2825; } - textarea, input { color: #f5f0e1; background-color: #383030; diff --git a/routes.go b/routes.go index f51e038..49def25 100644 --- a/routes.go +++ b/routes.go @@ -82,7 +82,8 @@ func GetDays(w http.ResponseWriter, r *http.Request) { return } var daysFormatted []ListEntry - for _, v := range day { + for i, _ := range day { + v := day[len(day)-1-i] // This is suboptimal, but reverse order is better here dayString := v t, err := time.Parse(time.DateOnly, v) if err == nil {