feat: add app icons and PWA shell
CI / test (push) Successful in 2m40s

This commit is contained in:
strsv committed 2026-11-06 08:27:02 +03:00
1 parent 2fcb29e3fe
commit 97a5098511
23 files changed
+146 -57

No files matched your search

+9
View File
@@ -95,6 +95,7 @@ CONTENT_TYPES = {
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".ico": "image/x-icon",
".webmanifest": "application/manifest+json; charset=utf-8",
}
@@ -547,6 +548,14 @@ class Handler(BaseHTTPRequestHandler):
def _static(self, path):
if path in ("/", ""):
path = "/index.html"
if path == "/sw.js":
full = os.path.join(STATIC, "sw.js")
if os.path.isfile(full):
with open(full, "rb") as fh:
self._send(200, fh.read(), "application/javascript; charset=utf-8")
else:
self._error(404, "not found")
return
rel = path.lstrip("/")
if rel.startswith("static/"):
rel = rel[len("static/"):]