What a mess
This commit is contained in:
40
pwa/public/README.md
Normal file
40
pwa/public/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# PWA Icons
|
||||
|
||||
This directory should contain the following icons for the Progressive Web App:
|
||||
|
||||
## Required Icons
|
||||
|
||||
- `pwa-192x192.png` - 192x192px icon for mobile
|
||||
- `pwa-512x512.png` - 512x512px icon for desktop/splash screen
|
||||
- `apple-touch-icon.png` - 180x180px for iOS
|
||||
- `favicon.ico` - Standard favicon
|
||||
- `mask-icon.svg` - Safari pinned tab icon
|
||||
|
||||
## Icon Design Guidelines
|
||||
|
||||
- Use the game's theme (post-apocalyptic, dark colors)
|
||||
- Ensure icons are recognizable at small sizes
|
||||
- Test on various backgrounds (dark mode, light mode)
|
||||
- Keep designs simple and bold
|
||||
|
||||
## Generating Icons
|
||||
|
||||
You can use tools like:
|
||||
- https://realfavicongenerator.net/
|
||||
- https://favicon.io/
|
||||
- Photoshop/GIMP/Figma
|
||||
|
||||
## Placeholder
|
||||
|
||||
Until custom icons are created, you can use colored squares or the game logo.
|
||||
|
||||
Example quick generation:
|
||||
```bash
|
||||
# Using ImageMagick
|
||||
convert -size 192x192 xc:#646cff -font DejaVu-Sans-Bold -pointsize 72 \
|
||||
-fill white -gravity center -annotate +0+0 'E' pwa-192x192.png
|
||||
convert -size 512x512 xc:#646cff -font DejaVu-Sans-Bold -pointsize 200 \
|
||||
-fill white -gravity center -annotate +0+0 'E' pwa-512x512.png
|
||||
convert -size 180x180 xc:#646cff -font DejaVu-Sans-Bold -pointsize 72 \
|
||||
-fill white -gravity center -annotate +0+0 'E' apple-touch-icon.png
|
||||
```
|
||||
BIN
pwa/public/icon-192.png
Normal file
BIN
pwa/public/icon-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 630 B |
BIN
pwa/public/icon-512.png
Normal file
BIN
pwa/public/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
24
pwa/public/manifest.webmanifest
Normal file
24
pwa/public/manifest.webmanifest
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "Echoes of the Ash",
|
||||
"short_name": "Echoes",
|
||||
"description": "A post-apocalyptic survival RPG",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#1a1a1a",
|
||||
"theme_color": "#1a1a1a",
|
||||
"orientation": "portrait-primary",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
pwa/public/pwa-192x192.png
Normal file
BIN
pwa/public/pwa-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 630 B |
BIN
pwa/public/pwa-512x512.png
Normal file
BIN
pwa/public/pwa-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
19
pwa/public/sw.js
Normal file
19
pwa/public/sw.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const CACHE_NAME = 'echoes-of-the-ash-v1';
|
||||
const urlsToCache = [
|
||||
'/',
|
||||
'/index.html'
|
||||
];
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME)
|
||||
.then((cache) => cache.addAll(urlsToCache))
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
event.respondWith(
|
||||
caches.match(event.request)
|
||||
.then((response) => response || fetch(event.request))
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user