From 9d5dd8c35502e6b1b9a13e74b3cdbb41f33ca980 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Fri, 20 Sep 2024 15:03:27 -0600 Subject: [PATCH] Shorter SHA in footer --- handlers.go | 10 ++++++---- static/style/footer.css | 1 + templates/footer.html | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/handlers.go b/handlers.go index c57e505..f06f202 100644 --- a/handlers.go +++ b/handlers.go @@ -18,14 +18,16 @@ import ( ) type Footer struct { - BuildDate string - BuildId string + BuildDate string + BuildId string + BuildIdShort string } func makeFooter() Footer { return Footer{ - BuildDate: getBuildDate(), - BuildId: getGitSHA(), + BuildDate: getBuildDate(), + BuildId: getGitSHA(), + BuildIdShort: getGitSHA()[0:7], } } diff --git a/static/style/footer.css b/static/style/footer.css index 19ef0b6..8ec5fbf 100644 --- a/static/style/footer.css +++ b/static/style/footer.css @@ -1,6 +1,7 @@ .footer { display: flex; justify-content: space-evenly; + flex-wrap: wrap; color: lightgray; } diff --git a/templates/footer.html b/templates/footer.html index 7e318d2..4f87f43 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -5,7 +5,7 @@
Build ID: {{.Footer.BuildId}} + href="https://github.com/cwpearson/ytdlp-site/compare/{{.Footer.BuildId}}..master">{{.Footer.BuildIdShort}}
{{end}}