this repo has no description
1package state
2
3import (
4 "encoding/json"
5 "net/http"
6)
7
8// https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest
9// https://www.w3.org/TR/appmanifest/
10var manifestData = map[string]any{
11 "name": "tangled",
12 "description": "tightly-knit social coding.",
13 "icons": []map[string]string{
14 {
15 "src": "/static/logos/dolly.svg",
16 "sizes": "144x144",
17 },
18 },
19 "start_url": "/",
20 "id": "https://tangled.org",
21 "display": "standalone",
22 "background_color": "#111827",
23 "theme_color": "#111827",
24}
25
26func (p *State) WebAppManifest(w http.ResponseWriter, r *http.Request) {
27 w.Header().Set("Content-Type", "application/manifest+json")
28 json.NewEncoder(w).Encode(manifestData)
29}