diff --git a/api/main.go b/api/main.go index b9400f6..53e3bcd 100644 --- a/api/main.go +++ b/api/main.go @@ -97,7 +97,11 @@ func bulkSignature(c *gin.Context) { func setupRouter() *gin.Engine { r := gin.Default() - t := template.Must(template.ParseFS(tfs, "templates/*")) + t := template.Must(template.New("").Funcs(template.FuncMap{ + "inc": func(i int) int { + return i + 1 + }, + }).ParseFS(tfs, "templates/*")) r.SetHTMLTemplate(t) r.Use(cors) diff --git a/api/templates/index.html b/api/templates/index.html index 8bde539..c6e8b80 100644 --- a/api/templates/index.html +++ b/api/templates/index.html @@ -33,11 +33,13 @@ color: white; background-color: dodgerblue; font-weight: bold; + padding: 1px; } .key { color: deepskyblue; background-color: black; + padding: 1px; } @media all and (max-width: 500px) { @@ -71,21 +73,22 @@ - 🔑 Private Key + 🔑 Private Key
- 🚩 Public Address + 📥 Public Address + {{ $index := 1 }} {{range $k,$a := .}} - 🔑
- {{$k}}
- 🚩
- {{$a}} + (#{{$index}})
+ 🔑 {{$k}}
+ 📥 {{$a}} + {{ $index = inc $index }} {{end}}