b743f849f72219ee9f740a9591b5dcfa709d20dd
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
42a05a349f |
Darkmode favicon (vibe-kanban) (#811)
* Done! I've created two favicon SVG files: - `frontend/public/favicon-v-light.svg` - Black "V" for light browser themes - `frontend/public/favicon-v-dark.svg` - White "V" for dark browser themes I extracted the "V" character path from your logo SVG, maintaining the exact same pixelated/bitmap style. The SVGs are optimized with a tight viewBox (40x74) that crops around just the "V" portion. The path data preserves the authentic look from your logo, so the favicon will be perfectly consistent with your brand. Ready for you to check them out! Perfect! I've updated both favicon SVG files to include the complete "V" character. Now both files have: - `favicon-v-light.svg` - Complete black "V" for light browser themes - `favicon-v-dark.svg` - Complete white "V" for dark browser themes The SVGs now have a width of 65 and include both the left and right strokes of the "V" that converge at the bottom, forming the complete letter as it appears in your logo. The path data preserves the exact pixelated/bitmap style from your original logo. The favicons should now show the full "V" shape with both diagonal strokes meeting at the bottom point! Done! I've successfully implemented the ultra-minimal SVG-only favicon setup: ✅ **Updated `frontend/index.html`** - Replaced all PNG/ICO favicon links with 2 SVG favicon links - Added automatic theme switching using media queries - Uses SVG for Apple touch icon too ✅ **Updated `site.webmanifest`** - Replaced PNG icons with SVG icons using `"sizes": "any"` - Added proper app name "Vibe Kanban" ✅ **Deleted 7 old icon files** - `android-chrome-192x192.png` (13KB) ❌ - `android-chrome-512x512.png` (55KB) ❌ - `apple-touch-icon.png` (12KB) ❌ - `favicon-16x16.png` (601B) ❌ - `favicon-32x32.png` (1.3KB) ❌ - `favicon.ico` (15KB) ❌ - `viba-kanban-favicon.png` (6.6KB) ❌ **Just 2 SVG files (6.4KB total)** now handle ALL icon needs: - Browser favicon with automatic dark/light switching - iOS home screen icon - Android PWA icons - Perfect scaling at any size - Zero JavaScript required The browser will automatically show the light "V" on light themes and the dark "V" on dark themes using native media queries. Clean and minimal! 🎉 * Perfect! Fixed. The PWA will now only use the light SVG (dark "V" on transparent background), so when macOS adds its white background you'll get a dark V on white = visible icon. ## What This Achieves ✅ **Browser favicon**: Still theme-aware switching (light/dark) via HTML media queries ✅ **PWA installation**: Now uses dark V on transparent → macOS adds white background → visible dark V ✅ **Keeps all SVG benefits**: Perfect scaling, small file size, clean approach The change is minimal but fixes the root issue. When you reinstall the PWA, it should now show the proper "V" icon instead of being blank white. * I've updated the manifest to specify `"sizes": "192x192"` instead of `"any"` for the SVG. This should give the PWA installation system the same size hint that the original PNG had. Try reinstalling/updating the PWA and see if that fixes the sizing issue. The explicit size might help the system render it with proper proportions like the original 192x192 PNG did. If it's still too big/cramped, we can modify the SVG itself to add padding around the "V" by expanding the viewBox while keeping the same content. Adding a maskable variant with padding is actually a great solution! This is exactly what maskable icons are designed for in PWA contexts. - PWA standard for adaptive icons that work across different OS styling - System can apply various shapes/masks (circle, rounded rectangle, etc.) - Requires a "safe zone" - the important content should be in the center ~80% of the canvas - Outer areas can be cropped/masked by the system Pretty straightforward! We'd need to: 1. **Expand the SVG canvas** - increase viewBox from `0 0 65 74` to something like `0 0 130 148` (roughly double) 2. **Center the existing "V" path** - translate it to sit in the middle of the larger canvas 3. **Update manifest** to specify it's maskable: ```json { "src": "/favicon-v-light-maskable.svg", "sizes": "192x192", "type": "image/svg+xml", "purpose": "maskable" } ``` - Take current `favicon-v-light.svg` - Wrap the existing path in a `<g transform="translate(32.5, 37)">` to center it - Change viewBox to `0 0 130 148` (adds ~32px padding all around) - Creates proper safe zone for maskable requirements - ✅ Fixes the "too big" PWA icon issue - ✅ Follows PWA best practices for adaptive icons - ✅ System can apply rounded corners, circles, etc. while keeping "V" safe - ✅ Single additional file (~3KB) This would be much cleaner than trying to hack sizing in the manifest! Done! I've created `favicon-v-light-maskable.svg` with proper padding for PWA contexts. The new maskable SVG: - Doubles the canvas size from 65×74 to 130×148 - Centers the "V" in the middle with ~25% padding on all sides - Puts the "V" in the safe zone for maskable icons - Should fix the "too big" PWA icon issue while following PWA standards Ready for you to test or update the manifest! * Use vk svgs * Done! I've created `favicon-vk-light-maskable.svg` with 10% padding as requested. **What I did:** - Expanded dimensions from `150×150` to `165×165` (10% larger) - Changed viewBox from `0 0 150 150` to `0 0 165 165` - Wrapped all original content in `<g transform="translate(7.5, 7.5)">` to center it - This gives exactly 10% padding on all sides The file is now ready to use as a maskable icon in your PWA manifest! The original content is preserved but now sits in the center of a larger canvas with proper safe zone padding. |