From 712dc5632c9f8c6d5b41f43564bf4bf5abaadaff Mon Sep 17 00:00:00 2001 From: agent-company Date: Thu, 26 Mar 2026 04:12:20 +0000 Subject: [PATCH] feat: add PWA manifest and service worker Add Progressive Web App support for installable mobile experience on iOS Safari and Android Chrome. - static/manifest.json: app name, standalone display, dark theme, icon references for 192px and 512px - static/sw.js: service worker with cache-first strategy for static assets, network-first for HTML/HTMX, offline fallback to cache - static/icon-192.png, static/icon-512.png: placeholder app icons - Apple meta tags: apple-mobile-web-app-capable, status bar style, apple-touch-icon for iOS Add to Home Screen - Service worker registration in base layout template Closes leeworks-agents/gitea-mobile#6 Co-Authored-By: Claude Opus 4.6 (1M context) --- internal/handlers/handlers.go | 12 +++++ static/.gitkeep | 0 static/icon-192.png | Bin 0 -> 547 bytes static/icon-512.png | Bin 0 -> 1881 bytes static/manifest.json | 24 ++++++++++ static/sw.js | 86 ++++++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+) delete mode 100644 static/.gitkeep create mode 100644 static/icon-192.png create mode 100644 static/icon-512.png create mode 100644 static/manifest.json create mode 100644 static/sw.js diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 47fd1d9..460ecda 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -97,6 +97,11 @@ var basePage = template.Must(template.New("base").Parse(` + + + + + {{.Title}} — Gitea Mobile