PWA Manifest JSON

face-detect
Noah Petherbridge 2023-11-25 17:15:21 -08:00
parent 3d4c728d75
commit 22e8c9129b
9 changed files with 112 additions and 0 deletions

View File

@ -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")
})
}

View File

@ -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")())

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 135.46667 135.46667"
version="1.1"
id="svg1"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
sodipodi:docname="favicon.svg"
inkscape:export-filename="favicon-512.png"
inkscape:export-xdpi="1024"
inkscape:export-ydpi="1024"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.94615212"
inkscape:cx="204.51257"
inkscape:cy="188.65888"
inkscape:window-width="1920"
inkscape:window-height="957"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<text
xml:space="preserve"
style="font-size:105.833px;letter-spacing:-0.973667px;fill:#000000;stroke-width:0.264583"
x="-2.8863823"
y="96.620369"
id="text1"><tspan
sodipodi:role="line"
id="tspan1"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:105.833px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans Bold';letter-spacing:-0.973667px;stroke-width:0.264583"
x="-2.8863823"
y="96.620369"
dx="0"><tspan
style="font-size:105.833px;fill:#0077ff;fill-opacity:1"
id="tspan3">n</tspan><tspan
style="font-size:105.833px;fill:#ff77ff;fill-opacity:1"
id="tspan4">s</tspan></tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

42
web/static/manifest.json Normal file
View File

@ -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"
}
]
}

View File

@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="/static/css/bulma-prefers-dark.css?build={{.BuildHash}}" />
<link rel="stylesheet" href="/static/fontawesome-free-6.1.2-web/css/all.css">
<link rel="stylesheet" href="/static/css/theme.css?build={{.BuildHash}}">
<link rel="manifest" href="/manifest.json">
<title>{{template "title" .}} - {{ .Title }}</title>
</head>
<body>