feat: add PWA support and mobile-responsive layouts

- Add web app manifest, maskable/apple-touch icons, and a production-only
  service worker that caches the app shell for offline start
- Improve mobile UX: responsive breakpoints from ~320px, 44px touch
  targets, safe-area insets, dvh heights, 16px inputs to avoid iOS zoom
- Serve .webmanifest with correct content type in the Go static handler
- Document PWA behavior and mobile features in the README
This commit is contained in:
Tronax 2026-08-25 19:12:12 +02:00
parent f220d96e3b
commit cbc03c56bf
Signed by: Tronax
SSH key fingerprint: SHA256:2pKKXDZucWvaF/GzXNz0FY53EAO1YDLN80bqS+TTz/o
18 changed files with 277 additions and 9 deletions

View file

@ -78,6 +78,9 @@ func (s *Server) Router() http.Handler {
static := s.Cfg.StaticDir
r.Get("/*", func(w http.ResponseWriter, req *http.Request) {
p := filepath.Join(static, filepath.Clean(req.URL.Path))
if strings.HasSuffix(p, ".webmanifest") {
w.Header().Set("Content-Type", "application/manifest+json")
}
if st, err := os.Stat(p); err == nil && !st.IsDir() {
http.ServeFile(w, req, p)
return