diff --git a/main.go b/main.go index 6889651..f3a0aa0 100644 --- a/main.go +++ b/main.go @@ -113,8 +113,8 @@ func NewApp() *gin.Engine { for _, file := range files { stash = append(stash, file.Name()) } - c.JSON(200, gin.H{ - "data": stash, + c.HTML(200, "stash.tmpl", gin.H{ + "stash": stash, }) }) diff --git a/static/css/index.css b/static/css/index.css index 81a28eb..37d45a1 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -38,3 +38,36 @@ body { width: 100%; border: none; } +#stash-pane { + position: fixed; + top: 0; + width: 60%; + height: 100%; + font-size: 16px; +} +#stash-pane #controls { + color: #2e2e2e; + position: absolute; + right: 0; + top: 0; + z-index: 1; + margin: 5px 5px 0 0; +} +#stash-pane #controls a { + font-weight: bold; + text-decoration: none; + color: #2e2e2e; +} +th, td { + text-align: left; + padding: 8px; + border-bottom: 1px solid #ddd; + font-size: 16px; +} + +tr:nth-child(even){background-color: #f2f2f2} + +th { + background-color: #2e2e2e; + color: white; +} \ No newline at end of file diff --git a/templates/index.tmpl b/templates/index.tmpl index 10e3459..d607b1f 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -14,6 +14,7 @@