Shorter SHA in footer

This commit is contained in:
Carl Pearson
2024-09-20 15:03:27 -06:00
parent 171ba32134
commit 9d5dd8c355
3 changed files with 8 additions and 5 deletions

View File

@@ -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],
}
}

View File

@@ -1,6 +1,7 @@
.footer {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
color: lightgray;
}

View File

@@ -5,7 +5,7 @@
</div>
<div class="build-id">
Build ID: <a
href="https://github.com/cwpearson/ytdlp-site/compare/{{.Footer.BuildId}}..master">{{.Footer.BuildId}}</a>
href="https://github.com/cwpearson/ytdlp-site/compare/{{.Footer.BuildId}}..master">{{.Footer.BuildIdShort}}</a>
</div>
</div>
{{end}}