diff --git a/cmd/sunlight/home.html b/cmd/sunlight/home.html index 43e7f38..b688245 100644 --- a/cmd/sunlight/home.html +++ b/cmd/sunlight/home.html @@ -72,14 +72,21 @@
{{ .PublicKeyPEM }}
-
+
+ {{ if not .FinalTree.Size }}
+ {{ end }}
{{ end }}
diff --git a/cmd/sunlight/sunlight.go b/cmd/sunlight/sunlight.go
index 4c903c9..4ab6685 100644
--- a/cmd/sunlight/sunlight.go
+++ b/cmd/sunlight/sunlight.go
@@ -346,7 +346,9 @@ type logInfo struct {
//go:embed home.html
var homeHTML string
-var homeTmpl = template.Must(template.New("home").Parse(homeHTML))
+var homeTmpl = template.Must(template.New("home").Funcs(template.FuncMap{
+ "timestamp": func(ms int64) string { return time.UnixMilli(ms).UTC().Format(time.RFC3339) },
+}).Parse(homeHTML))
func main() {
fs := flag.NewFlagSet("sunlight", flag.ExitOnError)