version build

This commit is contained in:
Krzysztof
2025-08-03 12:17:15 +02:00
parent 27e89b297a
commit 17d11decaa
10 changed files with 60 additions and 31 deletions

View File

@@ -7,20 +7,23 @@ import (
"uptimemonitor"
"uptimemonitor/form"
"uptimemonitor/html"
"uptimemonitor/pkg/version"
"golang.org/x/crypto/bcrypt"
)
func (h *Handler) LoginPage() http.HandlerFunc {
type data struct {
Form form.LoginForm
Version string
Form form.LoginForm
}
tmpl := template.Must(template.ParseFS(html.FS, "layout.html", "login.html"))
return func(w http.ResponseWriter, r *http.Request) {
tmpl.Execute(w, data{
Form: form.LoginForm{},
Version: version.Version,
Form: form.LoginForm{},
})
}
}