Skip to content

Commit e7c09c8

Browse files
committed
add pwa manifest
1 parent f954f83 commit e7c09c8

13 files changed

Lines changed: 112 additions & 0 deletions

output/bookgrab-logo.png

253 KB
Loading

public/favicon-16x16.png

652 Bytes
Loading

public/favicon-32x32.png

1.44 KB
Loading

public/favicon.ico

14.7 KB
Binary file not shown.

public/icons/apple-touch-icon.png

23.8 KB
Loading

public/icons/icon-192x192.png

27 KB
Loading

public/icons/icon-512x512.png

253 KB
Loading

public/manifest.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "BookGrab",
3+
"short_name": "BookGrab",
4+
"description": "Simple book search and download app for MyAnonyMouse",
5+
"start_url": "/",
6+
"display": "standalone",
7+
"background_color": "#ffffff",
8+
"theme_color": "#000000",
9+
"orientation": "portrait-primary",
10+
"categories": ["books", "entertainment", "utilities"],
11+
"icons": [
12+
{
13+
"src": "/icons/icon-192x192.png",
14+
"sizes": "192x192",
15+
"type": "image/png",
16+
"purpose": "maskable any"
17+
},
18+
{
19+
"src": "/icons/icon-512x512.png",
20+
"sizes": "512x512",
21+
"type": "image/png",
22+
"purpose": "maskable any"
23+
},
24+
{
25+
"src": "/icons/apple-touch-icon.png",
26+
"sizes": "180x180",
27+
"type": "image/png"
28+
}
29+
]
30+
}

public/sw.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const CACHE_NAME = 'bookgrab-v1';
2+
const urlsToCache = [
3+
'/',
4+
'/manifest.json',
5+
'/icons/icon-192x192.png',
6+
'/icons/icon-512x512.png',
7+
];
8+
9+
self.addEventListener('install', (event) => {
10+
event.waitUntil(
11+
caches.open(CACHE_NAME)
12+
.then((cache) => cache.addAll(urlsToCache))
13+
);
14+
});
15+
16+
self.addEventListener('fetch', (event) => {
17+
event.respondWith(
18+
caches.match(event.request)
19+
.then((response) => {
20+
// Return cached version or fetch from network
21+
return response || fetch(event.request);
22+
}
23+
)
24+
);
25+
});

src/app/favicon.ico

-25.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)