Skip to content

Commit

Permalink
web-ui: show version in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
gi8lino committed Jun 12, 2024
1 parent 9a7af12 commit 026ee5d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
)

const version = "0.6.7"
const version = "0.6.8"

//go:embed web
var templates embed.FS
Expand Down
10 changes: 10 additions & 0 deletions web/static/css/heartbeats.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,13 @@ th {
border-bottom: 10px solid #f56565;
cursor: pointer;
}

/* footer */
.version-footer {
position: fixed;
bottom: 10px;
width: 100%;
text-align: center;
font-size: 10px;
color: #6b7280;
}
4 changes: 4 additions & 0 deletions web/templates/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{define "footer"}}
<div class="version-footer">
Version: {{ .Version }}
</div>
<script src="/static/js/heartbeats.js"></script>
{{end}}

2 changes: 1 addition & 1 deletion web/templates/heartbeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1 class="text-3xl font-bold mb-6 text-center">Heartbeat</h1>
</table>
</div>
</div>
{{ template "footer" }}
{{ template "footer" . }}
</body>
</html>
{{end}}
Expand Down
1 change: 1 addition & 0 deletions web/templates/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ <h1 class="text-3xl font-bold mb-6 text-center">
<a href="/" class="text-blue-500 hover:underline">Back to Heartbeats</a>
</div>
</div>
{{ template "footer" . }}
</body>
</html>
{{end}}

0 comments on commit 026ee5d

Please sign in to comment.