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>>> diff --git a/frontend/login.html b/frontend/login.html index 67fc012..c67556d 100644 --- a/frontend/login.html +++ b/frontend/login.html @@ -47,26 +47,5 @@ - + <<<.Footer>>> diff --git a/frontend/reset-password.html b/frontend/reset-password.html index 58a4b47..4c1eede 100644 --- a/frontend/reset-password.html +++ b/frontend/reset-password.html @@ -37,26 +37,5 @@ - + <<<.Footer>>> diff --git a/frontend/signup.html b/frontend/signup.html index 221622c..e2169cc 100644 --- a/frontend/signup.html +++ b/frontend/signup.html @@ -59,26 +59,5 @@ - + <<<.Footer>>>