diff --git a/docker/ss-atlas/internal/handlers/routes.go b/docker/ss-atlas/internal/handlers/routes.go index 9bb15f9..713ffd8 100644 --- a/docker/ss-atlas/internal/handlers/routes.go +++ b/docker/ss-atlas/internal/handlers/routes.go @@ -25,7 +25,8 @@ type App struct { func NewRouter(cfg *config.Config, sc *ssstripe.Client, lc *ldap.Client, sw *swarm.Client) http.Handler { tmplPattern := filepath.Join(cfg.TemplatePath, "pages", "*.html") - tmpl := template.Must(template.ParseGlob(tmplPattern)) + partialsPattern := filepath.Join(cfg.TemplatePath, "partials", "*.html") + tmpl := template.Must(template.Must(template.ParseGlob(partialsPattern)).ParseGlob(tmplPattern)) app := &App{ cfg: cfg, diff --git a/docker/ss-atlas/templates/pages/activate.html b/docker/ss-atlas/templates/pages/activate.html index 9211cf1..c2c4004 100644 --- a/docker/ss-atlas/templates/pages/activate.html +++ b/docker/ss-atlas/templates/pages/activate.html @@ -61,6 +61,7 @@ display: block; } + {{template "analytics"}}
diff --git a/docker/ss-atlas/templates/pages/dashboard.html b/docker/ss-atlas/templates/pages/dashboard.html index e0c2668..503d718 100644 --- a/docker/ss-atlas/templates/pages/dashboard.html +++ b/docker/ss-atlas/templates/pages/dashboard.html @@ -127,6 +127,7 @@ user-select: all; } + {{template "analytics"}}
diff --git a/docker/ss-atlas/templates/pages/landing.html b/docker/ss-atlas/templates/pages/landing.html index ba351c9..5fddebe 100644 --- a/docker/ss-atlas/templates/pages/landing.html +++ b/docker/ss-atlas/templates/pages/landing.html @@ -90,6 +90,7 @@ user-select: all; } + {{template "analytics"}}
diff --git a/docker/ss-atlas/templates/pages/welcome.html b/docker/ss-atlas/templates/pages/welcome.html index bb99202..939309d 100644 --- a/docker/ss-atlas/templates/pages/welcome.html +++ b/docker/ss-atlas/templates/pages/welcome.html @@ -143,6 +143,7 @@ cursor: not-allowed; } + {{template "analytics"}}
diff --git a/docker/ss-atlas/templates/partials/analytics.html b/docker/ss-atlas/templates/partials/analytics.html new file mode 100644 index 0000000..65af29b --- /dev/null +++ b/docker/ss-atlas/templates/partials/analytics.html @@ -0,0 +1,25 @@ +{{define "analytics"}} + + + + + + +{{end}}