Skip to content

Commit

Permalink
Update PWA icons
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Aug 7, 2024
1 parent 2cfb3d6 commit 50030a7
Show file tree
Hide file tree
Showing 25 changed files with 108 additions and 6 deletions.
27 changes: 27 additions & 0 deletions apps/fxc-front/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# How to contribute

## Generating PWA icons

Doc:

- [Vite PWA](https://vite-pwa-org.netlify.app/assets-generator/#pwa-minimal-icons-requirements)
- [https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7](https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7)

Tools:

- [icongen](https://cthedot.de/icongen/) to generate icons ([repo](https://github.com/cthedot/icongen))
- [maskable.app](https://maskable.app/editor) to generate the maskable icons

## Optimizing PNG

Use [this script](https://gist.github.com/longwave/9482947)

```bash
#!/bin/sh

for i in `find . -name "*.png"`; do
pngcrush -e .png2 -rem allb -brute -reduce $i
mv ${i}2 $i
optipng -o7 $i
done
```
4 changes: 0 additions & 4 deletions apps/fxc-front/public/manifest.webmanifest

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/android-36x36.png
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/android-48x48.png
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/android-72x72.png
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/android-96x96.png
Binary file not shown.
Binary file modified apps/fxc-front/public/static/iconx/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/fxc-front/public/static/iconx/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/fxc-front/public/static/iconx/globe-maskable-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions apps/fxc-front/public/static/iconx/plane+back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions apps/fxc-front/public/static/iconx/plane.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/fxc-front/public/static/iconx/pwa-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/fxc-front/public/static/iconx/pwa-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/fxc-front/public/static/iconx/pwa-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/fxc-front/public/static/iconx/pwa-maskable-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/fxc-front/public/static/iconx/pwa-maskable-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/fxc-front/public/static/iconx/tile150x150.png
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/tile310x150.png
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/tile310x310.png
Binary file not shown.
Binary file removed apps/fxc-front/public/static/iconx/tile70x70.png
Binary file not shown.
5 changes: 5 additions & 0 deletions apps/fxc-front/pwa.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export const getPwaConfig: (mode?: string) => Partial<VitePWAOptions> = (mode =
},
],
icons: [
{
src: 'static/iconx/pwa-64x64.png',
sizes: '64x64',
type: 'image/png',
},
{
src: 'static/iconx/pwa-192x192.png',
sizes: '192x192',
Expand Down
3 changes: 3 additions & 0 deletions apps/fxc-front/src/sw.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/**
* flyXC service worker.
*
* IMPORTANT:
* Do not rename/move this file, it is referenced in apps/fxc-front/pwa.config.ts
*/

import type { ManifestEntry } from 'workbox-build';
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"scripts": {
"dev": "nx run-many --target=serve --projects=fxc-front,fxc-server,airspaces --configuration=development",
"check": "npm run fixlint && nx format && nx run-many --targets=test,lint,build --parallel 8",
"fixlint": "nx run-many -t lint --fix --parallel 8",
"generate-pwa-assets": "pwa-assets-generator --preset minimal-2023 apps/fxc-front/public/favicon.svg"
"fixlint": "nx run-many -t lint --fix --parallel 8"
},
"nx": {
"includedScripts": [
Expand Down

0 comments on commit 50030a7

Please sign in to comment.