diff --git a/cmd/server/assets/favicon.ico b/cmd/server/assets/favicon.ico
new file mode 100644
index 000000000..0356c6c89
Binary files /dev/null and b/cmd/server/assets/favicon.ico differ
diff --git a/cmd/server/assets/header.html b/cmd/server/assets/header.html
index 2d995f255..7e4ae3368 100644
--- a/cmd/server/assets/header.html
+++ b/cmd/server/assets/header.html
@@ -3,6 +3,16 @@
+
+
+
+
+
+
+
+
+
+
System admin
Realms
{{end}}
-
+
{{if gt (len .currentUser.Realms) 1}}
Change realm
diff --git a/cmd/server/assets/static/android-chrome-192x192.png b/cmd/server/assets/static/android-chrome-192x192.png
new file mode 100644
index 000000000..3826cb9ca
Binary files /dev/null and b/cmd/server/assets/static/android-chrome-192x192.png differ
diff --git a/cmd/server/assets/static/android-chrome-512x512.png b/cmd/server/assets/static/android-chrome-512x512.png
new file mode 100644
index 000000000..4f4a7270d
Binary files /dev/null and b/cmd/server/assets/static/android-chrome-512x512.png differ
diff --git a/cmd/server/assets/static/apple-touch-icon.png b/cmd/server/assets/static/apple-touch-icon.png
new file mode 100644
index 000000000..cddc8aeb2
Binary files /dev/null and b/cmd/server/assets/static/apple-touch-icon.png differ
diff --git a/cmd/server/assets/static/browserconfig.xml b/cmd/server/assets/static/browserconfig.xml
new file mode 100644
index 000000000..748e8459c
--- /dev/null
+++ b/cmd/server/assets/static/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #ff0000
+
+
+
diff --git a/cmd/server/assets/static/favicon-16x16.png b/cmd/server/assets/static/favicon-16x16.png
new file mode 100644
index 000000000..c736c4af7
Binary files /dev/null and b/cmd/server/assets/static/favicon-16x16.png differ
diff --git a/cmd/server/assets/static/favicon-32x32.png b/cmd/server/assets/static/favicon-32x32.png
new file mode 100644
index 000000000..0bae1d449
Binary files /dev/null and b/cmd/server/assets/static/favicon-32x32.png differ
diff --git a/cmd/server/assets/static/favicon.ico b/cmd/server/assets/static/favicon.ico
new file mode 100644
index 000000000..0356c6c89
Binary files /dev/null and b/cmd/server/assets/static/favicon.ico differ
diff --git a/cmd/server/assets/static/mstile-144x144.png b/cmd/server/assets/static/mstile-144x144.png
new file mode 100644
index 000000000..6d1ae6455
Binary files /dev/null and b/cmd/server/assets/static/mstile-144x144.png differ
diff --git a/cmd/server/assets/static/mstile-150x150.png b/cmd/server/assets/static/mstile-150x150.png
new file mode 100644
index 000000000..34bf0d815
Binary files /dev/null and b/cmd/server/assets/static/mstile-150x150.png differ
diff --git a/cmd/server/assets/static/mstile-310x150.png b/cmd/server/assets/static/mstile-310x150.png
new file mode 100644
index 000000000..b0003f618
Binary files /dev/null and b/cmd/server/assets/static/mstile-310x150.png differ
diff --git a/cmd/server/assets/static/mstile-310x310.png b/cmd/server/assets/static/mstile-310x310.png
new file mode 100644
index 000000000..b2964a67a
Binary files /dev/null and b/cmd/server/assets/static/mstile-310x310.png differ
diff --git a/cmd/server/assets/static/mstile-70x70.png b/cmd/server/assets/static/mstile-70x70.png
new file mode 100644
index 000000000..4d9ad384e
Binary files /dev/null and b/cmd/server/assets/static/mstile-70x70.png differ
diff --git a/cmd/server/assets/static/safari-pinned-tab.svg b/cmd/server/assets/static/safari-pinned-tab.svg
new file mode 100644
index 000000000..b09cf5281
--- /dev/null
+++ b/cmd/server/assets/static/safari-pinned-tab.svg
@@ -0,0 +1,60 @@
+
+
+
diff --git a/cmd/server/assets/static/site.webmanifest b/cmd/server/assets/static/site.webmanifest
new file mode 100644
index 000000000..7ea2fc852
--- /dev/null
+++ b/cmd/server/assets/static/site.webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "Verification Server",
+ "short_name": "Verification Server",
+ "icons": [
+ {
+ "src": "/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
diff --git a/cmd/server/main.go b/cmd/server/main.go
index f8901d122..1279fb440 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -20,6 +20,7 @@ import (
"fmt"
"net/http"
"os"
+ "path/filepath"
"strconv"
"github.com/google/exposure-notifications-verification-server/pkg/buildinfo"
@@ -184,6 +185,12 @@ func realMain(ctx context.Context) error {
requireSystemAdmin := middleware.RequireAdmin(ctx, h)
rateLimit := httplimiter.Handle
+ {
+ static := filepath.Join(config.AssetsPath, "static")
+ fs := http.FileServer(http.Dir(static))
+ r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", fs))
+ }
+
{
loginController := login.New(ctx, auth, config, db, h)
{
diff --git a/pkg/render/render.go b/pkg/render/render.go
index b35f475eb..a237ed848 100644
--- a/pkg/render/render.go
+++ b/pkg/render/render.go
@@ -116,6 +116,10 @@ func loadTemplates(tmpl *template.Template, root string) error {
return nil
}
+ if !strings.HasSuffix(info.Name(), ".html") {
+ return nil
+ }
+
if _, err := tmpl.ParseFiles(path); err != nil {
return fmt.Errorf("failed to parse %s: %w", path, err)
}