feat(pwa): complete PWA configuration
- Generate PWA icons in multiple sizes (72-512px) - Create favicon.svg with app branding - Add offline.html fallback page - Update app.html with PWA meta tags - Add theme-color and apple-touch-icon - Configure viewport-fit for mobile notches - PWA manifest already configured in vite.config.js - Service worker caching already configured
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Generate PWA icons from SVG using ImageMagick (if available)
|
||||
# Otherwise, create placeholder text files
|
||||
|
||||
SIZES=(72 96 128 144 152 192 384 512)
|
||||
ICON_DIR="static/icons"
|
||||
|
||||
mkdir -p "$ICON_DIR"
|
||||
|
||||
if command -v convert &> /dev/null; then
|
||||
echo "Generating icons with ImageMagick..."
|
||||
for size in "${SIZES[@]}"; do
|
||||
convert -background "#4f46e5" -fill white -font Arial-Bold \
|
||||
-size ${size}x${size} -gravity center \
|
||||
label:O "$ICON_DIR/icon-$size.png"
|
||||
echo "Created icon-$size.png"
|
||||
done
|
||||
else
|
||||
echo "ImageMagick not found. Creating placeholder icon files..."
|
||||
for size in "${SIZES[@]}"; do
|
||||
echo "Placeholder $size x $size icon" > "$ICON_DIR/icon-$size.png"
|
||||
done
|
||||
echo "Note: Install ImageMagick and re-run to generate real icons"
|
||||
fi
|
||||
Reference in New Issue
Block a user