diff --git a/app/main.py b/app/main.py index b879e00..2df2d28 100755 --- a/app/main.py +++ b/app/main.py @@ -242,6 +242,13 @@ def get_service_worker(): return FileResponse(sw_path, media_type="application/javascript", headers={"Service-Worker-Allowed": "/"}) raise HTTPException(status_code=404, detail="Service worker not found") +@app.get("/favicon.ico") +def get_favicon(): + ico_path = os.path.join(STATIC_DIR, "favicon.ico") + if os.path.exists(ico_path): + return FileResponse(ico_path, media_type="image/x-icon") + raise HTTPException(status_code=404, detail="Favicon not found") + # ========================================== # AUTH VIEWS diff --git a/app/static/apple-touch-icon.png b/app/static/apple-touch-icon.png new file mode 100644 index 0000000..78d172f Binary files /dev/null and b/app/static/apple-touch-icon.png differ diff --git a/app/static/favicon.ico b/app/static/favicon.ico new file mode 100644 index 0000000..36cee0c Binary files /dev/null and b/app/static/favicon.ico differ diff --git a/app/static/favicon.svg b/app/static/favicon.svg new file mode 100644 index 0000000..e64cfe7 --- /dev/null +++ b/app/static/favicon.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/static/icon-192.png b/app/static/icon-192.png index 2408beb..9cafeaa 100755 Binary files a/app/static/icon-192.png and b/app/static/icon-192.png differ diff --git a/app/static/icon-512.png b/app/static/icon-512.png index 70d057e..b940930 100755 Binary files a/app/static/icon-512.png and b/app/static/icon-512.png differ diff --git a/app/static/sw.js b/app/static/sw.js index 2022210..b542add 100644 --- a/app/static/sw.js +++ b/app/static/sw.js @@ -1,13 +1,16 @@ -// What To Cook? - PWA Service Worker (v1.0.0) -const CACHE_NAME = 'wtc-cache-v1'; +// What To Cook? - PWA Service Worker (v1.1.0) +const CACHE_NAME = 'wtc-cache-v2'; const PRECACHE_URLS = [ '/', '/cookbook', '/shopping-list', '/manifest.json', + '/favicon.ico', + '/static/favicon.svg', '/static/cookbook.css', '/static/icon-192.png', - '/static/icon-512.png' + '/static/icon-512.png', + '/static/apple-touch-icon.png' ]; // Install: Pre-cache shell assets diff --git a/app/templates/cookbook.html b/app/templates/cookbook.html index df6415f..12493b2 100755 --- a/app/templates/cookbook.html +++ b/app/templates/cookbook.html @@ -8,10 +8,10 @@ - - - - + + + +