diff --git a/cmd/chromad/main.go b/cmd/chromad/main.go index 544f68e..2517f0c 100644 --- a/cmd/chromad/main.go +++ b/cmd/chromad/main.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "fmt" "html/template" "log" "net/http" @@ -35,6 +36,7 @@ type context struct { SelectedStyle string Styles []string CSRFField template.HTML + Version string } func index(w http.ResponseWriter, r *http.Request) { @@ -122,6 +124,7 @@ func newContext(r *http.Request) context { ctx := context{ SelectedStyle: "monokailight", CSRFField: csrf.TemplateField(r), + Version: fmt.Sprintf("%d", staticFiles.Time().Unix()), } style := styles.Get(ctx.SelectedStyle) if style == nil { diff --git a/cmd/chromad/templates/index.html.tmpl b/cmd/chromad/templates/index.html.tmpl index 6e1253e..2ecf426 100644 --- a/cmd/chromad/templates/index.html.tmpl +++ b/cmd/chromad/templates/index.html.tmpl @@ -10,14 +10,13 @@ #output { {{.Background}}; - overflow-x: scroll; } #output pre { padding: 0; } - +