diff --git a/pkg/controller/index/index.go b/pkg/controller/index/index.go index f433427..a57b101 100644 --- a/pkg/controller/index/index.go +++ b/pkg/controller/index/index.go @@ -31,3 +31,10 @@ func Favicon() http.HandlerFunc { http.ServeFile(w, r, config.StaticPath+"/favicon.ico") }) } + +// PWA Manifest +func Manifest() http.HandlerFunc { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, config.StaticPath+"/manifest.json") + }) +} diff --git a/pkg/router/router.go b/pkg/router/router.go index eb1469d..7772260 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -27,6 +27,7 @@ func New() http.Handler { // Register controller endpoints. mux.HandleFunc("/", index.Create()) mux.HandleFunc("/favicon.ico", index.Favicon()) + mux.HandleFunc("/manifest.json", index.Manifest()) mux.HandleFunc("/about", index.StaticTemplate("about.html")()) mux.HandleFunc("/features", index.StaticTemplate("features.html")()) mux.HandleFunc("/faq", index.StaticTemplate("faq.html")()) diff --git a/web/static/img/favicon-192.png b/web/static/img/favicon-192.png new file mode 100644 index 0000000..fea6547 Binary files /dev/null and b/web/static/img/favicon-192.png differ diff --git a/web/static/img/favicon-512.png b/web/static/img/favicon-512.png new file mode 100644 index 0000000..3c27d20 Binary files /dev/null and b/web/static/img/favicon-512.png differ diff --git a/web/static/img/favicon.svg b/web/static/img/favicon.svg new file mode 100644 index 0000000..24dadfc --- /dev/null +++ b/web/static/img/favicon.svg @@ -0,0 +1,61 @@ + + + + + + + + ns + + diff --git a/web/static/img/screenshot-tall.png b/web/static/img/screenshot-tall.png new file mode 100644 index 0000000..f334926 Binary files /dev/null and b/web/static/img/screenshot-tall.png differ diff --git a/web/static/img/screenshot-wide.png b/web/static/img/screenshot-wide.png new file mode 100644 index 0000000..50c937e Binary files /dev/null and b/web/static/img/screenshot-wide.png differ diff --git a/web/static/manifest.json b/web/static/manifest.json new file mode 100644 index 0000000..4280518 --- /dev/null +++ b/web/static/manifest.json @@ -0,0 +1,42 @@ +{ + "short_name": "nonshy", + "name": "A social network for nudists and exhibitionists.", + "icons": [ + { + "src": "/static/img/favicon.svg", + "type": "image/svg+xml", + "sizes": "512x512" + }, + { + "src": "/static/img/favicon-512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "/static/img/favicon-192.png", + "type": "image/png", + "sizes": "192x192" + } + ], + "id": "/?source=pwa", + "start_url": "/me?source=pwa", + "background_color": "#17181c", + "display": "minimal-ui", + "scope": "/", + "theme_color": "#17181c", + "description": "A social network for nudists and exhibitionists.", + "screenshots": [ + { + "src": "/static/img/screenshot-tall.png", + "type": "image/png", + "sizes": "750x1334", + "form_factor": "narrow" + }, + { + "src": "/static/img/screenshot-wide.png", + "type": "image/png", + "sizes": "2048x1536", + "form_factor": "wide" + } + ] +} \ No newline at end of file diff --git a/web/templates/base.html b/web/templates/base.html index 58dc159..a8ae38f 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -11,6 +11,7 @@ + {{template "title" .}} - {{ .Title }}