diff --git a/api/router_static.go b/api/router_static.go index eb9be62..7dffd6c 100644 --- a/api/router_static.go +++ b/api/router_static.go @@ -22,6 +22,7 @@ type staticAssetPlugs struct { type staticHtmlPlugs struct { CdnPrefix string + Footer template.HTML } func initStaticRouter(router *mux.Router) error { @@ -80,6 +81,12 @@ func initStaticRouter(router *mux.Router) error { } } + footer, err := ioutil.ReadFile(os.Getenv("STATIC") + string(os.PathSeparator) + "footer.html") + if err != nil { + logger.Errorf("cannot read file footer.html: %v", err) + return err + } + pages := []string{ "login", "forgot", @@ -108,7 +115,7 @@ func initStaticRouter(router *mux.Router) error { } var buf bytes.Buffer - t.Execute(&buf, &staticHtmlPlugs{CdnPrefix: os.Getenv("CDN_PREFIX")}) + t.Execute(&buf, &staticHtmlPlugs{CdnPrefix: os.Getenv("CDN_PREFIX"), Footer: template.HTML(string(footer))}) html[page] = buf.String() } diff --git a/frontend/footer.html b/frontend/footer.html new file mode 100644 index 0000000..d6b91bb --- /dev/null +++ b/frontend/footer.html @@ -0,0 +1,22 @@ +
diff --git a/frontend/forgot.html b/frontend/forgot.html index 4c2d168..803edd0 100644 --- a/frontend/forgot.html +++ b/frontend/forgot.html @@ -29,26 +29,5 @@ - + <<<.Footer>>>